Canonical tags are self-referencing and consistent
Why it matters
A canonical pointing to HTTP while the site serves HTTPS tells Google to index the insecure URL — which may not exist — and the page drops out of results. Conflicting canonical declarations (one in the layout, one in the page) force Google to pick arbitrarily, often choosing the wrong target. Cross-domain canonicals caused by copy-paste errors hand your ranking authority to the wrong host entirely.
Severity rationale
Critical because a malformed canonical can deindex the correct URL or transfer authority to a wrong destination sitewide.
Remediation
Generate canonicals from a single source of truth such as NEXT_PUBLIC_SITE_URL so every page emits absolute HTTPS URLs. Remove any canonical declaration from layouts when pages also set one — keep it in exactly one place per route. Strip tracking and session parameters from the canonical value before rendering it.
// app/layout.tsx
export const metadata = { alternates: { canonical: `${process.env.NEXT_PUBLIC_SITE_URL}/current-page` } }
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Marketing SEO Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from marketing-advanced-seo·automated