FindSEO
Technical SEO

What Are Canonical Tags and When Do You Need Them?

A canonical tag tells Google which URL should represent duplicate or very similar pages. When you need one, how to add it, and the mistakes that undo it.

FindSEO8 min read

A white rural fingerpost standing at a road junction, with arms pointing toward nearby villages and a yellow oilseed-rape field stretching behind it.

Photo: Acabashi / Wikimedia Commons (CC BY-SA 4.0)

In this article
  1. What is a canonical tag?
  2. When do you actually need a canonical tag?
  3. How do you add a canonical tag correctly?
  4. What other signals does Google use besides the tag?
  5. What common mistakes make Google ignore your canonical?
  6. How do you check which URL Google chose?
  7. A canonical tag checklist
  8. The bottom line

A canonical tag is a hint you add to a page — usually a rel="canonical" link in the HTML head — that tells Google which URL should represent that content when several addresses show the same or a very similar page. You need one whenever a page can be reached at more than one URL, and Google also recommends a self-referencing tag on the URL you want treated as the main version. The tag is a strong signal, not a command: Google may still pick a different canonical. If the extra URL should not exist at all, a permanent redirect is the stronger move.

It sits alongside our explainer of whether duplicate content hurts SEO and the Academy lesson on how search engines work.

What is a canonical tag?

A canonical tag is the HTML (or HTTP header) way of naming your preferred URL for a piece of content. Google's documentation on what canonicalization is defines a canonical URL as the address Google chooses as the most representative page from a set of duplicates. The tag is how you state your preference.

Google supports the relation described in RFC 6596, "The Canonical Link Relation". In HTML it looks like this:

<link rel="canonical" href="https://www.example.com/dresses/green-dresses" />

That element must sit in the page's <head>. You can instead send a Link HTTP header with rel="canonical", which is useful for non-HTML files such as PDFs.

When Google finds pages whose primary content is the same or very similar, it groups them and picks the version it considers most complete and useful as the canonical. That page is crawled more often; the others are crawled less. Search results usually point to the canonical, unless a duplicate is a better fit — for example, a mobile URL when someone is on a phone.

Indicating a preference is optional. If you do nothing, Google will still choose a version. Being explicit means people, and your analytics, land on the URL you intended.

Three canonicalization methods in order of influence: permanent redirects are a strong signal to use when an extra URL should disappear; a rel=canonical tag is also a strong signal for copies that must stay live, including a self-referencing tag on the preferred page; sitemap inclusion is a weak signal that only lists preferred URLs. The methods stack but remain a hint, not a rule, and none are required.
Redirects and rel="canonical" are strong signals; a sitemap is a weak one. They stack, and none are required.

When do you actually need a canonical tag?

You need one when the same content, or content that is very similar, can be reached at more than one address and those extra URLs have to stay live. Google's canonicalization page lists the usual causes:

  1. Protocol and host variants, such as http:// and https://, or example.com and www.example.com.
  2. Tracking and session parameters, such as a product URL with a gclid or a campaign tag appended.
  3. Site functions, such as category pages that can be sorted or filtered.
  4. Device variants, such as separate mobile (m.) and desktop URLs.
  5. Regional variants in the same language, such as US and UK pages that differ only in spelling or pricing.
  6. Accidental variants, such as a staging copy left open to crawlers.

Google's guide to specifying a canonical URL lists four reasons to be explicit: so a particular URL appears in results, so links and other signals consolidate there, so metrics stay clean, and so Googlebot spends less time recrawling copies — more important on large sites where crawl budget is real.

You do not need a tag for a page that should go away. Retire an old URL, or merge two articles, with a permanent 301 redirect. Google's page on redirects and Google Search treats that as a strong signal that the destination should be canonical. Check each hop with the redirect checker. During a site move, update canonicals on the new URLs as well as the redirect map — see migrating a website without losing SEO.

A self-referencing canonical — a tag on the preferred page that points to itself — is still worth adding even when you have no known duplicates. Google recommends it, and it protects you if someone later links to a parameterised or HTTP version of the same page.

