WWW vs Non-WWW

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]

This post was published by on July 25, 2006

About the Author: Thilak Rao works as a Social Media Expert. He is one of the first professional bloggers from India, and he loves to write, travel and click photos. Follow him on Twitter @thilak

  • http://tech-buzz.net/2006/08/09/no-www-plugin-for-wordpress/ No-WWW Plugin for Wordpress » TechBuzz

    [...] 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. [...]

  • http://ryanslife.net/2006/07/26/the-www-and-pagerank/ Ryan’s Life » The WWW and PageRank

    [...] 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 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. [...]

  • http://www.proxynetwork.i.ph Myspace Vtunnel Proxy

    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..

  • http://www.proxynetwork.i.ph Myspace Vtunnel Proxy

    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?