Skip to content
SEO Toolbox Online

Canonical Tag Checker

Checks for a canonical tag and that it resolves to an absolute URL.

What is a canonical tag?

A canonical tag is a <link rel="canonical"> element that tells search engines which URL is the main version of a page when the same content is reachable at several addresses, for example with tracking parameters or both http and https. Google treats it as a strong hint, not a command, and combines it with redirects, sitemaps and internal links.

How to use the Canonical Tag Checker

  1. Enter the URL of the page.
  2. The tool looks for a canonical link in the HTML and checks that it is an absolute URL on the same host.
  3. If it is missing or relative, add a self-referencing canonical with the full URL.

How to read the results

Passed
A canonical link exists, uses an absolute URL and points to the same host.
Needs attention
There is no canonical link, the href is empty, it is a relative path, or it points to another host. Google then has to guess the preferred URL.

How do I add a canonical tag?

Put one canonical link in the <head> of every indexable page, pointing to the clean URL you want in search results. Most pages should point to themselves.

HTML
<link rel="canonical" href="https://www.example.com/shoes/running">
Next.js (App Router)
export const metadata = {
  alternates: { canonical: 'https://www.example.com/shoes/running' },
};
HTTP header (PDFs and other files)
Link: <https://www.example.com/guide.pdf>; rel="canonical"

Common canonical mistakes

Pointing every page to the homepage; canonicalising to a URL that redirects, returns 404 or is noindexed; having two canonical tags on one page; or a canonical in the <body>, which Google ignores. WordPress SEO plugins and Shopify add canonicals automatically, so check that a theme or app is not adding a second one.

Frequently asked questions

Does every page need a canonical tag?

It is not required, but a self-referencing canonical on every indexable page is cheap insurance against parameter and protocol duplicates.

Why did Google choose a different canonical?

Google weighs the canonical tag against redirects, internal links, sitemaps and content similarity. If they disagree, it may pick another URL. Search Console’s URL Inspection shows the canonical Google selected.

Canonical or 301 redirect?

Use a 301 when the old URL should stop existing for visitors. Use a canonical when both URLs need to keep working, such as filtered or tracked URLs.

Sources

What this tool checks

  • Canonical link present

    Checks for a <link rel="canonical"> element.

    Why it matters: The canonical link is a hint that tells search engines which URL is the preferred version of a page, helping consolidate duplicate content. It is a hint, not a directive.

    If it fails: Add a self-referencing <link rel="canonical" href="…"> with an absolute URL.

    Source: developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls

  • Canonical uses an absolute URL

    Checks the canonical href is an absolute URL and resolves on the same host.

    Why it matters: Google recommends absolute canonical URLs. A relative or cross-host canonical is a frequent source of indexing mistakes.

    If it fails: Use a full absolute URL (including https:// and host) for the canonical link.

    Source: developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls

Related tools

Reviewed by Prabath Thalangama · Last updated