SEO & Marketing

Canonical tag: correct usage and costly mistakes

The canonical tag is a hint, not a directive; if you set it wrong, Google will index the wrong page. A guide to diagnosing and fixing common errors.

SEO & Marketing

The page sitting in your Search Console report with the message "Duplicate, Google chose different canonical than user" is usually the moment a site owner realizes they set a canonical tag, but Google didn't accept it. This error means you said "this is the original version," and Google said "no, that other one is." And until this disagreement is resolved, the ranking you expect won't reach the right page.

The first thing you have to accept is this: the canonical tag is a hint, not a directive. Google reads it, compares it with other signals (internal links, sitemap, redirects, the actual page content), and then decides. If the signals contradict each other, your tag loses.

Why Google ignores your canonical tag

I've seen three reasons most often in practice. First, a contradiction between the tag and a redirect: a page that 301-redirects to another address no longer needs a canonical; the redirect itself is stronger. If you set both, you're sending contradictory messages.

Second, chained canonicals. Page A points to B, B points to C. Google follows this chain, but in some cases it abandons it and picks B itself. The rule is simple: the canonical should always point directly to the final version, not to an intermediary.

Third and most common: the canonical points to a page that itself has a noindex or is blocked in robots.txt. This combination shows up in the report as "Page with redirect" or "Excluded by noindex tag" and effectively drops both pages out of the index. If you don't want a page indexed, set noindex and remove the canonical. Both together means neither.

What it looks like in Search Console

Go to the Pages section and click on "Not indexed." If a large number of URLs with parameters like ?utm_source= or ?color= are sitting under "Duplicate without user-selected canonical," it means you've left the tag out. If those same URLs are under "Alternate page with proper canonical tag," you've done it right and just need to wait. The difference between these two reports is the difference between "I need to do something" and "do nothing."

The canonical tag in HTML: correct syntax and where it breaks

The basic form in the page's <head> is:

<link rel="canonical" href="https://example.com/product/blue-shirt" />

Three details that are frequently written wrong. First, the address must be absolute; href="/en/product/blue-shirt" is allowed by the standard, but in practice some crawlers and analysis tools ignore it. Second, the protocol and domain must be exactly what's served on the final version; if the site is on https://www and the canonical points to http:// without www, you've added an extra redirect to the chain. Third, the trailing slash: /product/ and /product are two different URLs. Pick one and write it the same way everywhere.

For AMP or separate mobile pages, a reciprocal canonical is needed: the mobile version points to desktop, and desktop points to mobile with rel="alternate" media="only screen and (max-width: 640px)". If you only set one side, Google indexes both separately and the same duplicate content comes back.

HTTP header vs. HTML tag: which should I choose

For non-HTML files (PDF, image, XML file) there is no HTML tag and you must use the header:

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

In Nginx, something like this:

location ~* \.pdf$ {
    add_header Link '<https://example.com/docs/$uri>; rel="canonical"';
}

For HTML pages, I always prefer the tag inside <head>. The reason is simple: it's visible, it's in View Source, and the content team can check it too. The HTTP header isn't visible in ordinary browser tools, and when something isn't visible, sooner or later it breaks. Use the header only where you don't control the HTML or the CMS doesn't allow injecting the tag.

When you set both

If both the header and the tag exist and the addresses don't match, Google gives precedence to the HTTP header. This is stated in the official documentation too. So if you changed the tag and an old header was left behind, your change becomes ineffective and you think it's caching. It's not caching.

URL parameters: where canonical alone isn't enough

A store with color filters and sorting, a blog with pagination, and campaign links with UTM are three constant sources of duplicate content. For UTM, the best approach is stripping the parameter at the server level or using rel="nofollow" on campaign links, not canonical. Because UTM links usually come from other sites, and a canonical on the destination page transfers the link signal to the clean version; but if you're putting UTM links in your own menu, you're giving yourself duplicate links.

For filters, a canonical to the unfiltered version is correct, provided the filtered page doesn't have significant unique content. If the combination "men's blue shirt" itself has real search demand, canonicalizing it to the main page means removing a page from the market. This is where they make a mistake: the SEO team canonicalizes all filters with a blanket rule, and six months later finds that traffic for those combinations has gone to zero and a competitor has taken the ranking.

