How to fix a missing or incorrect canonical tag

Add <link rel="canonical" href="..."> to every page pointing at its own absolute, preferred URL. Canonicals consolidate duplicate versions — tracking parameters, trailing slashes, http and https — into one indexable URL. A wrong canonical is worse than none: it can remove a page from search entirely.

Last updated 2026-07-28

What problem does a canonical tag solve?

It tells a search engine which of several near-identical URLs is the real one, so that ranking signals land on a single page instead of being split across copies. Without it, the same content reachable at four URLs is four competing pages, none of which is as strong as the one page should have been.

Duplicate URLs are rarely deliberate. The same page is typically reachable with and without a trailing slash, with and without www, over http and https, with UTM or affiliate parameters appended, and through sorted or filtered variants of a listing. Session IDs, print views and AMP copies add more.

A canonical names the version you want indexed. Every duplicate points at it, the signals consolidate, and search engines stop guessing.

What are the rules for setting one correctly?

Five rules cover almost every implementation: use absolute URLs, make every indexable page self-canonical, point at the exact URL form you want in search, never point everything at the homepage, and remember that a canonical is a hint rather than a command.

  • Use absolute URLs including the protocol. Relative canonicals resolve against the current page and are a frequent source of silent errors.
  • Every indexable page should be self-canonical unless it genuinely duplicates another page. This costs nothing and immunises you against parameters you have not thought of yet.
  • Match the target exactly: same protocol, same www choice, same trailing-slash convention, same casing. A canonical to the http version of a site that serves https is a contradiction the crawler has to resolve for you.
  • Never canonicalise every page to the homepage. This is the classic catastrophic mistake, and it can remove an entire site from search.
  • Treat it as a strong hint. Google weighs it against your sitemap, internal links, redirects and hreflang, and will override it when the other signals disagree.
  • Only one canonical per page. Two conflicting tags cause Google to ignore both.
  • The target must return 200 and be indexable. Canonicalising to a page that is 404, redirected, or carrying a noindex directive wastes the annotation and can push the noindex onto the source page.

What does a canonical tag look like in the markup?

A single <link rel="canonical"> element in the <head>, with an absolute href. It can also be delivered as an HTTP Link header, which is the only option for non-HTML files such as PDFs.

Self-referencing canonical
<head>
  <link rel="canonical" href="https://audra.greta.sh/fix/canonical-url/" />
</head>

<!-- On a filtered duplicate, point at the clean URL -->
<link rel="canonical" href="https://example.com/shoes/" />
<!-- served at https://example.com/shoes/?sort=price&utm_source=x -->

<!-- Non-HTML files: use the HTTP header instead -->
Link: <https://example.com/whitepaper.pdf>; rel="canonical"

Can a canonical tag remove my page from Google?

Yes, and this is the main reason a wrong canonical is more dangerous than a missing one. If your page declares another URL as canonical, you are asking Google to drop yours in favour of that target — and it usually complies.

The failure that does the most damage is a template that hard-codes the homepage as the canonical for every page on the site. Every URL then asks to be replaced by the homepage, and the site can lose its entire long tail within a few crawl cycles. A close second is a staging domain left in the canonical, which points the live site at URLs that are unreachable.

Search Console reports these as "Duplicate, Google chose different canonical" or "Alternate page with proper canonical tag". Both are worth reading as alarms rather than as informational notices.

Should I use a canonical tag or a 301 redirect?

Use a 301 when the duplicate URL should stop being reachable, and a canonical when both URLs must stay accessible but only one should be indexed. A redirect is an instruction that removes a page; a canonical is a hint that keeps it working for users while consolidating its search signals.

The practical dividing line is user need. A faceted listing at ?sort=price has to keep working for shoppers, so it gets a canonical to the clean URL. An old product URL that nobody should land on again gets a 301. Ecommerce platforms make this decision for you more often than you might expect — Shopify, for instance, exposes the same product under both /products/ and /collections/ and canonicalises to the former automatically.

How do I check the canonical on every URL at once?

Crawl the site and put the crawled URL and its declared canonical in adjacent columns, then look for rows where they differ. The dangerous patterns are only visible in aggregate: every page pointing at the homepage, a block of canonicals still on http, or a cluster pointing at a staging hostname.

Audra records the canonical URL found on each crawled page and flags pages with none, across a default crawl of 100 pages that you can raise or narrow with include and exclude path globs. Because the crawl and the report both run locally on your computer, you can safely run it against a staging site or an unlaunched domain without anything being uploaded.

The fix, step by step

  1. 1Crawl the site and list every URL alongside the canonical it declares.
  2. 2Decide the preferred URL form once: https or http, www or bare, trailing slash or not.
  3. 3Add an absolute self-referencing canonical to every indexable page.
  4. 4Check that duplicates point at the clean version and not at the homepage or a staging host.
  5. 5Confirm each canonical target returns 200 and is itself indexable, then re-crawl.

Frequently asked questions

Does every page need a canonical tag?

It is best practice for every indexable page to be self-canonical. It costs nothing, and it protects against duplicate URLs created by tracking parameters and alternate URL forms you did not anticipate.

Can a canonical tag deindex my page?

Yes. If it points elsewhere, your page can be dropped in favour of the target. Canonicalising every page to the homepage, or leaving a staging domain in the tag, are the two most damaging versions of this mistake.

Canonical tag or 301 redirect?

Use a 301 when a URL should no longer be reachable at all. Use a canonical when both URLs must stay accessible to users but only one should appear in search results.

Do canonical tags work across different domains?

Yes. Cross-domain canonicals are the correct tool for syndicated content, telling search engines that the original publisher's URL is the one to index. The same reciprocity discipline applies as with hreflang annotations — the target must agree.

Related guides