Skip to content

Home / Learn / Canonical tags

What is a canonical tag?

A canonical tag is a line in a page's head, <link rel="canonical" href="…">, that names the preferred URL when the same content can be reached at several addresses.

Why duplicate URLs happen

Almost no site has one URL per page by accident. The same product can answer at:

  • http:// and https://, with and without www.
  • /mugs/blue and /mugs/blue/
  • ?utm_source=newsletter, ?sort=price, ?sessionid=…
  • a category path and a flat path: /sale/blue-mug and /mugs/blue

Google groups pages with the same content into a cluster and shows one URL from it, the canonical. Its guide to canonicalization explains that you can influence the choice; you cannot force it.

Five addresses, one page. Picking the one Google should show is like naming the Moon’s phase on a given night: there is always one right answer, and ahaboo has a narrated explainer on how to read it.

Canonical tag examples

Self-referencing (the default for most pages)

<!-- on https://example.com/mugs/blue/ -->
<link rel="canonical" href="https://example.com/mugs/blue/">

Parameter variant pointing at the clean URL

<!-- on https://example.com/mugs/blue/?sort=price -->
<link rel="canonical" href="https://example.com/mugs/blue/">

Cross-domain (syndicated article)

<!-- on partner-site.com/republished-post -->
<link rel="canonical" href="https://example.com/blog/original-post">

HTTP header (PDFs, non-HTML files)

Link: <https://example.com/whitepaper.pdf>; rel="canonical"

How the signals add up

Two URLs serve the same product page. Switch on the signals your site sends for URL B, and see which one Google is likely to pick.

URL A
example.com/mugs/blue?ref=nav
URL B
example.com/mugs/blue/
  • strong signal
  • strong signal
  • supporting signal
  • weak signal
  • tiebreaker

B is likely, not guaranteed. rel=canonical is a strong hint, but your own navigation still links to A. Mixed signals are the most common reason Google overrides a canonical tag.

The weights are illustrative. The ordering follows Google Search Central's "How to specify a canonical URL": redirects and rel=canonical are strong signals, sitemap inclusion is weak, and Google also prefers HTTPS pages and considers internal links.

Rules Google documents

  • Put rel="canonical" in the <head>. Links in the body are ignored.
  • Use absolute URLs. Relative ones are supported but easy to get wrong.
  • Specify one canonical per page. Multiple conflicting values can lead Google to ignore them all.
  • Point at a live, indexable page, not at a redirect, a 404 or a noindex page.
  • Don't use robots.txt for canonicalization: a blocked URL can't be crawled, so Google never sees its canonical.
  • Don't use the URL removal tool or noindex to pick a canonical within a site.
  • Be consistent: link internally to the canonical URL, and list only canonical URLs in the sitemap.

Canonical vs noindex vs redirect

ToolVisitors seeUse when
301/308Only the targetThe old URL has no reason to exist
rel=canonicalBoth URLs workVariants must stay reachable (filters, tracking, syndication)
noindexPage works, not in searchThe page shouldn't be in search at all, not a duplicate issue

Mixing noindex with a canonical to another page sends contradictory messages. Pick the one that matches the intent. Search Console's URL Inspection tool shows both your declared canonical and the one Google selected.

Check a page's canonical

Questions

What is a canonical URL?

The URL Google chooses to represent a group of duplicate or near-duplicate pages. It is the one shown in search results; the others are crawled less often.

What is a self-referencing canonical?

A canonical tag on a page that points to the page's own URL. It makes your preference explicit so parameterised or alternate-host copies consolidate to it.

Is rel=canonical a directive?

No. Google calls it a strong hint. It usually follows it, but may choose another URL if other signals such as redirects, internal links, the sitemap or content differences point elsewhere.

Can pagination pages canonicalize to page 1?

Google advises against it: page 2 has different content from page 1. Give each paginated page its own self-referencing canonical.