When you try to improve your SEO a long trip begins...this trip we are going to run together through various posts we already prepare for you...but hey...since it's SEO all about, we are not going to reveal them all at once.
Here we will be dealing with 301 Moved Permanently
Redirect non-www to www or vise versa
Google Analytics will also give you a “Redundant Hostnames” warning if you don’t.
If you like the www you should follow this:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
</IfModule>
If you want to remove the www from your links then this is the way:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.domain\.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
</IfModule>
In both cases, if you are on an RW Server with cPanel or DirectAdmin ...we have a much more easy click-click solution...here in our blog soon.