Skip to main content
All rules

SEO-006

Canonical URL points to another site

LowDefault severity · SEO / Quality · SEO, quality and performance

Last reviewed

What it checks

A <link rel="canonical"> that points to a different host or cannot be parsed. A missing canonical is not reported: Google picks the canonical itself when there is none.

Why it matters

Duplicate URLs (www, trailing slashes, preview domains) split ranking signals.

Recommended fix

Add an absolute canonical URL for every public page that points at the production domain.

How to verify

View source and confirm <link rel="canonical" href="https://your-domain/...">.

Example fix prompt

Generic prompt (your report adds the evidence)
Please fix this production issue in my app.

Issue SEO-006: Canonical URL points to another site
Site: https://your-app.example

First confirm the issue in the code or live config. If it is not present, say so and change nothing.
Task: Add an absolute canonical link tag to every public page pointing at the production domain version of that page (set a metadataBase or site URL constant once, then a canonical per page). Make sure preview deployments do not set themselves as canonical.

Constraints: make the smallest change that fixes this, keep the current design and behaviour, never paste secret values into code or chat, and tell me which files you changed.
Done when: View source and confirm <link rel="canonical" href="https://your-domain/...">.

References