Tags: Blogging, blogging-tips, htaccess, optimisation, pagerank, serp
I have observed many sites are either accessible using http://www.abc.com or http://abc.com This may sounds ok but Google does not take it well. Google considers both as two separate websites. Apart from problem of duplication, it may also cause problems of different pageranks for both versions.
There is a simple way to solve this problem by editing your .htaccess file.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.(.*)
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.nspeaks\.com$ [NC]
RewriteRule ^(.*)$ http://nspeaks.com/$1 [R=301,L]
Use any one of the rules and this will ensure that both versions of your site will get same pagerank.
RSS feed for comments on this post. TrackBack URL
December 5, 2007 at 11:37 am
Great tip for those with sites that are accessible with or without a www in front. Not very complicated but definitely worth the work considering your site may rank higher.
[Reply]