Most people consider www.example.comand example.com to be the same domain name. What most people don't realize is that an address with a www at the start is not the same as an address without a www.
This is why you'll sometimes type an address into your browser and get the "this page doesn't exist" error, but if you add or remove the www the page suddenly springs back into existence. In this lesson, we look at Url Canonicalization - to www or not to www?
A lot of the time a web server will be configured so that it doesn't really matter what someone types in — they will still get there, so it's not usually such a problem for type-in traffic, but when it comes to the search engines, there's no such luck; they see the two addresses as different, and this can cause problems for website owners using search engine optimization on their websites.
Imagine that you'd got yourself a couple of big juicy backlinks. Imagine they're from sites with a PageRank of 7, and they're .edu sites to boot. They're relevant to your topic, they're linking to you using your keywords - it's fantastic!
But now imagine that one is linking to www.yoursite.com, and the other is linking simply to yoursite.com.
Instead of getting a double-whammy of PageRank from these two awesome sites, you're actually only getting half. Half the juice goes to the www address, the other half goes to the non-www address. Imagine that this is happening for ALL of your links - some are going to www, some going to the non-www.
The search engines will only display one version of your site in the search listings, so it's not like you have two chances to win - you're actually losing the benefit of half your links.
There are a couple of things you can do to ensure that all your link love is being funneled to the right place:
Pick a version of your address and stick with it.
The best way to choose www or non-www is to type each page into your browser in turn and see which one has the highest PageRank. This is an indicator of the number and strength of backlinks to that version of your page.
You can also use a tool like Traffic Travis to check the number and quality of backlinks to each version of your domain. If you've got a brand new domain, or if both versions of your site are ranking pretty much the same, then just pick whichever version you like best. Then make sure you stick with it! Try to get your link partners to stick with it as well.
Set your preferred address in Google's Webmaster Tools
Google let you designate your preferred address in their Webmaster Tools site. If you haven't signed up for Webmaster Tools you should probably do so — there's a few other useful tools in there that will come in handy eventually.
Do a 301 redirect (moved permanently) in your .htaccess file
Copy the following snippet of text into your .htaccess file
To turn non-www into a www
Options +FollowSymlinks RewriteEngine on RewriteCond %{http_host} ^yourdomain.com [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/ [R=301,NC]
To turn www into a non-www
Options +FollowSymlinks RewriteEngine on RewriteCond %{http_host} ^www\.yourdomain\.com [NC] RewriteRule ^(.*)$ http://yourdomain.com/ [R=301,NC]
In this lesson we took a look at how to stop losing PageRank from a non-canonicalized Domain Name! Three methods we looked at to reduce or even fix the issue were:
Questions & Comments + Add a comment