By Thilak July 25, 2006

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]

Related Posts that you may like:

Discussion

Comments for “WWW vs Non-WWW”

  • 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?
  • 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..
blog comments powered by Disqus

Welcome to TechBuzz

TechBuzz is a technology blog read by 3000+ readers every day. We regularly write about new trends in technology, useful computer application and new web services. If you are new here, please subscribe our feed or opt for email updates to get new articles to your inbox.

Free Daily Updates

You can get fresh daily articles delivered straight to your feed reader or email inbox. Please subscribe to our RSS feed or opt for our free newsletter

Recent Posts

Google’s Chrome Tablet Concept Revealed
February 3, 2010
By Thilak
Ixquick. Ixquick allows users to surf the web with complete privacy. It let’s users surf the world wide web safely without revealing any personally identifiable or private information to the websites being viewed.

Ixquick is a free service which provides complete anonymity to the user enabling the user to surf the internet anonymously and safely. They claim it to be world’s most private search engine.

Surf The Internet Anonymously With Ixquick!

Surf The Internet Anonymously With Ixquick!
January 28, 2010
By Meghan
Apple iPad Unveiled
January 28, 2010
By Meghan
Happy New Year!
January 1, 2010
By Meghan
WordPress Version 2.9 Is Out!
December 19, 2009
By Meghan