Canonicalize Your Domain

November 14th, 2008
Please Rate This Post
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5 out of 5)
Loading ... Loading ...

URL consistency is a very important factor when it comes to SEO for your website. As you may already know its very important to remain consistent with your website urls to avoid duplicate content penalties. Search engine bots are only robots and you have to keep in mind that when they look at your website as www.example.com and example.com or www.example.com/index.html to you and I this is the same website but search engine crawlers will look at each URL as a different website altogether each with the same content which could send you into duplicate content purgatory. Matt Cutts talks about URL canonicalization and its factor on SEO and ranking. Unfortunately you do not have any control on how people link back to your site. I will show you couple easy ways to avoid this altogether by modifying your .htaccess file sorry this only works for Apache webserver.

301 redirect URL request without the WWW prefix to the correct URL

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourwebsite\.com$ [NC]
RewriteRule ^(.*)$ http://www.yourwebsite.com/$1 [R=301,L]

301 redirect URL request with the WWW prefix to the correct URL

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourwebsite\.com$ [NC]
RewriteRule ^(.*)$ http://yourwebsite.com/$1 [R=301,L]

Using this quick .htaccess hack you can update all your backlinks to correct URL.

Here is some further reading on URL canonicalization that I found useful….

Digg!
Share This Post With Your Social Network
  • E-mail this story to a friend!
  • Digg
  • del.icio.us
  • MySpace
  • Facebook
  • Live
  • Furl
  • Reddit
  • Technorati
  • Google
  • Sphinn
  • Propeller
  • description
  • Yahoo! Buzz
StumbleUpon It!
If you enjoyed this post check out these...

Leave a Reply