Tornado SEO

Canonical tag

By Thibault · Updated

Definition

A canonical tag is a link element, rel="canonical", that tells Google which URL is the main version of a page when several URLs show the same or very similar content.

Why does the canonical tag matter?

The canonical tag decides which URL gets indexed and shown when your content exists at several addresses. Duplicates come up all the time: HTTP and HTTPS versions, sorting and filtering parameters on category pages, separate mobile pages, or a demo site that crawlers can reach. Google groups these pages, picks one representative and crawls the others less often. If you don't tell Google which one you want, it chooses for you.

How does a canonical tag work?

You add the tag in the head of each duplicate page, pointing to the preferred URL. For example, a product page reached through example.com/shoes?color=red would carry <link rel="canonical" href="https://example.com/shoes">. For files that have no head, like PDFs, you can send the same signal in an HTTP header. Google recommends picking one of the two methods, since using both makes errors more likely.

Google treats the tag as a strong signal, but it remains a hint. In its own words, "indicating a canonical preference is a hint, not a rule." A permanent redirect is also a strong signal, and listing a URL in your sitemap is a weak one. When all of them point to the same URL, your choice is far more likely to win.

What mistakes break a canonical tag?

  1. Using relative URLs. Google supports them but recommends absolute URLs.
  2. Declaring one canonical in the tag and a different one in the sitemap.
  3. Blocking the duplicate in robots.txt, so Google can never read the tag.
  4. Using noindex to choose a canonical inside the same site.
  5. Changing the canonical with JavaScript instead of setting it in the HTML source.
  6. Linking internally to the duplicate instead of the canonical URL.

How do I check which canonical Google chose?

The URL Inspection tool in Search Console shows two fields: the user-declared canonical and the Google-selected canonical. If they differ, Google disagreed with you. The Google-selected value only appears for indexed results, not in the live test.

Thibault's take I treat a mismatch between those two fields as a symptom, never the problem itself. Google ignores your tag when your other signals contradict it: internal links pointing to the parameter URL, a sitemap full of variants, a canonical injected by JavaScript that the crawler never renders. Fix the signals first. Then make every page carry a self-referencing canonical, written as an absolute URL in the raw HTML. It takes an afternoon and it prevents years of messy indexing.

Frequently asked questions

Is a canonical tag a directive?

No. Google calls it a hint, not a rule. It is a strong signal, but Google can pick a different URL if your other signals contradict it.

Should a page have a canonical tag pointing to itself?

Yes, I recommend it. A self-referencing canonical protects the page when parameters or tracking codes create new URLs for the same content.

What is the difference between a canonical tag and a 301 redirect?

A redirect sends users and crawlers to the new URL, so the duplicate is no longer reachable. A canonical tag keeps both pages accessible and only tells Google which one to index. Use a redirect when you retire a page, and a canonical when the duplicate has to stay live.

Sources

  1. developers.google.com/search/docs/crawling-indexing/canonicalization
  2. developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
  3. support.google.com/webmasters/answer/9012289

Stay ahead of every search update

Google, ChatGPT, Gemini, Claude: what changed, why it matters, and what to do about it. Every morning, in 3 minutes, free.

What the...?