Friday, January 21, 2011

What are Canonical URLs and do I need them?

In early 2009 Google announced that their crawler would start reading a new "canonical" meta tag. This was done to allow webmasters to tell Google the preferred URL to use when indexing a particular page. The idea is that if a single page is accessible through multiple URLs, than only one of those URLs should be included in the Google index. Since there is no way for Google to automatically determine what the preferred URL is, the "canonical" tag allows the webmaster to tell Google.

The syntax of the meta tag looks like this:

<link href="http://www.example.com/product.php?item=swedish-fish" rel="canonical"></link>

The tag tells Google to only index this page if it's being accessed through the same URL specified in the "href" attribute.

This meta tag creates a lot of confusion with webmasters. Here are some tips to help you determine if you need this tag or not:
  • If your website uses a large number of URL parameter that are dynamically generated, you may need to use canonical URL tags
  • If your website uses multiple domain names, inconsistent casing in URLs, or has a lot of URL rewriting, you may need to use canonical URL tags
  • If in doubt, your website probably doesn't need the canonical URL tag
The last point is the most important: The reality is that most sites do not need to use the canonical URL tag. It's only for websites that have a large number of URLs which may be used to access the same content. If your website is one of these you will see duplicate content warnings in the Google Webmaster interface.

One last note: If you are using canonical URLs on your website, Inspyder Sitemap Creator is the only sitemap generator that fully supports this tag. It will only include your canonical URLs (if present) in your sitemap. Sitemap Creator also logs when it encounters canonical URLs making it easy to troubleshoot crawling issues if you've made a mistake.

0 comments:

Post a Comment