Skip to content

Technical pillar / check canonical-correctness

Canonical tag: does each page name itself as the address to index?

We read the rel="canonical" link in the HTML of each page we audit and compare it with the address we received. A canonical tag tells Google which of several addresses for the same content to show, and to credit with links.

By , Founder and CEO, Own The Climb · Last updated

This is how we check it

We read the canonical tag in the HTML your server sends, before any JavaScript runs, and compare the address it names with the address the page came from.

  • We look for a canonical in the page's <head> and in its HTTP Link header.
  • We compare the address it names with the page itself.
  • We flag a canonical that names the plain http:// copy of a page we received over https://.
  • We also flag two canonicals that disagree, and a canonical outside the <head>, where Google does not read it.

Our reasoning behind this

One page can have several addresses, including versions with tracking codes or a trailing slash. A canonical tag tells Google which address you want indexed and which should receive credit for links. Google says a site will likely do just fine without one, because Google picks a canonical itself; we would still add it on any site with filters, tracking codes or copies. A tag naming the wrong page can cost visits if Google shows that address or treats this page as a duplicate.

“a strong signal that the specified URL should become canonical”
Google Search Central, How to specify a canonical URL

One page, reachable at several addresses

  • example.com/services/estate-planning
  • www.example.com/services/estate-planning
  • example.com/services/estate-planning/
  • example.com/services/estate-planning?utm_source=email

Each copy names one address

<link rel="canonical" href="https://example.com/services/estate-planning">

Google indexes and shows that one

Without the tag, Google picks one of the addresses itself, and links to the others may be credited to a different address than the one you want shown.

What a pass and a finding look like in our reports

Each example shows a piece of markup and the finding title our audit uses for it. We explain the example underneath so you can understand the result in your own report.

  • <link rel="canonical" href="https://example.com/services/estate-planning">

    PassCanonical self-references this URL

    The page names itself with its full https:// address, so there is nothing here for you to change.

  • <link rel="canonical" href="http://example.com/services/estate-planning">

    mediumCanonical names the http:// copy of this page

    The tag names the plain http:// copy even though we received this page over https://. We would correct the tag and check that the http:// address redirects to the secure page.

  • <link rel="canonical" href="https://example.com/services">

    infoCanonical names another page

    This is the right setting for a true copy, such as a print version, and the wrong one for a page you want found on its own; because we cannot tell which you meant, we show it as a note for you to check, and it does not change your score.

  • <title>Estate planning</title>

    infoNo canonical tag (optional)

    Google will choose an address on its own, so this note does not change your score. We would still add a canonical on a site with filters or tracking codes, so those copies name the address you want shown in search.

How we would fix it on your site

  1. Add one <link rel="canonical" href="https://example.com/your-page"> to the <head> of every page you want found, replacing the example with that page's own full https:// address you want shown in search.
  2. On the page you want found, the tag names that page itself. On a true copy, such as a print version or an address with tracking codes, it names the original.
  3. Keep your canonical tags, internal links, sitemap and redirects pointing at the same address.
  4. Check one page with the URL Inspection tool in Google Search Console, which shows the canonical Google chose.

Once your change is live, run the audit again and review the new findings alongside the pages it covered.

How to make the change on your platform

What to do on each platform
PlatformWhat to do
WordPressWordPress adds a self-referencing canonical to posts and pages; Yoast SEO and Rank Math take it over and let you set a different canonical per page in the advanced settings. Keep only one plugin writing it.
ShopifyThemes print {{ canonical_url }} in theme.liquid. Check that your theme still has that line after customization.
Squarespace and WixBoth add a self-referencing canonical to every page. Wix lets you change it per page in the page SEO settings.
Next.jsSet metadataBase in the root layout and alternates.canonical in each page's metadata, so every canonical is an absolute address.

What we want you to review

  • Check that a theme or plugin has not assigned the homepage as the canonical for every page.
  • Update canonical addresses that still name http:// or a staging domain after a migration.
  • Remove conflicting canonical tags, such as a theme tag and an SEO-plugin tag naming different addresses.
  • Give each page in a paginated sequence its own canonical. Google’s pagination guide advises against using page 1 as the canonical for the whole sequence.

The exact rules our audit applies

We wrote this part for your developer or your SEO specialist. It sets out the inputs, scoring rules and confidence limits we publish for this check, together with the full explanation of how we would fix a finding.

The inputs we describe for this check

We read every <link rel="canonical"> element in the <head> of the HTML your server sends, before any JavaScript runs. When we also render the page in our browser, we read the canonical the browser shows and compare the two.

We name a canonical in the page body, a <noscript> or an inline SVG in the finding and leave it out of the comparison, because Google reads a canonical only in the <head>. We also leave out a canonical after an element that ends the head early.

Browsers close the head at the first element that does not belong there, such as an <img> or a <div>; Google says it then "stops reading any further elements" in the head. We resolve each href against the page's <base href> when it has one, or else the address where the page landed after redirects, so a relative href works.

We compare the full addresses, including scheme, host, path and query string, ignoring one trailing slash and tracking parameters such as utm_source and gclid. We pass a canonical that names the page itself and report one that names another address with both addresses. We give an insecure canonical its own finding when it names the plain http:// copy of a page we received over https://.

