Using canonical links to avoid duplicate content in Drupal

One potential SEO issue with Drupal sites is duplicate content. Until now, if you had clean url's and pathauto enabled, any node would be accessible through 2 different urls [1]. For example:

could be the same page as:

[1] actually there would also be the 'dirty' url version /?q=node/13

Using the Global Redirect module solves this problem by implementing a 301 redirect on the first example. Or you could disallow /node paths in your robots.txt. But now Google, Yahoo and Microsoft have embraced a new tag: the canonical links tag.

It looks like this:

<link rel="canonical" href=""/>

And should be placed in the header. The url is the preferred url for the current page. So you can place it on a page which is the same - or almost the same, small changes are acceptible - and a search engine will know this is a duplicate. Google will transfer any pagerank and other properties to the preffered page.

Global redirect patch
An unofficial patched version of the Drupal Global Redirect module was made available by Yoast yesterday. It provides an extra option where you can now choose if you want to use the 301 redirect or choose for canonical link tags.

However, the module is not perfect yet. From my experiments, the module uses the first alias you made for a node. If you make another, second alias, for a page and visit that page - you won't see the canonical link tag.

It would be nice if you could assign which alias is the preferred url. This way, you could make another alias page which lookes a bit different (for example different sidebar blocks) withouth being penalized by search engines.


Read More »


This is the company blog of
Drupal specialist

We are located in Breda (Netherlands) and build websites using Drupal. More about us.

Content on this blog is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Netherlands License.

Creative Commons License

Recent Comments