Canonical Link Element and when to use it

canonical link element is an HTML element

In February 2009, Google and Yahoo announced support for canonical link element (rel=canonical tag). You can use it in the head section of the web page and allows developers to avoid the issue of duplicate contents.

How to Use  rel=”canonical” or Canonical Link Element

rel=”canonical” (canonical link element) is a quick way to fix the duplicate content issue on your site, if you  site is generating multiple URL for the same content, then it can be really very helpful.

Here are some examples of the multiple URL pointing to the same URL.

So a canonical link element that references the main page,, should be placed in the head section of all of the above pages.

Here is an example of rel=”canonical” in action

example of rel="canonical" in action


Difference between rel=”canonical” and 301 Redirect

301 redirect takes the visitors to the canonical page. But, rel=”canonical” (canonical link element) is strictly for the Search engine to tell them that which version of the page to show in the search result.

Use 301 redirects when you want to remove the Duplicate version of the page. And you want the site visitors to be directed to the actual page. Where rel=”canonical” will help the search engine, in case you want to use both the version, but by using rel=”canonical” you can tell search engine which page to index in search result.

When to Use the Canonical Link

You should use rel=”canonical” to every page single page of your site that is not canonical.

E-commerce site:  Once your customer sorts the products for example with sort by price, you don’t need new URL in Search Engine.

Quick Tips to use rel=”canonical”

  • You can use it in both ways, relative or absolute way. But the preferred method uses the absolute path, to minimize the confusion.
  • You can include a different URL then your site and Search Engines will try to use it at their best.
  • Never point all your pages to your home page as the canonical page. If you do so, every page, even if it is not identical, will be removed from indexing.
  • Avoid using this tag in a template. If you use it in a template, all the child pages become canonical, and might get disappeared from the search results.
  • Also, don’t use it for the pagination, as the listed items are not identical,

Example of Canonical Link Element

For the T-shirt catalog, you can have multiple T-shirts, and you are showing 10 of them on one page, so you will get pagination like below.

and so on.

So if you add the canonical reference to the second page of the pagination, the search engine will remove the page 2 and later pages from the indexing, but these pages were not duplicate.

Use rel=”canonical in the <head> section of the page, not in the <body>. If search engine will find it in the body tag, they will simply ignore it.

Useful Links for Canonical Link Element

Google Webmaster Central

RFC Link: