A canonical URL is declared and resolves to the same page.
Without <link rel="canonical">, agents cannot tell which version of a URL is the source of truth. Tracking parameters, A/B variants, and pagination produce duplicate content; agents cite whichever URL they happened to crawl, which fragments your authority across copies.
Underlying specification: https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
- Add `<link rel="canonical" href="https://your-domain/canonical-url">` in the <head> of every page.
- Self-reference: a page at /docs/quickstart canonicalises to /docs/quickstart, not /docs.
- Strip tracking parameters (utm_*, gclid, etc.) from the canonical URL.
- For paginated lists, point page 2+ at page 1 only when the content overlaps; otherwise self-canonicalise each page.
The snippet below uses your-domain.example as a placeholder. Replace it with your actual host before deploying. For a fix tailored to your live site, run a scan and open the per-domain remediation page.
Paste this into Claude Code, Cursor, or any assistant with your repository open. It carries the steps, how to verify them, and the shortcuts to avoid. It is generic, though: run a scan to get one written from what your pages actually do.
Run a scan against your domain to see whether markup.canonical currently passes, warns, or fails. Free, no signup; the score page is permanent and citable.