Canonical tags: 6 common mistakes and how to fix them
A canonical tag is a hint, not a command. These six mistakes weaken it, and each one has a simple fix.
A canonical tag tells Google which URL you prefer when several URLs show the same content. It is a strong hint, not a command. Google can pick a different URL if your other signals disagree. Most canonical problems I find come from six mistakes: pointing to a broken or redirected URL, using relative or inconsistent URLs, having more than one canonical, placing it outside the <head>, sending mixed signals, and pointing every paginated page to page 1. Each one is easy to fix once you know where to look.
How Google uses canonicals
When Google finds duplicate or near-duplicate pages, it chooses one as the canonical and mostly shows that one in search. You can state your preference with a rel="canonical" link element, an HTTP header, redirects and sitemaps (Google Search Central). Google weighs all of these. When they agree, your choice usually wins. When they conflict, Google decides for you.
To see what Google chose, inspect the URL in Search Console and look at the Google-selected canonical field (Search Console Help). Compare it with the canonical you declared. If they differ, one of the mistakes below is often the reason.
Six mistakes and how to fix them
Each mistake below comes with a way to spot it and a fix. Most of them come from templates, not from individual pages, so fix them once in the template.
Mistake 1: The canonical points to a URL that isn't a clean 200
The canonical target should return a 200 status and be indexable. I often find canonicals that point to:
- A URL that redirects (old HTTP version, missing trailing slash).
- A page that returns 404.
- A page that has a
noindextag.
Each one sends a confusing message. You're telling Google "index this other URL", and that URL then says "go elsewhere" or "don't index me".
Fix: Crawl the site and extract every canonical URL. Then check the status code and robots directives of each target. Every target should be a final, indexable 200 URL.
Mistake 2: Relative or inconsistent URLs
Google recommends absolute URLs in the canonical element rather than relative paths (Google Search Central). A relative canonical like href="/page" can resolve to the wrong host on a staging copy or a mirrored domain.
Inconsistency is the quieter version of the same problem. The canonical says http:// while the site runs on https://. Or the canonical drops the trailing slash while the site always uses one.
Fix: Output full absolute URLs from one function in your templates. Use the same protocol, host and trailing-slash rule everywhere: canonicals, internal links, sitemaps and redirects.
Mistake 3: More than one canonical on the page
This happens when a theme adds a canonical and an SEO plugin adds another, or when a tag manager injects one on top. Two different canonicals on one page make your preference unclear. Google's guide warns against declaring different URLs as canonical for the same page (Google Search Central).
Fix: View the raw HTML source and the rendered HTML and count rel="canonical" elements. There should be exactly one. Decide which system owns the tag and remove it everywhere else.
Mistake 4: The canonical is outside the head
Google describes the canonical link element as something used in the head section of the HTML, and asks you to make sure at least the <head> is valid HTML (Google Search Central). Don't count on a canonical that ends up in the <body>. This can happen when a script or an unclosed tag pushes head elements down into the body.
Fix: Check the rendered HTML in the URL Inspection tool, not just your template. Make sure the <head> is valid and the canonical sits inside it.
Mistake 5: Mixed signals
The canonical is only one signal. If the canonical says URL A but:
- your internal links all point to URL B,
- your XML sitemap lists URL B, and
- hreflang tags reference URL B,
then Google has good reason to pick B.
Fix: Make every signal point at the same URL. Internal links, sitemap entries, hreflang and redirects should all use the canonical version.
The Page indexing report in Search Console shows how Google grouped your URLs, and it can surface problems you didn't expect. In a one-off clean-up of a client's separate site that we didn't manage, hacked spam URLs were sitting in two of the report's buckets: "Duplicate without user-selected canonical" and "Alternate page with proper canonical tag". The second bucket is meant for alternate versions such as mobile or AMP pages (Search Console Help), so spam there was a warning sign. I made those URLs return 410 (Gone), removed them in Search Console and validated the fix.
Mistake 6: Every paginated page points to page 1
On category pages with pagination, a common shortcut is to canonicalize pages 2, 3 and 4 back to page 1. That tells Google the deeper pages are duplicates. The products or posts listed only on those pages can then be harder for Google to discover.
Google's guidance is direct: don't use the first page of a paginated sequence as the canonical page. Give each page its own canonical URL instead (Google Search Central).
Fix: Make each paginated URL self-canonical. Make sure the pagination links are normal crawlable <a href> links.
A quick canonical audit
Here is the process I follow on a new site:
- Crawl the site and export each URL with its canonical, status code and indexability.
- Flag pages where the canonical target isn't a 200, indexable URL.
- Flag pages with zero or multiple canonicals.
- Compare canonical URLs with sitemap URLs and internal link targets.
- Spot-check important templates in URL Inspection, comparing the declared and Google-selected canonicals.
- Fix the template, not the single page, so the problem doesn't return.
On a headless CMS like Strapi, I store an optional canonical field per entry and default to the page's own URL when it's empty. That keeps the common case automatic and the exceptions deliberate.