Skip to content
Documentation
Rule catalogue

canonical.absolute

rel="canonical" must be an absolute, fully-qualified URL

errorper pagevendor-spec

Why it matters

This is the failure that de-indexes a site without anybody touching a page. A relative canonical resolves against metadataBase, which defaults to localhost, so production ships canonicals pointing at a host no crawler can reach.

What the finding looks like

The message goflag prints, with example values substituted.

error canonical.absolute Canonical is "/the-page" — must be an absolute http(s) URL (consumers see the raw value, not the resolved "https://example.com/the-page").

How to fix it

This rule ships no snippet, because the remedy is a judgement rather than a line of code: the finding tells you what is out of range, and what to put there is yours to decide.

Says who?

This rule is vendor-spec, and it cites the documentsbelow. Nothing here is goflag’s opinion of what a good page looks like — if you disagree with a finding, this is what you are disagreeing with.