Skip to main content
Detects mismatch between HTML canonical tag and Link header
Rule IDcore/canonical-header
CategoryCore SEO
ScopePer-page
Severitywarning
Weight7/10

Solution

When both HTML canonical tag and HTTP Link header are present, they must match. Search engines may get confused by conflicting signals. HTML: <link rel="canonical" href="https://example.com/page"> HTTP: Link: <https://example.com/page>; rel="canonical" Best practice: Use HTML canonical tag only. Only add Link header if unable to modify HTML (e.g., PDF files).

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["core/canonical-header"]

Disable all Core SEO rules

squirrel.toml
[rules]
disable = ["core/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["core/canonical-header"]
disable = ["*"]