Outrings
Search engine optimisation

What is a canonical URL and why does it matter?

It tells search engines which version of a page is the real one. Get it wrong and you can de-index your own site.

3 min read
Short answer

A canonical tag names the preferred URL for a page when the same content is reachable at several addresses. It consolidates ranking signals onto one URL. Pointed at the wrong page it does the opposite, and a canonical pointing every page at the homepage will remove the entire site from the index.

The problem it solves

The same page is routinely reachable at many URLs without anyone intending it:

https://example.com/page
https://example.com/page/
https://www.example.com/page
http://example.com/page
https://example.com/page?utm_source=newsletter
https://example.com/page?ref=twitter

To a search engine these may be six pages with identical content. Links pointing at different variants split the authority six ways, and the engine has to guess which to show. The canonical tag removes the guess.

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

Rules that keep you out of trouble

  • Always absolute. Include the scheme and host. A relative canonical is legal and much easier to get wrong.
  • Self-referencing by default. Every page should declare itself canonical unless there is a specific reason not to. This is the safest possible configuration.
  • One per page. Multiple canonical tags cause the whole set to be ignored.
  • Point at a page that returns 200. A canonical to a redirect or a 404 is ignored, or worse, followed.
  • Consistent with your redirects. If you redirect to www, canonicalise to www. Contradicting yourself wastes crawl budget and confuses consolidation.

How people break their own sites with it

MistakeConsequence
Every page canonicalises to the homepageThe entire site drops out of the index except the homepage. This is the catastrophic one.
Canonical still points at stagingSearch engines are told the real page lives on a domain they cannot reach.
Paginated pages canonicalise to page 1Pages 2 onward are never indexed, so their content is invisible.
Canonical to a redirecting URLThe signal is muddled and often discarded.
Canonical set by JavaScriptCrawlers that do not render see no canonical, or the wrong one.
A canonical is a hint, not an instruction. Google can and does ignore one it considers wrong — for example when the two pages are clearly not duplicates. Do not use it to try to consolidate pages that genuinely differ; use it for what it is, which is naming the preferred address of the same content.

When to use something else

  • Permanently moved content: use a 301 redirect. A canonical is not a redirect and does not send users anywhere.
  • Pages that should never be indexed: use noindex. A canonical does not keep anything out of the index.
  • Genuinely different pages: use nothing. Let them stand on their own.
  • Cross-language versions: use hreflang, with each language self-canonical. Canonicalising translations to the English page removes them from their own markets.

What our audit reports about this

Every item below is measured directly, not inferred. Run it against your own site and the result names the exact rule or header responsible.

  • Whether a canonical is present, absolute, and pointing at the page itself.
  • Whether more than one canonical tag is declared.
  • Whether the canonical target resolves to a 200 rather than a redirect or an error.
  • Whether the canonical is server-rendered or set by JavaScript.

For agents and scripts, the same measurement is at /api/v1/seo?url=yoursite.com — see the API documentation.

Related questions

Do I need a canonical on every page?

It is good practice and costs nothing. A self-referencing canonical protects you from parameter-based duplicates you did not anticipate, which is most of them.

Can a canonical point to another domain?

Yes — cross-domain canonicals are valid and are the correct tool for syndicated content, telling engines the original lives elsewhere. Use it deliberately; it hands the ranking to the other domain.

Does a canonical stop a page being indexed?

No. It expresses a preference about which URL represents the content. To keep a page out of the index, use noindex, and do not combine the two on the same page — the signals conflict.

Read next

All 50 guides · How every check works · API for agents