Decision guide: if people should not still visit an extra URL, use a permanent 301 or 308 redirect to the preferred URL; if the extra URL must stay, add a self-referencing canonical when it is the URL you want in search results, or a rel=canonical tag pointing at the preferred URL when it is not.
Redirect what should disappear. Tag what must stay, and point that tag at the URL you want in results.

How do you add a canonical tag correctly?

Google documents two supported ways to send a rel="canonical" annotation, and recommends picking one rather than using both:

  1. The HTML link element. Add <link rel="canonical" href="https://www.example.com/preferred-url/" /> in the <head> of every duplicate, pointing at the preferred URL, plus the same self-referencing element on that preferred page.
  2. The HTTP header. Send Link: <https://www.example.com/preferred-url/>; rel="canonical" in the response. Use this for PDFs and other files that have no HTML head.

Follow Google's best practices from the same guide:

  • Use absolute URLs, including https://. Relative paths are supported but can go wrong, especially if a testing site is crawled.
  • Put the element in a valid <head>. A tag that ends up in the body is ignored.
  • Do not add hreflang, lang, media or type attributes to the canonical link: those become alternate annotations, which Google ignores for canonicalization. Use a separate rel="alternate" hreflang link for language or country versions.
  • When you have hreflang annotations, the canonical should be in the same language, or the best substitute if none exists. Check the pairing with our hreflang checker if you serve more than one country.
  • Link internally to the canonical URL, not to the duplicates. Consistent internal links help Google understand your preference, as the Academy lesson on internal links, URLs and images also covers.
  • On JavaScript sites, put the canonical in the original HTML if you can, and do not let scripts change it to a different URL. Google's JavaScript SEO basics say that if you cannot set it in the HTML, leave it out of the HTML and set it only with JavaScript — and make sure the page has only one rel="canonical" link.

Check the rendered source in your CMS or theme, not only the settings screen.

Close-up of HTML source code on a dark editor, showing the head section with a title tag, a viewport meta tag and several link rel stylesheet tags.
The canonical link belongs in the HTML head, alongside your other link and meta tags. Photo: Sai Kiran Anagani, CC0, via Wikimedia Commons.

What other signals does Google use besides the tag?

The tag is not the only input. In order of influence, Google lists redirects as a strong signal, rel="canonical" annotations as a strong signal, and sitemap inclusion as a weak one. Pages listed in an XML sitemap are suggested as canonicals, so list only the URLs you want chosen — see whether you need an XML sitemap. The methods stack, and none of them are required.

Google also prefers HTTPS over equivalent HTTP pages as canonical, unless the HTTPS page has certificate problems, mixed insecure dependencies, redirects back through HTTP, or a canonical that points at the HTTP URL. For localized sites, URLs that sit in an hreflang cluster are preferred over the same content left out of the cluster. Google's guide to localized versions of your pages is the companion document if you serve several countries.

What common mistakes make Google ignore your canonical?

