Thursday, March 4, 2010

Drupal and Canonical Urls

In Google each unique URL is indexed as a separate page. So if we have a URL: and will be indexed as separate URLs! This is a disadvantage as Google thinks we are trying to duplicate content and have multiple URLs to the same HTML content.

This is reflected in the Google Webmaster, under Diagnostics - HTML suggestions. In the webmaster HTML suggestions google points out that URL:, have the same title tag. Each URL in our site should have a unique title tag.

To address this we can add a meta information in our page headers to inform Google that our main parent URL is, and all clicks to any other '?page links' to be added to the parent URL. This is done by using Google's Canonical meta tags, refer:,

The Canonical meta information on our  page should be: href="" rel="canonical" inside link Tag.

It's not sufficient to enable Clean URL and Path auto, Global redirect modules. We must also configure our comments, View pagination, Page pagination, Auto title CCKs to have appropriate Canonical URLs to avoid getting penalized for Duplicate content and improve our site ranking.

Canonical URL integration is available in Drupal 6.0 Meta module. In Drupal 5.x there is no ready made integration. You can embed a small piece of code in the template file to achieve the same.