For pagination, don't set page 2's canonical to page 1. Google understands what pagination is on its own, and this only drops the later pages out of the index. If you're worried about duplicate content, make each page's title and description unique.

canonical, redirect, or noindex: which for which case

SituationRight toolWhy
Two URLs showing the same content and both should stay opencanonicalThe user can access both, the search engine picks one
An old address that's no longer used301The strongest signal, transfers link equity
Internal search page, empty cart, worthless filter resultnoindexIt shouldn't be in the index at all
Duplicate content between two domains you both owncross-domain canonicalOnly when both domains are under your control

One warning about cross-domain canonical: Google has stated it doesn't take this signal as seriously as before and sees it more as a hint. If two domains have identical content and both matter, a redirect or merging the content works; cross-domain canonical usually doesn't.

How do I test whether the canonical is correct

Three steps that give an answer in ten minutes. First, open the page with view-source: in the browser and make sure there's only one canonical tag. Two canonical tags means Google ignores both and you've sent no signal at all. This error is very common in WordPress themes where both an SEO plugin and the theme output the tag.

Second, copy the address inside the canonical and open it in the browser. It should open without a redirect, with a 200 code, and with the same content. If it hits a 301, you have a chain. If it returns a 404, it's worse: you've pointed to a page that doesn't exist.

Third, check the headers with curl -I:

curl -sI https://example.com/product/blue-shirt | grep -i -E 'HTTP/|location|link'

If you see Link: ... rel="canonical" and weren't expecting it, that header is neutralizing your tag. To check DNS and domain health before any change, technical domain and DNS check is a good starting point; many canonical problems are actually a www vs. non-www problem whose root is DNS and server redirects.

This is where they make a mistake

The most common mistake I've seen: the development team points the canonical to a version that's blocked in robots.txt. The sign is that in Search Console the main page's ranking drops, but you don't see any clear error in the Coverage report; only the number of indexed pages decreases. The cause: Google reads the canonical, goes to the destination page, sees it's blocked, and sets both aside. One line in robots.txt, six months of traffic.

The second mistake, which costs more: setting the canonical automatically on all pages with a tool. A plugin that sends the canonical of all blog pages to the blog's first page is effectively telling Google "all these articles are duplicates." The result: new articles never get indexed and you think the problem is content quality.

canonical and Core Web Vitals: a connection that's less noticed

When you have two versions of a page and the canonical isn't working correctly, real-user speed data gets split between the two URLs. Each collects less data, and the CrUX report may not show either with enough confidence. To understand how this data is measured, see measuring real user performance with CrUX and Core Web Vitals. If the TTFB of one of the two versions is high and the canonical points to it, you've effectively hurt the main page's speed too; the difference between TTFB and load time explains this in more detail.

One practical tip: before any broad canonical change, use the SEO and webmaster tools to compare the before and after state. Without a reference point, you won't know whether your change worked or not.

Frequently asked questions

Should the canonical tag be on every page?

No. Any page that has its own unique address and no duplicate version doesn't need a canonical, and setting it to itself is just an extra line. Put the canonical where you actually have two or more URLs showing the same content.

What's the difference between canonical and a 301 redirect?

A 301 redirect actually sends the user and crawler to another address and transfers link equity. A canonical only says "this is the original version" but the page stays open. If the old address is no longer needed, use a 301; if both addresses need to work for the user, use canonical.

Why does Google ignore my canonical?

Usually because of contradicting signals: a simultaneous redirect, two canonical tags on one page, pointing to a noindex page, or many internal links to a version that isn't the canonical. Google looks at the sum of signals, not just the tag.

Does canonical work between two domains?

It works but weakly. Google sees it only as a hint and ignores it if other signals disagree. If both domains are yours and one is a backup version, a 301 redirect is the safer option.

Next step: open the Pages report in Search Console right now and see how many URLs are sitting under "Duplicate, Google chose different canonical than user." If the number is large, before doing anything else, check those pages with view-source: and make sure they have only one canonical tag. If you don't have a team to do this, ServerNet's SEO services perform this same technical review.

ServerNet Support

ServerNet engineering & editorial team — specialists in infrastructure, networking and web hosting.

SEO Services
Share:

Comments 0

No comments yet — be the first!

Leave a comment

Related service

SEO Services

SEO is not a cost, it's an investment. With technical SEO, content strategy and principled link building, ServerNet raises your ranking on Google and builds real, lasting organic traffic.