Volver al blog
Canonical Checker8 min de lectura18 de abril de 2026

Canonical Tag: Complete Implementation Guide

The canonical tag is the primary tool for managing duplicate content and consolidating PageRank. Learn when to use it, how to implement it correctly, and the mistakes that can nullify its effect.


The canonical tag (<link rel="canonical">) is a signal you send to Google to indicate which is the "official" version of a page when it exists at multiple URLs. It is the primary tool for managing duplicate content without removing URLs and for consolidating PageRank dispersed across variants of the same page.

Correct canonical tag syntax

html
<!-- Canonical tag in the <head> of the page -->
<head>
  <!-- ... other meta tags ... -->
  <link rel="canonical" href="https://example.com/canonical-page/" />
</head>
  • The canonical URL must always be absolute (with protocol and domain), never relative.
  • The tag must be in the HTML <head>, before the closing </head>.
  • There can only be one canonical tag per page — if there are multiple, Google uses the first or ignores them all.
  • The canonical URL must be a URL that returns 200 OK, not a URL that redirects.

Self-referential canonical: why all pages should have one

A self-referential canonical is a canonical tag on a page that points to itself. Example: on https://example.com/page/, the canonical tag points to https://example.com/page/. This seems redundant, but it is a best practice for two important reasons.

  • It prevents Google from choosing an unexpected variant (with UTM parameters, with different trailing slash) as the canonical if someone links to that variant.
  • It explicitly confirms to Google the exact URL of that page (with or without trailing slash, with or without www).

When to use canonical vs. 301 redirect

SituationUse canonicalUse 301 redirect
Duplicate URL that must remain accessible✅ Canonical❌ Not applicable
Duplicate URL that can be removed⚠️ Less optimal✅ 301 redirect
UTM parameters that do not change content✅ Canonical on the variant❌ Would break tracking
HTTP version of the site (you have HTTPS)⚠️ Less optimal✅ 301 redirect
Syndicated content on another domain✅ Cross-domain canonical❌ Not applicable
Definitive and permanent URL change⚠️ Less optimal✅ 301 redirect

The 301 redirect is more deterministic than the canonical — Google always follows it. The canonical is a "strong suggestion" that Google can ignore if it considers another URL more appropriate. When you can use a 301, use it.

Cross-domain canonical: how to consolidate authority across domains

Cross-domain canonical allows a page on one domain to signal to Google that the canonical version is on another domain. It is valid and Google respects it. The main use case is content syndication: if you publish the same article on your blog and on an external publication, the publication can add a canonical pointing to your domain.

html
<!-- On the syndicated article at external-publication.com -->
<link rel="canonical" href="https://your-domain.com/original-article/" />

<!-- This tells Google: the main version of this content
     is at your-domain.com, do not index this version -->

Canonical in the HTTP header: for non-HTML resources

For PDFs, images, and other non-HTML resources where it is not possible to add a tag in the <head>, you can implement the canonical as an HTTP header in the server response. Google processes it the same way as the HTML tag.

apache
# In Apache .htaccess: add the Link header for PDFs
<FilesMatch "\.pdf$">
  Header set Link "<https://example.com/documents/original.pdf>; rel=\"canonical\""
</FilesMatch>

Canonical errors that nullify its effect

  • Canonical points to a URL that returns 404 or that redirects — Google cannot process the canonical if the destination is not accessible.
  • Canonical points to a URL with noindex — contradicts the signal; Google may ignore the canonical or the entire page.
  • Chained canonicals: A has canonical → B, B has canonical → C. Google ignores chained canonicals and determines the canonical by its own criteria.
  • Multiple canonical tags on the same page — only the first is processed, or they may cancel each other out.
  • Canonical with relative URL — can be interpreted incorrectly depending on the page's base URL.

Verify the canonical on your most important pages

iRankly's Canonical Checker analyzes up to 50 URLs at a time, detects whether the canonical is in HTML or in an HTTP header, checks whether it is self-referential or points to another URL, identifies cross-domain canonicals, and flags configuration issues such as URLs that return errors.

Prueba la herramienta gratis

Canonical CheckerAnaliza tus URLs con {tool} de iRankly. Sin registro, sin tarjeta.

Usar herramienta gratis

Prueba la herramienta gratis

Analiza tus URLs con Canonical Checker de iRankly. Sin registro, sin tarjeta.

Usar herramienta gratis