Trakis

Trakis · Rules

Relative canonical

Canonicals written as relative addresses (/page instead of https://site/page). Google supports relative canonicals but advises full addresses: a relative one is resolved against whatever address the page was reached on, so on a copy of the site, such as a test server crawled by mistake, it names the copy. A full address removes the doubt.

NoticeINDEX-005 · Indexation · checked on every page

A relative canonical: why Google advises a full address

Updated 28 October 2026.

A canonical tells search engines which address is the page’s own when the same content can be reached at several. This check finds canonicals written as a path, /shoes, instead of a full address with the scheme and the host.

<link rel="canonical" href="/shoes">                       relative
<link rel="canonical" href="https://www.example.com/shoes">  full

What Google says (consolidate duplicate URLs):

  • Use full addresses rather than relative paths in rel="canonical".
  • Relative paths are supported, but can cause problems in the long run, for example if a testing site is crawled by mistake.
  • The element is only accepted in the page’s <head>.

Here is why. A relative canonical is completed with the address the page was reached on. On the real site, /shoes becomes https://www.example.com/shoes, as meant. On a copy of the same pages at another host, a staging server, an old domain, a CDN’s own address, it becomes that copy’s address: every page of the copy names itself as the original. Written in full, the canonical names the real site wherever the page is read. Until 18 October 2026 this check named migrations as the danger, which Google does not; it now gives Google’s reason.

Where relative canonicals come from:

  • Templates written by hand that print the page’s path, often so one codebase can serve several domains or a staging copy without changes.
  • Frameworks whose canonical setting takes a path unless a base address is configured.

Build the canonical from one configured base address, the host you want indexed, and the page’s path. A staging copy then names the real site, which is right; and it should also be closed to crawlers or behind a password.

Ours, as it is. trakis.io’s canonicals are full addresses, built from one base address: <link rel="canonical" href="https://trakis.io/rules/crawl-001"/>. The demo shop’s are full addresses too, where it declares one; its 30 product pages declare none, on purpose, which is INDEX-003.

Check it yourself. View the page source and search for rel="canonical": the address should begin with https:// and your domain.

How the audit decides.

  • It reads the canonical in each page’s <head>, or in an HTTP Link header; one in the body is ignored, as Google ignores it, unless the page is a Next.js page that streams it there for React to move into the head. One that does not begin with http:// or https:// is INDEX-005, a notice, with the canonical as evidence.
  • It does not judge where the canonical points: one that names another page is INDEX-004, and a whole domain naming another one is INDEX-006.

Sources, read on 28 October 2026: Google Search Central, How to specify a canonical URL with rel="canonical" and other methods.

How common it is

In our study of 330 small sites, read from Common Crawl’s October 2026 archive (up to 100 pages a site), 3.3% of them had this problem on one page or more.

Where it usually comes from

Hand-written templates that print the path instead of the full address, often to make the site work on several domains at once.

If Search Console says…

In the Page indexing report, these statuses can come from what this check finds:

  • “Alternate page with proper canonical tag”. A relative canonical that resolves to another address makes this page an alternate of that one, even when it was meant to name itself. What this status means, and how to fix it.
  • “Duplicate without user-selected canonical”. A relative canonical is easy to break. When it points at the wrong address, or at none, Google falls back to choosing one itself. What this status means, and how to fix it.

How to fix it

  • Write the canonical as a full address, with https:// and the host you want indexed: <link rel="canonical" href="https://www.example.com/shoes">.
  • Set it in the template from the page’s own address, not from the address it was requested on, so a duplicate host cannot leak into it.
  • Check that the address it names answers 200 and is not itself redirected.

How to check it yourself

View the page source and check that the canonical begins with https:// and your domain.

What it looks like in a report

Notice The canonical is relative. · evidence: /shoes

It works on the right host and points at the wrong one on any copy; writing the full address closes that gap. (An example shop; the numbers are illustrative.)

How the audit counts it

INDEX-005 is a notice in the indexation category, and weighs lightly in that category’s score. When it appears on many pages built from the same template, the report shows it once, with the number of pages it covers — because one change in the template fixes all of them.

If the finding is deliberate on your site, it can be accepted as intentional in the report. It then leaves the list and the score, and comes back on its own if what it shows changes.

Other indexation checks

Find it on your site

A free Trakis audit runs this check and the other 66 on your site, and tells you on how many pages each one sits. Or go back to all the rules.