Canonical Tags: How to Tell Google Which Page Is the Real One
Picture an online spice shop in Kerala. One pepper product is reachable at /products/black-pepper, at /collections/whole-spices/products/black-pepper, at the same URL with ?ref=instagram on the end, and at a version with ?variant=250g. To a shopper they're the same page. To Google they're four URLs, and it has to pick one to show in search. The canonical tag is how you tell it which one you'd prefer.
What the tag looks like
It's a single line in the page's <head>:
<link rel="canonical" href="https://example.com/products/black-pepper" />
Every duplicate or near-duplicate version carries the same canonical pointing at the preferred URL. Google then tends to consolidate signals, including links pointing at the variants, onto that one URL and show it in results.
For non-HTML files like PDFs, you can send the same information in an HTTP header: Link: <https://example.com/guide.pdf>; rel="canonical".
It's a hint, not an order
Google treats rel=canonical as a strong signal, but it also looks at redirects, internal links, sitemap entries, hreflang and whether the pages really are duplicates. If your canonical says page A but every internal link, your sitemap and the HTTPS version all point at page B, Google may pick B anyway. Search Console's URL Inspection tool shows both the "User-declared canonical" and the "Google-selected canonical", and when they differ, it's usually because your signals disagree with each other.
So the tag works best when everything else agrees with it: link internally to the canonical URL, list only canonical URLs in your sitemap, and redirect where a duplicate has no reason to exist.
Self-referencing canonicals
A page can point its canonical at itself. This is good practice on almost every indexable page because it guards against the junk URLs that get created without your control: tracking parameters from ads and newsletters, session IDs, or someone linking to you with odd capitalisation. WordPress SEO plugins and Shopify add self-referencing canonicals by default.
Canonical vs 301 redirect vs noindex
These get confused, so here is how I choose:
| Situation | Use |
|---|---|
| Duplicate URL users still need (filters, tracking, print view, variants) | Canonical to the main version |
| Old URL nobody needs any more (moved page, merged article) | 301 redirect |
| Page users need but you don't want in search at all (thank-you page, internal search) | Noindex |
| Same article republished on another site | Cross-domain canonical, if the other site agrees |
Don't combine canonical-to-another-page with noindex on the same URL. You're telling Google "this is a copy of page A" and "don't index this" at once, and in rare cases the noindex signal can carry over to the canonical target. Pick one. The 301 vs 302 redirects article covers when a redirect is the better choice.
Cross-domain canonicals
If you syndicate a blog post to Medium, LinkedIn or a partner site, you can ask them to add a canonical pointing back to your original. Not every platform supports this, and Google may still choose the bigger site's version if your signals are weaker, so it's not a guarantee. If you sell the same products as a dozen other retailers using the manufacturer's description, canonical tags won't help you; rewriting the description will.
Mistakes that hide pages
Pointing every page at the homepage. A theme or plugin bug sets the homepage as canonical site-wide. Google may then drop most of your pages from the index. This is easy to spot: view source on any inner page and read the canonical.
Paginated pages canonicalised to page 1. Page 2 of your blog archive isn't a duplicate of page 1; it lists different posts. Give each paginated page a self-referencing canonical, or the posts only linked from deeper pages can get discovered more slowly.
Canonical pointing at a redirect, 404 or noindexed URL. The target must be a live, indexable 200 page. Check this after any migration.
Relative URLs gone wrong. href="/products/pepper" works, but href="products/pepper" without the leading slash resolves relative to the current path and can produce nonsense. Use absolute URLs.
Multiple canonical tags on one page. Often one from the theme and one from a plugin. Google may ignore both. There should be exactly one.
Canonical in the body. The tag only counts in the <head>. If JavaScript or a broken HTML structure pushes it into the body, it's ignored.
Canonicalising pages that aren't duplicates. Pointing your "SEO services in Delhi" page at your "SEO services in Mumbai" page because the text is similar won't make Google rank the Mumbai page for Delhi searches. If they're both useful, make them different enough to stand alone; if not, merge them.
Checking your canonicals
- View source on a sample of templates (homepage, category, product, post, paginated archive) and confirm the canonical on each.
- In Search Console, the Pages report lists "Duplicate, Google chose different canonical than user" and "Alternate page with proper canonical tag". The second is normal and healthy. The first needs investigation.
- A site crawl will flag canonicals pointing to non-200 URLs and pages with missing or multiple canonicals.
Canonical tags are one of the main tools for duplicate content, and they fit into the wider checks in the technical SEO checklist.
Start by inspecting one product or post URL with a tracking parameter attached in Search Console's URL Inspection tool. If Google's chosen canonical matches yours, your setup is probably sound; if it doesn't, follow the signals until they agree.