Permanently Redirect your [non-www] domain to [www]

Permanently Redirect your [non-www] domain to [www]
[Permanent Redirect].
RewriteEngine On
RewriteCond %{HTTP_HOST} ^YourSite\.com [nc]
RewriteRule (.*) http://www.YourSite.com/$1 [R=301,L]