Canonical tag explained: when you need one (+ 5 common mistakes)

By SEOgrinder · Published · 9 min read

Short answer: A canonical tag is a <link rel="canonical"> element in the <head> of a page. It names the address that Google should treat as the main version when the same content can be reached under several addresses. You do not need one on every site, because Google picks a canonical itself when you say nothing, but you want one as soon as duplicates exist. And it is a hint, not a command.

What is a canonical tag?

When Google finds pages that look the same, it groups them and picks one representative address. Google calls this canonicalization. The canonical page is crawled most regularly, duplicates less often, and a search result usually points to the canonical page. The exception is a duplicate that suits the searcher better, such as a separate mobile page for someone on a phone.

The canonical tag is how you state your preference. It sits in the <head> of the HTML:

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

Every address that shows this content carries that line, and each line names the same address. Google gives four reasons to bother: you decide which address people see in results, signals such as links are consolidated into one address, your metrics are easier to read, and Googlebot spends its time on new pages instead of duplicates. We found no promise of a ranking gain on these pages.

One point matters before you start. Google is clear that "indicating a canonical preference is a hint, not a rule". It may choose another page than the one you name.

When do you need a canonical tag?

Often you do not. Google's page on specifying a canonical says: "none of them are required; your site will likely do just fine without specifying a canonical preference". A page that exists under exactly one address needs no help.

You need to think about it when the same content has more than one address. Typical causes, taken from Google’s list and its examples:

  • Tracking parameters and site functions. https://example.com/dresses/cocktail?gclid=ABCD is Google's own example. Sorting and filtering a category page create the same kind of copies.
  • Protocol and host variants. http and https, or with and without www. Our view: a redirect is the cleaner tool here.
  • Device variants. A mobile version on its own address.
  • Region variants in one language. A US and a UK page with the same text. Use the canonical together with hreflang, as in our article on setting up hreflang.
  • Accidental variants. A demo or test copy of the site that crawlers can reach.
  • Non-HTML files. A PDF next to the page with the same content.

Duplicate content is not a violation by itself: Google writes that some of it is normal and does not break its spam policies.

One case where the tag is the wrong tool is syndication. Google does not recommend it there, because the partners' pages are often very different. The most effective fix is that the partners block indexing of your content.

How do you add a canonical tag?

Google lists three ways to state a preference, and says they stack: using two or more raises the chance that your preferred address is shown.

MethodSignalGood forLimit
Redirect (301 or 308)StrongGetting rid of a duplicate for goodVisitors land on the other address too
rel="canonical" link element or HTTP headerStrongDuplicates that must stay reachableThe mapping gets hard to keep up on big sites
SitemapWeakBig sites, as a second signalGoogle still decides what the duplicates are

For the link element, Google's advice comes down to this:

  • Put it in the <head> of each duplicate, and use a full address with https://.
  • Add the same tag to the canonical page itself (more on that below).
  • For files that are not HTML, such as a PDF, send an HTTP header instead: Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical". Google supports this for web search results only.
  • Pick either the element or the header. Using both is possible, but Google calls it more error prone.
  • On a CMS such as WordPress, Wix or Blogger you may not edit the HTML directly. Look for a search engine settings page in the CMS.

Redirects are the right method when the duplicate should disappear. Our article on 301 and 302 redirects covers them.

Should a page point to itself?

Yes. Google recommends a rel="canonical" link on the canonical page itself, a self-referential canonical. Then every version of the page that someone reaches, for example with a tracking parameter, says the same thing.

Our view, not Google's: build the address in the tag from the page's clean address and not from the requested one. Otherwise the parameter ends up in the tag. The check below shows how to test this.

5 common canonical tag mistakes

Google documents each of these on its canonical pages. We did not measure how often they occur.

Mistake 1: A relative address, a fragment or the wrong protocol

Use the full address. Google supports relative paths but advises against them, because they can cause problems later, for example if your test site gets crawled by accident. Its examples: https://www.example.com/dresses/green/green-dress.html is good, /dresses/green/green-dress.html is bad.

