|
I'm using:
# Begin non-www page protection #
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
</IfModule>
# End non-www page protection #
Is this the correct format, and will all links now point just to the www version just from the time that I do this and upload the new .htaccess file, or will all links (and the page rank boost associated with it) become retrospective? Will I see a boost in rank immediately?
I've also heard that the search engines see a www.mysite.com version and a www.mysite.com/ version. Will my script take care of this as well, or do I have to add something else? (I can't see whether the script does this or not as I am not a coder!)
For .co.uk domains do I just substitute .co.uk for .com in each case?
I'm using a script in my .htaccess file which points all links from my "non-www" site to my www site.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain\.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.yourdomain.co.uk/$1 [R=301,L]
That above is the only code you need to redirect non-www to www in your .htaccess file. Yes you can change *.com to *.co.uk to get the same results, I made the code already valid for that. Change "yourdomain" to your domains name.
Yes, this will prevent duplicate content issues with search engines regarding two URLs having the same content. All non-www requests will be 301 redirected to their www counterpart. Results will take time, you might not even yeild none but a more proper internal link structure.
|