The same page can usually be reached at more than one address. Add a tracking parameter, an uppercase letter, a trailing slash, a print view or a session id and you have another URL serving the same content. A canonical tag is how you tell a search engine which one of those addresses is the real one.

<link rel="canonical" href="https://example.com/shoes/running">

It is a hint, not an instruction

This is the part that explains nearly every confusing outcome. A canonical tag does not force anything. Google treats it as one signal among several when it decides which URL to index — alongside internal links, the sitemap, redirects, hreflang and which version looks more like the page people actually land on.

When those signals agree, the canonical is honoured almost every time. When they disagree, Google picks the URL it finds most convincing, and that can be one you did not nominate. Search Console will then report the page with a user-declared canonical and a different Google-selected one.

If your canonical is being ignored, the useful question is almost never "why is the tag not working". It is "what else on this site is pointing somewhere else".

What it is actually for

Consolidation. Duplicate URLs split the signals a page has earned: links land on three variants, and each is weaker than the one page would have been. A canonical merges them, so the nominated URL is credited with the lot.

Worth saying plainly, because the phrase frightens people: there is no duplicate content penalty. Ordinary duplication is a clarity problem, not a punishment. The cost is that the search engine picks for you, and it may not pick the URL you want.

Self-referencing canonicals

Every indexable page should carry a canonical pointing at itself, in absolute form. It costs nothing and it settles the parameter question before it arises — someone shares your page with a campaign tag appended, and the tag on the page says which address to credit.

Six ways it goes wrong

  • Every page canonicalised to the homepage. Usually a template that hard-codes the site root. The tag says, on every page, "this is really the homepage", and the site disappears from search except for one URL. It is the most damaging version of this mistake and it looks tidy in the source.
  • Canonical plus noindex on the same page. Contradictory: one says "index this other URL instead", the other says "index nothing here". Google has to guess, and the risk is the noindex propagates to the URL you were consolidating onto. Pick one.
  • Canonical pointing at a redirect, a 404 or a blocked URL. The nominated page must be the final, reachable, crawlable address. Nominating a URL that redirects makes the engine resolve a contradiction you could have resolved yourself.
  • Relative URLs, or the wrong protocol and host. href="/shoes" mostly works and occasionally does not; http:// or a www variant that redirects is a slower way of saying the same thing. Use the absolute, final URL.
  • Signals that contradict the tag. The sitemap lists variant B, every internal link points at variant B, but the tag on both says variant A. Two of the three signals disagree with you.
  • More than one canonical tag on a page. Frequently a plugin and a theme each adding their own. Google ignores all of them and decides on its own.

Canonical or redirect?

If a URL should no longer exist, redirect it. A redirect is a directive: it removes the old address and sends every visitor to the new one. A canonical is for when both addresses must keep working — a product reachable through two categories, a page with tracking parameters, a printable version — but only one should be indexed.

Cross-domain canonicals are legitimate for syndication: a partner republishing your article can canonicalise to your original, so the credit stays with you.

Checking it

Read the canonical the way a crawler does, not the way the template was written. Confirm each page has exactly one, that it is absolute, that it resolves with a 200 rather than a redirect, and that the sitemap and internal links nominate the same address. Where hreflang is involved, every language variant must canonicalise to itself — a set of pages all canonicalised to the English version is the fastest way to lose the other languages.