InsightsTechnical SEO

Canonical tags: the rules that actually matter

A canonical tag tells Google which URL is the real one when a page is reachable at several addresses. Get it wrong and you split your ranking signals or deindex the wrong page. Here are the seven rules, and how generated apps break them.

Aug 8, 2026 · 6 min read

The same page is almost always reachable at more than one URL: with and without www, with a trailing slash, with ?ref= tracking parameters, over http and https. To a search engine those are different pages with identical content, and it has to guess which one to rank. A canonical tag removes the guess.

html
<link rel="canonical" href="https://yourapp.com/pricing">

What it does

The canonical tag names the one URL that should be indexed. Google consolidates the ranking signals from every duplicate onto that URL, and shows it in results. Get it right and link equity concentrates; get it wrong and it scatters, or points Google at the wrong page.

The seven rules

  • Every indexable page has one. A page with no canonical leaves the choice to Google. A page with two canonical tags is ignored — it picks neither.
  • Point it at itself. On a normal page the canonical should be that page's own clean URL. This is the single most common omission in generated apps.
  • Use an absolute URL. https://yourapp.com/pricing, not /pricing. A relative canonical is resolved against the current URL, which defeats the purpose when the page is served at a variant address.
  • Match your sitemap. The canonical URL and the URL you list in sitemap.xml must be byte-for-byte the same — same protocol, same host, same trailing-slash choice.
  • Never canonicalize to a redirect or a `noindex` page. That tells Google to index a page you've told it to drop, so it distrusts the signal entirely.
  • Keep it consistent with your redirects. If you 301 www to the bare domain, the canonical must use the bare domain too. Contradicting signals get ignored.
  • Don't canonicalize paginated or filtered pages to page one. Page 2 of a list is its own page; canonicalizing it to page 1 hides its content from the index.

How generated apps break it

A single-page app injects <head> tags with JavaScript after load. If the canonical is added client-side, the crawler's first pass — which reads the raw HTML — sees no canonical at all. And because SPAs swap routes without a full page load, a stale canonical from the previous route can persist, so every page claims to be the homepage.

MistakeWhat Google doesFix
No canonical on any pageGuesses; may index a parameterized duplicateAdd a self-referencing canonical per route
Relative href (/pricing)Resolves against the wrong variant URLUse the absolute https URL
Same canonical on every route (SPA leak)Indexes only the homepageUpdate the tag on each route change
Canonical ≠ sitemap URLTreats them as competing pagesMake both identical

How to verify

  1. 1

    Read the raw HTML

    View Page Source (not Inspect) and search for rel="canonical". If it's absent there but present in the rendered DOM, it's being added too late for the crawler's first pass.

  2. 2

    Check a few variant URLs

    Load the page with ?ref=test and a trailing slash. The canonical should be the same clean URL on all of them.

  3. 3

    Cross-check the sitemap

    Confirm the canonical URL matches the entry in sitemap.xml exactly, including protocol and trailing slash.

One caveat

A canonical is a hint, not a command. Google usually honors it, but if your internal links, sitemap and redirects all point somewhere else, it will trust the majority signal over the tag. Keep them aligned.