- Class
- C2 Recommended
- Weight
- 4
- Severity on fail
- major
- Applies to
Test this rule on a live site with the canonical tag checker. Free, no account needed.
Scope and evidence
Evaluated on pages in P with a head canonical. The book marks this requirement DOCUMENTED RECOMMENDATION, SEARCH-ENGINE-SPECIFIC.
Fail conditions
Each condition has a stable code and a reason template. The evaluator fills the placeholders from observed values only; no sentence in a report is generated.
relativeThe canonical on {url} is “{href}”, a relative reference. Google recommends absolute URLs in rel="canonical". (RFC 6596 allows relative references; Google's guidance is stricter.)
empty_hrefThe canonical element on {url} has no URL.
The documented fix
Build canonical URLs from the configured base URL, never from the request's Host header.
Sources, quoted
These are the passages the rule rests on, stored once in the knowledge base and emitted exactly as written. A citation marked for specific conditions appears only on findings with those codes.
“Use absolute paths rather than relative paths with the rel="canonical" link element.”
[G-CANON] How to specify a canonical URL with rel="canonical" and other methods · General canonicalization best practices · last updated 2026-07-10
https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls“Specify a relative IRI (see [RFC3986], Section 4.2).”
[RFC6596] RFC 6596: The Canonical Link Relation · 3. The Canonical Link Relation · last updated April 2012
https://www.rfc-editor.org/rfc/rfc6596.html