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.
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=twitterTo 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 towww. Contradicting yourself wastes crawl budget and confuses consolidation.
How people break their own sites with it
| Mistake | Consequence |
|---|---|
| Every page canonicalises to the homepage | The entire site drops out of the index except the homepage. This is the catastrophic one. |
| Canonical still points at staging | Search engines are told the real page lives on a domain they cannot reach. |
| Paginated pages canonicalise to page 1 | Pages 2 onward are never indexed, so their content is invisible. |
| Canonical to a redirecting URL | The signal is muddled and often discarded. |
| Canonical set by JavaScript | Crawlers that do not render see no canonical, or the wrong one. |
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
How do I fix duplicate title tags?
Why the same title on many pages holds all of them back, and how to generate distinct ones without writing hundreds by hand.
ReadWhy is my website not showing on Google?
Work through it in order — not indexed, indexed but not ranking, or ranking but not for anything you noticed.
ReadDo I need a sitemap.xml?
Not strictly. It helps discovery on larger or poorly-linked sites, and it costs nothing — but it will not fix a site that cannot be crawled.
ReadHow can I improve my SEO?
The work that actually moves rankings, ordered by effect per hour spent — and the popular tasks that do almost nothing.
Read