Canonical URL mismatch
CANONICAL_MISMATCH · v1.0
What it detects
The <link rel="canonical"> tag points somewhere other than the URL the page actually resolves to after redirects.
Why it matters
Agents and search engines use the canonical URL to dedupe and cite the page; a wrong canonical can cause citations, indexing, or repeat visits to land on the wrong URL.
How to fix
- Compare the `<link rel="canonical">` href in the page `<head>` against the actual final URL the page resolves to after redirects. - Update the canonical tag to match the real, redirect-resolved URL, and generate it server-side from the same routing logic that serves the page (not a hardcoded template string). - If the page is reachable at multiple URLs (trailing slash, query params, www vs non-www), pick one canonical form and 301-redirect the others to it. - Verify: fetch the page, follow redirects, and assert the final URL equals the `canonical` href exactly (scheme, host, path).
References
Last reviewed: 2026-09-01 · rule v1.0