Canonical Tags: How rel=canonical Works and How to Use It
A canonical tag is a hint, not a rule. Point it at a live, indexable 200 URL — never at a redirect, a noindex page, or your homepage. Use self-referencing canonicals.
A canonical tag tells Google which URL is the representative version among duplicates. It is a hint, not a rule — Google weighs it against every other signal before choosing. To make the hint count, point every canonical at an absolute, live 200 URL that is not noindex and not blocked, and give each page a self-referencing canonical. Most canonical problems are a canonical pointing somewhere it should not.
What canonicals do
When several URLs serve substantially the same content, Google picks one to index and rank — the canonical — and consolidates the others' signals onto it. Declaring rel="canonical" is how you nominate your preferred URL:
<link rel="canonical" href="https://example.com/dresses/green" />
For non-HTML files you can send the same signal in an HTTP header:
Link: <https://www.example.com/paper.pdf>; rel="canonical"
Canonicalization is a hint because Google evaluates competing signals and may override you. In rough order of strength: a 301/permanent redirect, then rel="canonical", then HTTPS-over-HTTP preference, hreflang clusters and consistent internal links, and finally sitemap inclusion (weak). These stack. If your internal links, sitemap, and canonical all name the same URL, the hint is far more likely to be honored than if they disagree.
Self-referencing canonicals
Every indexable page should declare a canonical pointing at itself. This is not redundant. A self-referencing canonical resolves ambiguity around tracking parameters, session IDs, trailing slashes, and protocol or host variants — it states plainly "this exact URL is the one to index." A page missing its canonical altogether leaves Google to infer the representative URL from weaker signals, which invites duplicate-selection surprises. Crawlinx flags the absence as canonical.missing and a canonical that points away from the page it sits on as canonical.non_self — sometimes correct, but worth confirming.
A frequent duplication trap is the same content reachable over multiple protocol or host variants — http and https, www and non-www — each serving itself as canonical. Consolidate to one variant with 301 redirects and consistent canonicals; Crawlinx flags the split as duplicate.protocol_host.
Common mistakes
Canonical to a redirect. Pointing the canonical at a URL that itself redirects hands Google a contradiction: the tag names URL A, but A forwards to B. The extra hop dilutes the signal and makes Google more likely to ignore your hint and choose its own canonical. Point at the final 200 destination. Crawlinx flags this as canonical.to_redirect.
Canonical to a noindex page. You are telling Google "index this other URL" while that URL says "do not index me." The two directives fight, and the consolidation you wanted does not happen cleanly. A canonical target must be indexable — no noindex, not robots-blocked. Crawlinx flags this as canonical.to_noindex.
Canonical to the homepage. Pointing many distinct pages at the homepage tells Google those pages are duplicates of the homepage, which they are not. Google typically ignores an obviously wrong canonical, so at best it is a no-op; at worst it suppresses pages you wanted indexed.
Cross-domain canonicals done carelessly. Cross-domain canonicals are supported and legitimate — syndicating content to a partner and canonicalizing back to your original is a valid use. The mistake is canonicalizing across domains by accident (a staging domain leaking into production tags, for instance), which can hand your rankings to the wrong host.
Canonicalizing paginated pages to page one. Page 2 of a listing should carry a self-referencing canonical to page 2, never to page 1 — the pages are not duplicates. Google dropped rel="next"/"prev" support in 2019; the current pattern is a unique URL and self-canonical per page.
Canonical versus noindex
These solve different problems and should not be swapped.
- Canonical consolidates duplicates: several URLs, one indexed, signals merged. The other URLs may still be crawled and can still appear if Google disagrees — it is a hint.
- noindex removes a page from results outright. It is a directive, not a hint, but the page must stay crawlable for Google to read it.
Use a canonical when pages are genuine duplicates and you want their combined authority on one URL. Use noindex when a page simply should not appear in search. Do not canonicalize a page you actually want gone — that is what noindex is for.
JS-injected canonicals
Prefer setting the canonical server-side in the initial HTML. JavaScript-injected canonicals are fragile: they easily produce conflicting tags (an original in the raw HTML plus a mutated one after render), and Google indexes the rendered DOM, so a canonical changed after render is a known pitfall. If the page you want as canonical differs from the one in the source, ship the correct value from the server rather than rewriting it in the browser. Malformed HTML can also silently break rel=canonical parsing, so validate the markup around the tag. The rendering constraints behind this are in our JavaScript SEO and rendering guide, and a canonical target must not be blocked by your robots.txt.
How Crawlinx detects canonical problems
Crawlinx checks each page's canonical against the crawled URL map: it flags a missing canonical (canonical.missing), a canonical pointing away from its own page (canonical.non_self), a target that redirects (canonical.to_redirect), a target carrying noindex (canonical.to_noindex), and the same content split across protocol or host variants (duplicate.protocol_host). Because canonicals interact with duplication and crawl demand, our crawl budget guide covers the downstream cost of weak consolidation.
Takeaway
A canonical is a hint you make strong by making it consistent. Point it at an absolute, live 200, indexable URL — never a redirect, a noindex page, or the homepage — and give every page a self-reference. Reach for noindex, not a canonical, when you want a page out of results, and set canonicals server-side rather than in JavaScript.
Audit your own site — free
77 checks, internal PageRank, render-diff. No signup, results in ~30s.