Do not name a URL fragment (the part after #) either, because Google generally does not support fragments. And an https page whose canonical names the http version is one of the conflicts that can make Google prefer the http version.

Mistake 2: Two signals that disagree

Do not name different canonicals for the same page through different methods, for example one address in the sitemap and another in the tag, or one in the header and another in the element. A CMS or one of its plugins can also point the tag at an address you did not intend. Google suggests checking your HTML in your browser's developer tools. Link internally to the canonical address, not to a duplicate.

Fix: one method, one address. The tag, the sitemap and your internal links all name it.

Mistake 3: noindex, robots.txt or the removal tool instead of a canonical

Google lists three things not to use for canonicalization. First, robots.txt, because Google "may still index URLs that are disallowed in robots.txt without their content". Second, the URL removal tool, which hides all versions of a URL from Search. Third, noindex, which would completely block the page from Search.

A page with noindex that also names another address as canonical sends two opposite messages. The advice of our check: if the page should disappear, keep noindex and remove the canonical. If it should count toward another page, remove noindex and keep the canonical.

Mistake 4: A tag Google cannot read, or JavaScript that changes it

Google only accepts the link element in the <head> section, so at least that section must be valid HTML. Google's JavaScript guide says the best way is to set the canonical in the HTML and make sure JavaScript does not change it. If you cannot, set it only with JavaScript and leave it out of the HTML. Never name one address in the HTML and another in the script.

Mistake 5: Pointing the tag at a page that is not a duplicate

The tag is meant for duplicate or very similar pages. Translated versions are not duplicates when the main text is in another language, and with hreflang Google wants the canonical in the same language, or the best possible substitute. A site where every language version names the English page goes against that advice.

Fix: each language version names itself, and the versions point at each other with hreflang.

Google chose a different canonical than you did: what to do

Because the tag is a hint, Google sometimes picks another address. Search Console then reports "Duplicate, Google chose different canonical than user" (the status is named in the URL Inspection help). Google's troubleshooting page suggests these steps:

  • Find out what Google chose. Inspect the indexed version of the URL in the URL Inspection tool and read "Google-selected canonical", next to "User-declared canonical". The live test cannot predict it.
  • Ask whether Google is right. Is its choice better for visitors from Search than yours?
  • Look for technical causes. Google's list: language variants without hreflang, a CMS or plugin that sets the wrong canonical, misconfigured servers, injected redirects or cross-domain canonicals after a hack, syndicated content, and a copycat site.
  • Make the pages really different if they should not be one. Google may keep pages in a duplicate cluster for up to two weeks after you fix them, and "Request Indexing" is limited by quotas, so save it for important URLs.

How do you check your canonical tag?

Open the page source in your browser and search for rel="canonical", or use a terminal. The second command shows a canonical sent as an HTTP header. A third way is Search Console's URL Inspection, which shows what Google selected.

curl -sS https://example.com/page | grep -i 'rel="canonical"'
curl -sSI https://example.com/page | grep -i '^link'

What this looks like on seogrinder.com. On 4 November 2026 we ran the first command against three addresses. The home page returned <link rel="canonical" href="https://seogrinder.com/">, and so did the same page requested with ?utm_source=test. The article on soft 404 errors returned its own address. Its German version names its own German address, and the two list each other with hreflang. The Markdown version of the home page has no HTML head, so it carries the canonical in an HTTP header: Link: <https://seogrinder.com/>; rel="canonical".

The free scan in SEOgrinder checks the tag on the page you enter. In the "Page on Google" tab, a "Canonical" card shows the address it found and whether it is "Self-referencing" or "Points elsewhere". The task list can show "No canonical tag", "Canonical points to another URL", "Canonical points to an unreachable page", "noindex and canonical contradict each other" and a finding for several different canonical tags. Two limits: the test does not detect a canonical in the HTTP header, and "Google picks a different canonical address" needs a connected Search Console. That connection exists in a local installation only. On seogrinder.com you read Google's choice in Search Console itself.

FAQ

Does every page need a canonical tag?

No. Google says none of the methods is required. It does recommend a self-referencing tag on the canonical page itself.

Canonical tag or 301 redirect?

A redirect when the duplicate should disappear, because visitors are sent on too. A canonical tag when the duplicate has to stay reachable, such as a version with a tracking parameter. Google says the methods can be combined.

Does duplicate content get a penalty?

Google says some duplicate content is normal and not a violation of its spam policies. The costs it names are a confusing experience for visitors and harder tracking.

Your next step

Open the source of your home page and of your most important page. Check three things: the tag is in the <head>, the address is complete and the page names itself. Then run the free scan with SEOgrinder, look at the "Canonical" card in the "Page on Google" tab, and press "Check again" after each change to see the new result.

More from the blog