Canonicalization
Canonicalization is something I see as fundamental to SEO. Its the first things i check when I’m evaluating a site (mainly because its so quick and easy to check) and many people don’t know what it is, why its used or how to fix it.
The problem occurs because of the internet relic of using ‘www’ as a prefix to a domain name. The Wikipedia article nicely explains its origins and that there is no requirement to use it. It seems to be a practice done out of familiarity and habit.
The reason that this is a problem is in most cases a website will publish the same information with and without the www. www is a subdomain of the site it is treated as such by search engines.
Google spiders both unless it is specifically told not to. This means that one will get the love from Google because it is seen to have published the unique information first. The other will be seen as holding duplicate content and given no authority.
You may think that this might not cause a problem, because the one with duplicate content will simply get thrown into supplemental and not appear in the SERPs, however. You cannot be sure that everyone that links to your site will consistently link to the same version. So your link weight is split between what Google considers to be two separate sites.
Since we know that links are the lifeblood of any domain we cant really afford to let this happen .
ok, so what do we do about it?
well, you can specifically tell google which version you would like them to spider using the google web master tools. This will stop the duplicate version from being spidered.
This will not stop people linking to the unspidered version, to do this and collect all of your link weight into one domain add the following to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.([^\.]+\.[^\.]+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !..+$
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1/ [R=301,L]
The above code will 301 redirect (permanently redirect) the www version to the non www version of your site.
if you would prefer to keep the www then use the following instead:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteCond %{http_host} ^kevprice.com [nc]
RewriteRule ^(.*)$ http://www.kevprice.com/$1 [r=301,nc]
Obviously substituting your own domain name in place of kevprice.com or you will permanently redirect all your traffic to me.
301 redirects are your friend for collecting link love and can be used in many instances, but I'll write about that some other time.
Leave a Reply