Glossary

Canonical URL

A canonical URL is the address a page declares as the authoritative one for its content, using `<link rel="canonical" href="…">`. It exists because the same content is often reachable at several addresses — with tracking parameters, with or without a trailing slash, under two categories — and search engines need to know which one to index. It is a hint that search engines usually follow and may override when other signals disagree.

What it does

It consolidates: search engines index the canonical URL and attribute the signals of the duplicates to it.

It does not block crawling. The duplicate URLs are still fetched.

It does not remove a URL from the index on its own, and it is not a substitute for a redirect. A URL that should not be reachable should redirect.

It is one signal among several. Internal links, sitemap entries and redirects all contribute, and a canonical that contradicts them is often ignored.

The rules that keep it working

Absolute URLs. A relative canonical resolves against the current host, so each host declares itself canonical — which defeats the purpose on a site answering at several addresses.

One per page. Two canonical tags are ambiguous, and search engines may disregard both.

Point at a URL that returns 200. A canonical pointing at a redirect or a 404 is an explicit instruction to consolidate onto something that does not work.

Self-reference by default. Every page declaring its own URL as canonical is a cheap default that removes the tracking-parameter problem entirely.

Canonical or redirect

Redirect when the duplicate address should not be reachable: an old path, a protocol variant, a host variant.

Canonical when the address must keep working but should not compete: a URL with a tracking parameter, a filtered view of a listing, a print version.

Both, in sequence, is common and correct: redirect the structural duplicates, canonicalise the functional ones.

How to observe it

`document.querySelector('link[rel=canonical]')?.href` in the console, or a search for `rel="canonical"` in the source.

Then test the variants: add a dummy parameter, toggle the trailing slash, try the other host. Each should either redirect or declare the same canonical.

A canonical may also be sent as an HTTP `Link` header, which is the usual mechanism for non-HTML resources such as PDFs.

Where it goes wrong at scale

Faceted navigation. A listing filtered by colour, size and price generates a combinatorial number of URLs, each with the same products in a different order. Canonicalising every combination to the unfiltered listing is the usual answer — except where a filtered view is genuinely a page people search for, which then wants to be canonical to itself.

Pagination. Page two of a listing is not a duplicate of page one, and canonicalising it to page one tells search engines to ignore everything it contains. Each page should be canonical to itself.

Templated canonicals. A template emitting the same canonical for every page in a section collapses the whole section onto one URL. This is rare, catastrophic, and easy to miss because each page looks correct in isolation.

Staging environments. A canonical hardcoded to the production domain is right in production and is a cross-domain signal from staging; one hardcoded to staging and shipped is the reverse, and considerably worse.

The pattern behind all four: a canonical is written once in a template and applied to thousands of pages, so an error in it is never a single-page error.

Frequently asked questions

Is a canonical tag an instruction or a suggestion?
Google documents it as a strong hint. It is generally respected, and it can be overridden when internal links, sitemaps and redirects consistently point somewhere else.
Can a page canonicalise to another domain?
Yes — cross-domain canonicals are supported and are the standard mechanism for syndicated content, telling search engines to credit the original publisher.
Does a canonical stop a page being crawled?
No. The duplicate URLs are still fetched. If you need crawling to stop, that is robots.txt; if you need indexing to stop, that is a robots meta tag.

Sources

Related

VeriFixScan crawls a site and applies its checks to every page it reaches, keeping the evidence behind each finding. Scanning one website is free.

Scan a website