Skip to main content

Canonical Tags at Scale

· 11 min read
Indexation audit for large websites

There is a particular silence in a site review where canonicals should have been discussed. Nobody argues about canonical tags because the template sets them, the template has always set them, and the tag is present on every page. Presence is not correctness. A canonical tag is a claim about which of your URLs is the real one, and on a large site a large share of those claims are false in ways nobody has checked.

The failure mode is not that the tag is missing. It is that the tag is wrong, confidently, at scale, and the wrongness is self-reinforcing because it was copied from a pattern that was already broken.

What a canonical tag actually does​

A canonical tag is a hint. It tells the crawler which URL in a set you consider the primary version. It is a signal among several, and Google treats it as one of the strongest, but it is still a hint. Google will follow it, ignore it, or follow it to a different URL, and it will tell you which of those happened if you look.

Three things a canonical tag does not do, which are the three most common misunderstandings:

  • It does not move a page. If you set a canonical on a page that is not indexed, that page stays not indexed. The tag is a pointer, not a request.
  • It does not consolidate traffic by itself. A canonical signal and the actual redirects are separate mechanisms. If the canonical is right and the redirect is wrong, users who land on the wrong URL experience the wrong URL.
  • It does not resolve itself across hosts. A canonical pointing to a different domain is treated as a suggestion. If that domain cannot serve the URL, the suggestion is simply wrong.

Everything that follows is a consequence of that first point: the tag is a claim, and claims need checking.

Self-referencing canonicals that are wrong​

A self-referencing canonical is the normal case. The page says it is the primary version of itself, and that is correct whenever the page is genuinely the primary version.

It stops being correct in several common situations:

  • The page is a filtered or parameterised view of a page that already exists. The canonical correctly points at itself and the self-reference is the bug. The URL should not exist at all, or should point at the unfiltered page.
  • The site was templated from a page that was never primary. A category template built as a copy of a promotional landing page inherits a self-reference and inherits the promotion's thin content. Every instance now claims primacy.
  • The page duplicates another page on the same site with a different path. Two genuine originals, both self-referencing. Google has to pick. It picks by its own signals, and your tag competes with them rather than overrule them.
  • The page has a trailing slash variant, a www variant, an index file variant or an uppercase variant. Four URLs, four self-referencing canonicals, one real page. Pattern shape keys such as trailing slash and www prefix are where this hides.

The last case is worth dwelling on because it is entirely mechanical. If your site serves the same page at four URLs and all four carry a self-referencing canonical, you have not declared a primary version. You have declared that there are four. Google will resolve it, probably correctly, and will then carry the tie-breaker forward as a signal against your whole section.

Canonical chains​

A chain is what happens when a canonical points at a URL whose canonical points somewhere else. The classic version runs through the templates:

page-a points at page-a?ref=newsletter, which points at page-a, which points at page-a. Or, across a migration: the old host points at the new host with one path form, the new host canonicalises that form to a second path form, and the second path form points at the final one.

Chains waste signal. Google follows the hop, and each hop is another chance for the trail to go cold, for a redirect to intervene, or for the chain to terminate at something you did not intend. More importantly, a chain is nearly always a symptom. Something upstream is generating URLs that need cleaning before canonicals are even relevant. Sitemap pruning and canonical work tend to be found together because both are downstream of the same URL generation problem.

If you find chains, fix the upstream generation first. A canonical chain that runs through a URL you are about to retire will resolve itself once the URL is retired.

Canonicals that point cross-host​

The canonical tag is valid across hosts, and Google follows cross-host canonicals more reliably than most SEO folklore suggests. It is also the easiest place to cause real damage, because the consequence is not a small error. A canonical from your primary domain to an unrelated domain is a signal that your page is the duplicate and theirs is the master.

The situations where cross-host canonicals appear legitimately:

  • A domain migration, where the old host canonicalises to the new one for every equivalent page.
  • A large multi-subdomain estate consolidating onto one host.
  • A syndicated or licensed content arrangement where the licence holder holds the canonical.
  • A staging or preview host that is publicly reachable and canonicalises back to production.

The situations where they appear by accident:

  • A theme or plugin that reads a site setting and emits the wrong value for one locale, one template or one legacy path.
  • A headless setup where the frontend and the CMS disagree about the site URL.
  • A default value in a staging environment that got promoted.

The audit question for every cross-host canonical is simple: does the destination host serve that URL, and does it agree that it is the primary version? If the answer is no, the tag is a bug with a large blast radius, because the damage scales with the size of the source section.

When Google picks a different canonical​

Here is the part that makes canonical auditing tractable. Google reports the URL it actually chose as the canonical for a URL it has indexed. You can compare that against the canonical the page declares.

