
All web sites can be reached from two URL addresses: one with the WWW and the other without the WWW. For example, you can reach this blog by typing in http://www.natewhitehill.com and also http://natewhitehill.com.
However, it is imperative that you pick one address and stick with it for maximum search engine results and PageRank. If, generally, you use the version with the WWW and someone links to your site and they do not include the WWW, the search engine spiders will index that link as a separate domain from the one with the WWW.
For example, my good buddy, Matt from Take More Risks, recently had 2 separate PageRanks for his blog. His blog URL with the WWW had a PR 3, while the URL without the WWW had a PR 2. In other words, Google indexed that same domain as 2 separate ones. Most likely, he could have achieved a higher PageRank if he had set his preferred domain earlier. If you don’t quite understand PageRank, read this article about the upcoming PageRank update.
Which Preferred Domain Should You Choose?
Well, first you need to pick which version you rather use. I chose to go without the WWW, so my preferred domain is http://natewhitehill.com. There is no one reason to pick one instead of the other – it is purely a matter of preference. I chose to go without the WWW because having a longer domain name (13 characters, in my case), I thought it would make it easier for people to remember the URL if they just saw the natewhitehill.com and not the www.natewhitehill.com. John Chow, on the other hand, chose to use the WWW. Just to reiterate, there is no definitive reason to pick one over the other.
Setting the Preferred Domain
After you choose your preferred domain, you must now create a 301 Redirect to forward one address to the other. If you are hosted on a Linux server, you do this by editing your .htaccess file. You may first need to create one and to do this you must:
1) Create a simple text file and name it .htaccess
2) Modify it with the proper code (details below)
3) Upload it to the root of your server
Here is the code you should use if you want people to redirect from non-WWW to WWW:
(for example, if someone types in http://domain.com, it will forward to http://www.domain.com)
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(.*)\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
Here is the code you should use if you want people to redirect from WWW to non-WWW:
(for example, if someone types in http://www.domain.com, it will forward to http://domain.com)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^.*$ http://domain.com%{REQUEST_URI} [R=301,L]
In both cases, make sure to replace “domain” with the URL of your domain.
By setting a preferred domain you are ensuring that Google and all the major search engines will only index links from one domain. This will help your PageRank the next time around and also you receive more weight in current search engine rankings.
If you have not set your preferred domain yet or have been putting it off, DO IT NOW. You will thank me later when you get a higher PageRank.
