Add to Google Reader, Bloglines, Netvibes

During the recent Page Rank update my friend JohnTP saw that http://johntp.com had a PR of 5, but http://www.johntp.com had only 3.

This mainly happens because search engines see this as two different domain names. The best way fix this error is to redirect your URLs. I personally don?t prefer www. because it is deprecated by the search engines

How to Fix ?

Just change yoursite.com to your website?s URL and add following code to your .htaccess file (found at your website?s root directory)

RewriteEngine On
RewriteCond %{HTTP_HOST} !^yoursite.com$ [NC]

RewriteRule (.*) http.yoursite.com/$1 [R=301,L]

This will redirect all the traffic from http://www.yoursite.com to http://yoursite.com

[tags]Page Rank, SEO[/tags]



4 Comments and Trackbacks (Add Your Own)

  1. [...] Recently I spoke about WWW vs Non WWW and the Page Rank Splitting Issue. Today when I was in the process of restoring my favorite plugins, I accidentally deleted my .htaccess file, I tried to make mod_rewrite work, but for some strange reason it didn’t work. So I was in a search for an alternative and then I landed on Matt’s No-WWW plugin page. [...]

  2. [...] There has been a lot of hoopla over Google’s PageRank algorithm for sometime now and two of my favorite blogs have sounded off on one of the issues revolving around PageRank, use WWW or don’t use http://WWW. TechBuzz has a good summary on the situation. Take for instance my website Ryan’s Life. Google sees ryanslife.net and http://www.ryanslife.net as two different websites. This can cause a discrepancy between the two PageRanks. TechBuzz suggested adding a couple lines to your .htaccess file so that if any traffic comes to http://www.ryanslife.net it would be forwarded to ryanslife.net. [...]

  3. yes the site with WWW and with noWWW is different from each other as google see it.. that is why using redirect 301 is the solution is here.. by the way thanks for sharing this redirect htaccess code.. pretty nice..

  4. by the way i have question here.. i used redirect 301 as shown above but i got a problem using a subdomain.. like this:
    sub.mysite.com
    it is working properly when the time i’m still not using redirect but when the time i used it..
    every time i try to visit sub.mysite.com
    i was redirected to mysite.com/sub/
    so anyone can help me with this?

Leave a Reply

Grab our RSS feed.

Updates straight to your inbox.