Skip to Content
OpportunitiesTechnicalIssue ReferenceCanonicalsCanonical points to a redirecting URL

Canonical points to a redirecting URL

What it is

The page’s canonical tag names the URL that redirected to it. Anyone who opens that URL is sent to this page, while this page says the other URL is the one to index. It usually comes from one site-wide setting: the site redirects example.com to www.example.com, but its canonical tags and sitemap still use example.com.

Why it matters

Google documents a redirect and a canonical tag as strong signals  of which URL to index, and a sitemap as a weak one. Here they point in opposite directions, so Google has to choose, and Search Console may list your sitemap URLs as redirected instead of indexed. AI assistants that rely on a search index are then likely to cite whichever URL Google chose, which may not be the one your tags name.

How Asky checks it

Asky reads the first <link rel="canonical"> with a non-empty href in the page’s raw HTML and compares it with both URLs of a redirected fetch: the URL listed for the page and the URL it landed on. The page is reported when the canonical names the listed URL but not the landing URL, ignoring a trailing slash, the query string and the case of percent-escapes. It is not checked when the landing URL is crawled as a page of its own. A redirect that changes more than the protocol, www or a trailing slash also raises page redirects to another URL.

Reported as a warning with medium severity.

How to fix it

  1. Pick the one address each page should be indexed under, for example https://www.example.com/guide.
  2. Make the canonical tags name that address. In Webflow, set the host in the global canonical tag URL under Site settings, SEO. In WordPress, the Site Address (URL) in Settings, General and your SEO plugin build the canonical from it. With Sanity, the site’s front end writes the tag, so change the base URL it uses.
  3. List the same addresses in the sitemap, so the sitemap, the canonical tags and the redirect agree.
  4. Keep the redirect from the other host to the chosen one.
  5. A full-site audit re-checks the pages: the issue clears once each canonical names the address the page is served from.

Example

https://example.com/guide redirects to https://www.example.com/guide, which names the redirecting URL:

<!-- Before: names the URL that redirects here --> <link rel="canonical" href="https://example.com/guide"> <!-- After: names the URL the page is served from --> <link rel="canonical" href="https://www.example.com/guide">

← Back to Canonicals

Last updated on