Warning Canonical URL — missing, relative, or unexpected
Why every page needs an absolute rel="canonical" URL, and what it means for SEO if it's missing, relative, or points elsewhere.
The validator checks three things about <link rel="canonical">: whether it's present at all (missing-canonical), whether its href is an absolute URL (relative-canonical), and — when checking a live URL — whether the canonical target's path differs from the page you actually fetched (canonical-differs, informational only).
Example
<!-- Wrong: missing entirely -->
<head><title>My post</title></head>
<!-- Wrong: relative -->
<link rel="canonical" href="/blog/my-post">
<!-- Right: absolute -->
<link rel="canonical" href="https://example.com/blog/my-post">Why it matters
A canonical link tells search engines which URL is the "real" one when the same content is reachable through several URLs — with and without a trailing slash, with tracking parameters, via HTTP and HTTPS, and so on. Search engines consolidate ranking signals to the canonical URL and avoid treating the variants as duplicate content. Without one, search engines guess — usually fine for a simple site with one URL per page, but risky the moment the same content becomes reachable more than one way. A relative href works in a browser but is technically ambiguous for crawlers, so the spec-compliant, unambiguous form is always an absolute URL.
A canonical pointing at a genuinely different path isn't necessarily wrong — for example, a print-friendly or AMP version canonicalizing back to the main article — but it's worth double-checking it's intentional rather than a copy-paste mistake from another page's template.
Frequently asked questions
What happens if I don't set a canonical URL?
Search engines will pick one automatically based on their own heuristics, which usually works fine for simple sites. It becomes important once the same content is reachable through multiple URLs — query parameters, trailing slashes, http vs https — where you want explicit control over which one gets indexed.
Can a page's canonical point to itself?
Yes, and that's the common case — most pages set their own absolute URL as their canonical, as a defensive measure against URL variants (tracking parameters, etc.) accidentally getting indexed as separate pages.