When there are multiple URLs associated with one particular piece of content, duplication occurs. Canonical tags are used to help search engines understand which URL has authority over others. This increases the likelihood of important pages being crawled, indexed, and ranked.

If the different URLs need to be accessible (e.g. navigation paths, parameters URLs, session IDs, etc.), using canonical tags helps identify which URL is the canonical, authoritative version so equity can be consolidated to one URL. This can lead to stronger pages and better rankings.

If the website configuration generates duplicate URLs that do not need to be accessed by users or search engines, 301 redirects should be implemented to automatically send visitors and crawlers to the authoritative version of the page.

Implementation of the canonical tag

The rel="canonical" tag must appears in the <head> section of the HTML page. Note that the href attribute-value pair needs to be the fully qualified domain name (or "absolute" URL).

Code example

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

Alternatively, the tag can be implemented as an HTTP response header. This is particularly useful for instances like PDFs.

In the HTTP response header of a .pdf document

HTTP/1.1 200 OK
Content-Type: application/pdf
Link: <>; rel="canonical"

Self-referencing canonical tags

As a rel attribute of a <link> element, the canonical tag establishes a relationship between two URLs.
For example, page A and page B serve identical (or nearly identical) content, page A is the authoritative version and both need to be accessible.
Page B should include the following tag pointing to page A:

In the <head> section of page B

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

Additionally, in order to re-enforce the signal sent to search engines, page A should include a self-referencing canonical tag (pointing to itself).

In the <head> section of page A

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

Related Topics

Duplicate Content

Duplicate content refers to identical (or nearly identical) content that appears on websites under more than one URL and present major SEO issues. There are different types of duplication and therefore different ways to resolve it.

Learn more about duplicate content


In instances of paginated series, rel="prev" and rel="next" tags should be used in order to consolidate equity of individual pages into one URL and resolve eventual near-duplication.

Learn more about rel="prev/next"

Disqus Comments