October 24, 2005

Removing “www”

Filed under: General — Dimitris Giannitsaros @ 01:37

For some reason Google has a different PageRank for rapidsignal.com and www.rapidsignal.com.

No big deal really, but it bothered me a bit. So I added this rule to .htaccess to fix it:

RewriteCond %{HTTP_HOST} ^www.rapidsignal.com [NC]
RewriteRule ^(.*)$ http://rapidsignal.com/$1 [R=301,L]

This way I got rid of the www part once and for all, which I also find nicer. I used a 301 Permanent redirect hoping Google will understand that a search for link:http://rapidsignal.com/blog/ and a search for link:http://www.rapidsignal.com/blog/ should return the same results.

2 Comments

  1. Thanks, I just made the same change to Codesnipers. The duplicate records (www vs non-www) in the logs was driving me nuts.

    Comment by Keith Casey — November 11, 2005 @ 22:34

  2. Indeed a nice side effect of removing the www part!

    Comment by Dimitris Giannitsaros — November 11, 2005 @ 22:37

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.


Powered by WordPress Theme by H P Nadig