Skip to Content

Canonical tag missing

What it is

The page’s HTML has no <link rel="canonical"> tag. A canonical tag names the preferred URL for a piece of content. On a page that names itself, it settles which address counts when the same page is also reachable with tracking parameters, with or without a trailing slash, on the www host or with a sorting option.

Why it matters

Without one, Google works out the canonical itself  from the variants it finds. It often chooses well, and Google says a site can do fine without the tag, but it may settle on a parameter URL or a host you never link to, and the address shown and cited is then not yours to choose. Google recommends that the canonical page name itself in its own canonical tag, and it is cheap to add once in a template.

How Asky checks it

Asky looks for a <link rel="canonical"> anywhere in the page’s raw HTML, in the head or the body; a canonical added by JavaScript is not seen. The page is reported when there is none. A canonical sent in an HTTP Link header is not read, so a page that sets it only there is reported too. rel is read as a list of values in any letter case, so rel="canonical nofollow" counts, while a tag with an empty or missing href names no page and counts as missing. When the tag is missing, no other canonical check runs on the page.

Reported as a warning with medium severity.

How to fix it

  1. Add a canonical tag to the page’s <head> that points to the page’s own URL, written in full with https:// and your preferred host. If the page already has one with an empty href, usually a blank canonical field in the CMS, fill it in.
  2. Set it once for all pages rather than page by page. WordPress adds one to posts and pages itself, and SEO plugins extend it to archives and the home page. Webflow can generate one for every page from the global canonical URL in the site’s SEO settings. On a headless setup such as Sanity, the front-end template has to output it from each document’s URL.
  3. Make sure the tag is in the HTML the server sends, not injected later by a script, so every crawler sees it.
  4. Output exactly one canonical tag. A second one, even with the same URL, is reported as multiple canonicals.
  5. Keep the URL absolute and without a # part: a path alone or a fragment raises its own canonical issue.
  6. To leave it as it is: if the page sets its canonical in an HTTP Link header, which Google also reads, mark the issue resolved.

Example

https://example.com/blog/pricing-guide has no canonical tag. One line in the head names the page itself:

<!-- Before --> <head> <title>SaaS Pricing Guide: Models and Examples</title> </head> <!-- After --> <head> <title>SaaS Pricing Guide: Models and Examples</title> <link rel="canonical" href="https://example.com/blog/pricing-guide"> </head>

← Back to Canonicals

Last updated on