SEO Tip: Canonicalization

Posted on 14. Oct, 2009 by thomaswos in SEO

I have a SEO Tip about link­ing to the home page cor­rectly, you should know how to do “canon­i­cal­iza­tion” (just don’t ask me to pro­nounce it). As a quick refresher, canon­i­cal­iza­tion is a fancy word that means to direct traf­fic from mul­ti­ple, pos­si­bly unde­sir­able addresses, to a sin­gle pre­ferred address.

The most com­mon use for this is for telling your web server to only dis­play pages either with the “www.” or with­out it, but not both. This is typ­i­cally done by edit­ing a spe­cial file named “.htac­cess” located in your web servers “root” or top most folder. If you are not VERY com­fort­able mak­ing changes to your server con­fig­u­ra­tion, or your site is hosted on a win­dows server (most are not), you may need to con­tact your host­ing com­pany to get this set up for you.

CAUTION: Extreme geek­i­ness ahead! If you are com­fort­able attempt­ing this, you should know that the .htac­cess file can be used for all sorts of things, besides redi­rects. It can con­tain secu­rity set­tings, server con­fig­u­ra­tions and file type set­tings to name just a few. If you are not care­ful you could cause seri­ous prob­lems – includ­ing pre­vent­ing access to your site. Be care­full if you decide to edit this your­self. Cre­ate a copy first, just in case.

If you want your site to only be viewed with­out the “www.“ then you should add this code to the bot­tom of your .htac­cess file:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mywebsite.com [NC]
RewriteRule ^(.*)$ http://mydomain.com/$1 [L,R=301]

If you want to force your site to use the “www.”, then you should add this code to the bot­tom of your .htac­cess file:

RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

I feel it’s impor­tant to cau­tion you again – while the code used to do redi­rects is rather sim­ple, even a small error can have sig­nif­i­cant con­se­quences for your site. Use EXTREME caution.

As far as SEO is con­cerned, nei­ther way is bet­ter than the other, just be con­sis­tent. How­ever, shorter domains are gen­er­ally eas­ier to use on var­i­ous social sites.

Canon­i­cal­iza­tion is also use­ful at the indi­vid­ual file or post level. If you use Word­Press, or prac­ti­cally any Con­tent Man­age­ment Sys­tem (CMS) to run your site there is a very good chance you are cre­at­ing mul­ti­ple paths you’re your con­tent, also called “dupli­cate con­tent”, with­out even real­iz­ing it. Can vis­i­tors get to your pages through archives, cat­e­gories or tags? If yes, you are prob­a­bly have dupli­cate con­tent. This should be an easy fix though. Google and the other engines adopted the use of a spe­cial META tag (Sorry – more of them) called the canon­i­cal tag. It’s a way for you to tell the engines which path it should con­sider the “cor­rect” path. In Word­Press there are plu­g­ins like the All in One SEO Pack that will cre­ate this for your automag­i­cally. If you are cre­at­ing code by hand then you just need to add the fol­low­ing to the HEAD sec­tion of your pages:

<link rel=“canonical” href=“http://www.yourdoman.com/path-to-your-post/” /> 

I know this post ranked high on the geek-o-meter, but hope­fully no one’s head exploded. Dupli­cate con­tent is a seri­ous issue, but thank­fully it’s one that is eas­ily avoided on your own sites and now you know how to do it, or at least now you know you have to tell your host to fix it

Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • BlinkList
  • blogmarks
  • blogtercimlap
  • co.mments
  • Diigo
  • StumbleUpon
  • Twitter
  • Fleck
  • LinkaGoGo
  • Live
  • NewsVine
  • Turn this article into a PDF!
  • Reddit
  • RSS
  • Slashdot
  • Wikio IT
  • Yahoo! Bookmarks
  • E-mail this story to a friend!
  • Fark

Related Posts:

Tags: , ,

Leave a reply