The same content is often reachable at more than one URL: with and without www, with and without a trailing slash, with tracking parameters, through a product filter, or printed under two categories. A canonical tag tells search engines which of those URLs is the one you want indexed and shown in results:

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

It goes in the page’s <head>. For files without HTML, such as PDFs, the same signal can be sent as an HTTP header: Link: <https://example.com/guide.pdf>; rel="canonical".

What a canonical tag does, and doesn’t do

Google treats the canonical tag as a strong hint, not a command. It weighs the tag alongside redirects, internal links, sitemaps and HTTPS, and picks the canonical URL itself. When those signals agree, it almost always follows your tag. When they contradict each other, it may not, and Search Console will show “Google chose different canonical than user”.

A canonical doesn’t remove the duplicate URL from the web or stop it being crawled. It consolidates the duplicates’ signals onto one URL in the index.

When to use one

  • On every indexable page, pointing at itself. A self-referencing canonical costs nothing and protects the page from versions with tracking parameters or odd capitalisation that other sites link to.
  • On variants, pointing at the main version. Sorted or filtered listings, printer-friendly pages, and the same product reachable under several category paths.
  • Across domains, when you syndicate an article and the copy should credit the original.

Mistakes that make Google ignore your canonicals

Pointing at a broken or redirecting URL

A canonical that leads to a 404, a 500 or a redirect tells search engines the preferred version doesn’t work. Google discards the hint, and in the worst case the working page is treated as a duplicate of a dead one. Every canonical should point at a URL that answers 200 directly.

Chains and loops

If page A canonicalises to B, and B canonicalises to C, Google doesn’t reliably follow the chain to C; it treats the hint as weak and picks its own winner. A loop (A → B → A) has no answer at all. Point every duplicate straight at the final URL.

Relative or malformed URLs

href="/shoes/" is allowed, but easy to get wrong when the page is served from more than one host or path. Use the full absolute URL, with the right protocol and host.

Conflicting signals

  • A canonical pointing at a page that is noindex: you are asking Google to index a page you also asked it not to index.
  • A sitemap that lists the duplicate rather than the canonical URL.
  • Internal links that consistently point at the non-canonical version.
  • Two canonical tags on one page, often one from the theme and one from an SEO plugin. Google may ignore both.

Every paginated page canonicalised to page 1

Page 2 of a category isn’t a duplicate of page 1; it lists different items. Canonicalising it to page 1 can stop the items on later pages being found. Give each page in a series a self-referencing canonical.

Using canonicals instead of redirects for host duplicates

If www.example.com and example.com both serve the site with status 200, a canonical tag helps, but search engines still see two sites. Redirect one host to the other with a 301, and keep the canonical as a backstop.

How to check your canonicals

View a page’s source and search for rel="canonical", or use URL Inspection in Search Console to see which canonical Google selected. To check a whole site you need a crawl that reads every page’s canonical and then fetches the URL it points at. SEO Audit Hub reports missing canonical tags, canonicals that point at broken or malformed URLs, canonical chains and loops (it follows up to five steps), and sites where www and non-www both answer 200.

A quick rule of thumb: every indexable page should canonicalise to itself or to one other page that returns 200, is indexable, and canonicalises to itself.