Google treats your annotation as a hint. Its troubleshooting guide says it may still choose a different URL because of content quality or technical signals. The usual self-inflicted problems:

  1. Mixed signals. The sitemap lists one URL, the canonical tag another, and internal links a third. Do not specify different canonicals with different techniques.
  2. Using robots.txt to hide duplicates. Google may still index a blocked URL without its content, so it cannot see your tag.
  3. Using the URL removal tool. That hides every version from Search, which is not canonicalization.
  4. Using noindex to pick a winner. Google does not recommend this within one site, because it removes the page from Search completely.
  5. Canonical fragments. Google generally does not support URL fragments (#section) as canonicals.
  6. Incorrect CMS output. Plugins sometimes point every page at the homepage or an HTTP URL, or insert more than one canonical link.
  7. JavaScript that rewrites the tag. Changing an HTML canonical with JavaScript, or injecting a second one, can produce unexpected results.
  8. Syndicated copies. A cross-site canonical is not Google's recommended fix when partners republish your article, because the pages are often very different. Ask partners to block indexing of the copy.

If another site copied you without permission, that is a legal issue rather than a tag on your own page. Google's troubleshooting page points you to the host or a copyright removal request.

Canonical tag mistakes that send mixed signals: do not hide duplicates with robots.txt, use the URL removal tool, send conflicting sitemap or link signals, use noindex to pick a winner, or let JavaScript change an HTML canonical. Do use absolute https URLs and a self-referencing tag on the preferred page.
Mixed signals are the usual reason Google picks a different URL than the one you named.

How do you check which URL Google chose?

Start in Google Search Console. The URL Inspection tool shows the canonical you declared and the one Google selected. The Page indexing report groups duplicates under statuses such as "Duplicate without user-selected canonical", "Duplicate, Google chose different canonical than user", and "Alternate page with proper canonical tag". Our guide to why a page isn't indexed explains what each reason means.

If Google picked a different URL than you wanted, look for the mixed signals above, then make the pages in the cluster more different if they are meant to stand alone. Google says a duplicate cluster can persist for up to two weeks after you fix the content. You can use Request Indexing for important URLs, subject to quotas.

Our free Google index checker reads a page's canonical tag, redirects, noindex rules and robots.txt before you open Search Console. It cannot tell you which URL Google already chose. The page authority checker is only a rough read on a preferred URL once signals have had time to consolidate.

A technical SEO audit should include this check, especially after a redesign. The first three months of SEO is the right time to get canonicals consistent.

A person's hands typing on a silver laptop with a dark blank screen, photographed from over the shoulder at a polished table.
Inspect the live HTML and Search Console before you assume Google followed your tag. Photo: Simon Hattinga Verschure, CC0, via Wikimedia Commons.

A canonical tag checklist

  • Every indexable page has a self-referencing canonical with an absolute https:// URL.
  • Duplicate, filtered, sorted and tracked URLs that must stay live point their canonical at the preferred page.
  • URLs that should not exist use a permanent redirect instead of a tag.
  • The HTML head (or the HTTP header) contains one canonical, and JavaScript does not change it to a different URL.
  • The XML sitemap, internal links and redirects all name the same preferred URLs.
  • Regional versions in the same language use hreflang plus a same-language canonical.
  • robots.txt, noindex and the URL removal tool are not being used to "pick" a canonical.
  • Search Console's URL Inspection result matches the URL you want for your important pages.

If the site is large or the Page indexing report is full of unexpected duplicates, a technical SEO specialist in Australia can map and fix it. Get matched with agencies that do this work, or browse SEO agencies in Australia and Melbourne.

The bottom line

A canonical tag is how you tell Google which URL should represent a page when copies exist. It is a strong hint, not a switch. Redirect what should disappear, tag what must stay, point every signal at the same absolute HTTPS URL, and check the choice in Search Console rather than assuming the tag was obeyed. Do that well and Google can consolidate links, keep results tidy and spend less time recrawling copies.

FAQs

Is a canonical tag a command or a hint?

A hint. Google treats rel="canonical" as a strong signal of your preference, not a rule. It may still choose a different URL because of content quality or conflicting technical signals such as redirects, the sitemap or internal links.

Do I need a self-referencing canonical on every page?

Google recommends including a rel="canonical" link on the canonical page itself, pointing at that same URL. It is useful even when you have no known duplicates, because it states the URL you want used if parameterised or HTTP versions appear later.

Should I use noindex instead of a canonical tag for duplicate pages?

No. Google does not recommend noindex for choosing a canonical within a single site, because it removes the page from Search completely. Use a canonical tag for copies that must stay, or a permanent redirect if the extra URL should go away.

Can I use a relative URL in a canonical tag?

Google supports relative paths, but it recommends absolute URLs that include https://. Relative paths can cause problems later, for example if a testing or staging site is accidentally crawled.

Why did Google pick a different canonical than the one I set?

Google may ignore your preference because of content quality or technical signals. Common causes are mixed signals between your tag, sitemap, redirects and internal links, an incorrect CMS canonical, or pages that are not different enough to stand alone. The URL Inspection tool shows which URL Google selected.

Should syndication partners add a canonical tag back to my original article?

Not as Google's recommended fix. Its troubleshooting guide says a canonical link is not recommended for avoiding duplication by syndication partners, because the pages are often very different. The most effective option is for partners to block indexing of the syndicated copy.

Sources

Ready for help with SEO?

Compare SEO-only agencies near you, with client reviews checked by a person, or tell us what you need and get matched.