Errorindexing.canonical-invalid

The canonical link can't be trusted

Why it matters

A canonical link is only useful if search engines can act on it. Google ignores it when there is more than one and they disagree, and when it sits in <body> instead of <head>. A relative address works until the page is served from another host or a staging copy, when it silently points at the wrong site, so Google recommends absolute ones. A canonical on another domain hands that domain the credit for this page: right for syndicated copies, a disaster when it is a leftover from a template or a staging site.

Source: How to specify a canonical URL and its troubleshooting notes.

How to fix it

Keep exactly one canonical link, inside <head>, with a full https:// address:

<link rel="canonical" href="https://www.example.com/this-page" />

Two usually means the theme and an SEO plugin both add one: switch one of them off. One in <body> usually means something earlier in <head> (a <div>, an <img>, a tracking snippet's <noscript>) isn't allowed there, which ends the head early: move that element out.

Examples

These are the rule's own test pages, and what it says about each. They are run on every change to the rule book.

<img src="pixel.gif">
<link rel="canonical" href="https://www.example.com/">

ErrorThe canonical link is in <body>, where search engines ignore it. Something earlier in <head> ends the head too soon.

fail-in-body
<link rel="canonical" href="javascript:void(0)">

ErrorThe canonical link isn't a web address: "javascript:void(0)".

fail-not-a-url
<link rel="canonical" href="/pricing">

WarningThe canonical link is relative ("/pricing"). It works today, and points at the wrong site the day this page is served from another host.

fail-relative
<link rel="canonical" href="https://www.example.com/a">
<link rel="canonical" href="https://www.example.com/b">

ErrorThe page names 2 different canonical addresses, so search engines ignore all of them.

fail-two-different
<link rel="canonical" href="https://www.example.com/">

PassedOne canonical link, absolute, in the head.

pass-absolute
<link rel="canonical" href="https://other.example.org/article">

InfoThe canonical link points at another site (other.example.org): search engines will credit that site for this page. Right for a syndicated copy; otherwise a mistake.

pass-cross-domain
<link rel="canonical" href="https://www.example.com/">
<link rel="canonical" href="https://www.example.com">

PassedOne canonical link, absolute, in the head.

pass-same-twice