Where they agree, you have confirmation. Where they disagree, you have the strongest duplicate signal available to you, because it comes from Google's own selection process rather than from a rule you wrote.

Two distinct disagreements matter and they need different responses:

Google picks the declared target anyway. The tag is working. This is the only fully settled case, and it should be common.

Google picks a different URL. Either your declaration is pointing at a page that is itself weaker than the page it was declared on, or the declaration is being ignored because Google has its own evidence. Either way, the difference between what you declared and what Google chose is a finding. It is not proof your tag is broken, but it is proof the pair does not match, and a mismatch on the same pattern across hundreds of URLs is a systemic issue rather than a rounding error.

PruneSEO keeps this comparison in its own triage bucket, labelled Link bleeders (suspected duplicates). It is worth being clear about what that label means: the bucket is inferred by comparing Google's chosen canonical against the page's own declaration. Google does not return a duplicate verdict of its own, so this is an inference. It is a well-founded one, and it is an inference.

Auditing without opening every URL​

You cannot inspect 500,000 canonicals one at a time, and you should not try. The URL Inspection quota is 2,000 per property per day, so a full pass over a large site takes roughly fifty days. That is a crawl of canonicals by brute force, and it is the wrong shape for the problem.

The workable sequence is much cheaper:

  1. Group first. Crawl the site and cluster URLs into patterns. Trailing slash, tracking parameter, index file, file extension, www prefix, and the facet parameters your templates emit. You cannot audit the canonical policy of a site you have not grouped.
  2. Sample one pattern, not one URL. A pattern of 250 URLs or fewer can be audited in full. Above that, a sample sized to your required precision is enough. At 95% confidence and plus or minus 10 percentage points you need 97 URLs; at plus or minus 15 points you need 43.
  3. Compare three values per sampled URL. The declared canonical, the self-reference implied by the request URL, and the canonical Google reports. Two of the three matching tells you very little. All three matching tells you a lot.
  4. Only then decide. A pattern where Google consistently chooses a different canonical is a rewrite job on the template, not a hundred tag edits.

The grouping step is where the leverage is. Measured on three real sites, clustering collapsed 162,000 URLs into two to five clusters. Five templates account for the canonical behaviour of 162,000 pages. Fixing five templates is a morning.

The canonical manifest​

The output of that process should be a file your developer can read, not a list you read out over a call. A canonical manifest is one row per URL, with the observed values beside the decision. The important design choice is what happens when the destination cannot be determined with confidence.

PruneSEO leaves the destination blank rather than guessing. A blank target in a manifest means a human needs to decide. That is deliberate: an invented canonical target is worse than a missing one, because a missing one gets a conversation and an invented one gets applied.

url,observed_self_canonical,declared_target_host,declared_target_path,google_chosen_canonical,verdict,note
https://store.example/products/chair-01,https://store.example/products/chair-01,store.example,/products/chair-01,https://store.example/products/chair-01,confirm,"self-referencing and confirmed by Google"
https://store.example/products/chair-01?finish=oak,https://store.example/products/chair-01,,,https://store.example/products/chair-01,rewrite,"declared target uses a parameter the target does not recognise"
https://store.example/collections/chairs?colour=oak,https://store.example/collections/chairs,store.example,/collections/chairs,https://store.example/collections/chairs,rewrite,"facet page self-references instead of pointing at the parent collection"
https://eu.store.example/products/chair-01,https://store.example/products/chair-01,,,https://store.example/products/chair-01,manual-review,"cross-host canonical, source host not in the declared domain list, destination left blank"
https://old.example/products/chair-01,https://store.example/products/chair-01,store.example,/products/chair-01,https://store.example/products/chair-01,confirm,"staged domain migration, source host retired in full"
https://store.example/products/chair-01/,https://store.example/products/chair-01,store.example,/products/chair-01,https://store.example/products/chair-01,rewrite,"trailing slash variant self-referencing, sibling is the indexed version"

Six rows, six different situations, and four distinct verdicts. In the fourth row the destination is empty on purpose. The manifest says what was observed and declines to say what should happen, because the answer depends on a commercial decision about two hosts that an audit cannot make.

Note also what the manifest does not contain. There is no confidence percentage, because confidence is a property of the pattern sample rather than of an individual row. There is no verdict column saying indexed or not indexed, because a canonical does not control that. The file describes canonicals. It does not claim to predict outcomes.

What to do next​

Run one crawl with grouping on, and export the patterns before you look at anything else. Then pick the largest pattern, sample it at the precision your report needs, and compare the three values. Do that for five patterns and you will almost certainly have found the template responsible for most of your canonical behaviour.

The audit is not the hard part. The hard part is resisting the urge to edit tags one page at a time, which fixes the sample and leaves the pattern exactly as broken as it was.