That tag does not establish whether the insecure address redirects or whether HTTPS is enforced, and we keep reading the page when choosing the audit sample. We report a missing canonical when the page has no canonical element or HTTP Link canonical. We also read a canonical in the HTTP Link header (Link: <https://...>; rel="canonical") and resolve it against the page address.

When the page has no canonical tag, we grade the header by the same rules. When the canonical names another address, we follow that address one redirect at a time, within the audit's shared link budget, and read its robots meta tag, X-Robots-Tag header and its own canonical.

We do not follow a canonical that names this page's exact address or its plain http:// copy, or one we cannot read as an address. When the link budget or the audit's time runs out, or the address refuses our request, we say we could not follow it and claim nothing about it.

A page we set aside as not representative because its canonical names another page is still checked here.

Our full reasoning

Google calls rel="canonical" "a strong signal that the specified URL should become canonical", second only to a redirect, and lists a rel="canonical" link on the canonical page itself among its best practices. It asks for absolute addresses, and warns against naming different canonicals for the same page with different methods.

The same page is often reachable at several addresses (with and without www, with tracking parameters, with a trailing slash, with a sort order), and without a canonical Google picks one itself. Google also says a site that sets no canonical "will likely do just fine", so a missing tag is a risk rather than a defect: it matters most on sites with filters, parameters or syndicated copies.

A canonical that points somewhere unintended is the costly case, because Google may then show the other address, or drop this page as a duplicate, Google shows the canonical address in its results, and its AI features take supporting links from pages that are indexed and eligible to appear in Search.

How we score what we find

Measured, on every page we read. When we rendered the page and the canonical in the browser's copy names a different address than the HTML your server sent, it is a MEDIUM finding at HIGH confidence, because Google says not to change the canonical with JavaScript and AI crawlers read only the served one.

No canonical is an INFO note that does not change your score: Google says a canonical is not required, and it picks the best address itself when none is set.

A page whose only canonical is not in the head is a MEDIUM finding at MEDIUM confidence, because the site set a preference Google cannot read, and the finding names where the tag sits: in the <body>, after the element that ended the head early, inside a <noscript> or inside an inline <svg>.

When Next.js streams the page's metadata into the body, the finding says so: Google's docs say a canonical outside the <head> is disregarded, while Next.js says Googlebot reads streamed metadata, so the safe fix is to set htmlLimitedBots: /.*/ in next.config (turns streamed metadata off), or a pattern that keeps Next.js's default bots and adds Googlebot; or to make the page's metadata static.

Two canonical tags in the <head> that name different pages are a MEDIUM finding: Google may ignore both. So is a Link header that names a different page than the canonical tag, because Google says not to specify different canonical URLs with different methods. A relative canonical resolves against the page's <base href> when it has one, as a browser does.

A canonical naming the http:// copy of this same https:// page is a MEDIUM finding at HIGH confidence. A canonical naming any other address is an INFO note at MEDIUM confidence that does not change your score, because pointing a duplicate at its original is correct and we cannot tell which you meant. A self-referencing canonical passes.

A canonical whose target is not there (404, 410, no such host, a redirect loop) or asks not to be indexed is a HIGH finding: the page asks Google to index an address Google will drop. A target that redirects, answers with a server error twice, or names yet another canonical is MEDIUM.

A target we could not follow within the budget keeps the finding above and says it was not followed.

How sure we are of each result

HIGH for a missing or self-referencing canonical, read from the HTML we received. MEDIUM for a canonical that names another address: it may be a deliberate consolidation. A canonical added only by JavaScript is reported as missing; Google can read it, so check the URL Inspection tool in Search Console before you change anything.

How to fix it, in full

Give every indexable page one <link rel="canonical" href="..."> in the <head> of the HTML your server sends, with the full https:// address you want shown in search. On the preferred page it names itself. On a true duplicate, such as a tracking-parameter or print version, it names the preferred page.

Keep the canonical, your internal links, your sitemap and your redirects pointing at the same address. Then check one page with the URL Inspection tool in Google Search Console, which shows the canonical Google selected, and re-run the audit.

The sources we rely on

What we have changed on this page

  • · When we render a page and the browser's copy names a different canonical than the HTML your server sent, that is now a MEDIUM finding that names both addresses. Single-page apps often send one canonical, the homepage, for every route and set each route's own canonical in script; Google says not to change the canonical with JavaScript, and AI crawlers that do not run JavaScript read only the served one. A page whose served HTML is an empty JavaScript shell naming another page is now opened in our browser before we set it aside, so its own canonical decides.
  • · When a canonical names another address, we now follow it: a target that is not there or asks not to be indexed is a HIGH finding, and one that redirects, answers with a server error or names yet another canonical is MEDIUM. A page our crawler set aside because its canonical names another page is now reported here instead of only in the pages table.
  • · A missing canonical and a canonical that names another page are now notes that do not change your score. Google says a canonical is not required and that pointing a duplicate at its preferred page is what the tag is for. We still name both, with the address, so you can check them.
  • · We corrected the example canonical URL, clarified what an insecure target tells us, and matched the missing-canonical advice to Google's wording.
  • · We rewrote the explanation in plain words, added examples of a pass and each finding, and corrected the full rules to describe what we check today.
  • · A canonical sent in an HTTP Link header is now read, as Google reads it. A Link header and a canonical tag that name different pages are a MEDIUM finding.
  • · The head now ends where browsers and Google end it: a canonical after an element that does not belong in the head, such as an <img> or a <div>, is named with that element and not counted.
  • · A canonical in the page body, a <noscript> or an inline SVG is no longer counted as a conflict, and the finding names where it sits. Next.js metadata streamed into the body is named as such, with the framework fix. A tracking parameter such as utm_source in the address you entered no longer makes a self-canonical read as another page.
  • · Conflicting canonical tags are now a finding instead of a pass on the first one, and a relative canonical resolves against the page base.
  • · Initial publication. A canonical that names the http:// copy of an https:// page is now a named MEDIUM finding, and such pages are read in the audit instead of being skipped as copies of another page.