Skip to content
SEO Optimizer is live, Audit on page SEO and AI-search readiness. Try it free
Sign in

How to Fix Canonical URL Issues

A canonical URL, set via <link rel="canonical">, tells search engines which single URL should get credit when the same or near-duplicate content is reachable at more than one address. Get it wrong and search engines can index - and rank - a version of the page you didn't intend.

Why Canonical Tags Go Wrong

  • URL parameters creating unintended duplicates. Tracking parameters, sort order, or filter state (?utm_source=, ?sort=price) generate technically-different URLs serving the same content, without a canonical pointing them back to the clean version.
  • Protocol or subdomain mismatches. http vs. https, or www vs. bare domain, splitting the same content across two indexed addresses.
  • Pagination without a self-referencing or series-aware canonical. Page 2 of a paginated list canonicalizing to page 1 (or not having a canonical at all) can make search engines drop page 2's unique content entirely.
  • Staging or preview URLs leaking a canonical pointing at production, or vice versa, after a template gets copied between environments.

How to Identify the Problem

The Website Audit's SEO score runs a real canonical-correctness check on every scan - it flags a canonical URL that's relative instead of absolute, one that's outright invalid, multiple conflicting canonical tags on the same page, and the specific, common mistake of a page canonicalizing to your homepage instead of to itself. Browser Test complements this by showing you the raw tag and exact URL it captured from your live, rendered page.

Neither check confirms the canonical target actually resolves to a 200 (rather than a redirect or a 404), or that it's consistent with your site-wide protocol/subdomain choice - those two still need a manual spot-check.

How to Fix It

1. Self-reference the canonical URL on the preferred version of a page

app/products/keyboard/page.tsxA page canonicalizing to its own clean, absolute URL
export const metadata = {
  alternates: {
    canonical: "https://example.com/products/keyboard",
  },
};

Or directly in HTML:

index.htmlAlways use the absolute URL, never a relative path
<link rel="canonical" href="https://example.com/products/keyboard" />

2. Canonicalize parameter and sort/filter variants back to the clean URL

A page reachable as both /products?sort=price and /products should have the parameterized version's canonical point at the clean /products URL, so link equity and indexing consolidate onto one address.

3. Pick one protocol and one host, everywhere

Standardize on https and either www or the bare domain, redirect the other permanently (301), and make sure every canonical tag on the site uses that same standard - a canonical pointing at the non-redirected version defeats the purpose.

4. Manually verify the canonical target actually resolves

Run a Website Audit first - it'll catch relative URLs, invalid URLs, conflicting canonicals, and the homepage-mistake automatically. What's left to check by hand: that the canonical URL returns a 200 status and genuinely matches the content of the page pointing to it, especially right after a URL restructure or migration.

Duplicate Without User-Selected Canonical

This Search Console status means Google found several pages it considers duplicates, none of them has a canonical tag, and Google picked one URL to index on its own. The page in the report is the one Google left out. It usually shows up for URL variants: tracking parameters, http versus https, trailing slashes, uppercase paths, or print and sort versions of the same page.

Fix: add a self-referencing canonical URL to every indexable page, and on each variant point the canonical tag at the main version. Then make internal links and your sitemap use that same URL, so every signal agrees. If the variant should not exist at all, 301 redirect it to the main URL.

Duplicate, Google Chose Different Canonical Than User

Here you did set a canonical URL, but Google ignored it and picked another page. Google treats the canonical tag as a strong hint, not a command, and overrides it when other signals disagree: internal links pointing at a different URL, a sitemap listing the other version, redirects that conflict with the tag, or content that is not actually equivalent.

Fix: use URL Inspection to see which canonical Google selected, then line up every signal behind the URL you want: the canonical tag, internal links, sitemap entries and redirects. If the two pages genuinely differ, give each one unique content and its own self-referencing canonical instead.

How Scanverra Detects This

The Website Audit's SEO score (Lighthouse's canonical audit) parses every rel="canonical" link on the page and flags a relative or invalid URL, multiple conflicting canonicals, and a canonical pointing at your homepage's root instead of the page itself. Browser Test separately captures whether a canonical tag is present and the exact URL it points to. Together they cover the mistakes above - what they can't see is whether the target URL actually resolves correctly or matches the source page's content.

FAQ

Frequently asked questions

It tells search engines which URL is the "master" copy when the same or near-identical content is reachable at more than one URL - the crawled duplicate's ranking signals get consolidated onto the canonical target instead of split across both.

Partly, and it's genuinely useful. The Website Audit's SEO score runs Lighthouse's canonical check, which flags a relative (non-absolute) URL, an invalid URL, multiple conflicting canonical tags on one page, and the common mistake of every page canonicalizing to your homepage instead of itself. Browser Test additionally shows you the raw tag and its exact value. What neither checks: whether the canonical target actually returns a 200 (versus a redirect or 404), and whether it's consistent with your site's chosen protocol/subdomain across every page - those still need a manual spot-check.

Absolute, always - a relative canonical path is technically against the spec and can be resolved incorrectly by different crawlers, especially on a site served from multiple subdomains or protocols.

It can, but it shouldn't - a canonical pointing at a redirect or broken URL sends a confusing signal and search engines may just ignore it. Since Scanverra doesn't check this for you, verify the canonical target actually returns a 200 and matches the content, especially after a URL restructure.

Free - no sign-up required

Check this on your own site

Run a free scan and see exactly where you stand - no sign-up required.

Run free audit