What is a canonical tag?
A canonical tag tells search engines which URL is the main version of a page when the same content is reachable at several URLs. It is a link element in the page's <head>:
<link rel="canonical" href="https://example.com/blog/seo-guide" />Duplicate URLs are common: http and https, www and non-www, a trailing slash or not, tracking parameters, sorting and filter options, print versions and syndicated copies. The canonical tag consolidates their ranking signals onto one URL, so Google indexes and shows the version you chose.
For PDFs and other files without a <head>, send the canonical as an HTTP header instead: Link: <https://example.com/file.pdf>; rel="canonical". This checker reads both.
What this canonical tag checker tests
| Check | Pass | Warning or fail |
|---|---|---|
| Canonical present | A tag or Link header is found | None: Google chooses the canonical itself |
| Exactly one | One canonical URL | Duplicates (warning) or different URLs (fail) |
| In the | Every tag is in the head | A tag in the is ignored |
| Absolute URL | A full https:// URL | Relative (warning), empty or invalid (fail) |
| HTTPS | The canonical uses https | It points to http:// |
| Self-referencing | The canonical is the final URL | A www, slash, protocol or parameter variant |
| Canonical target | Returns 200 with no redirect | Redirects, 404, 5xx or no response |
| Noindex | No noindex | Noindex plus a canonical elsewhere: mixed signals |
| og:url | Matches the canonical | Names a different URL |
The checker fetches each page live, follows its redirects and reports the chain, so you see the final URL Google lands on.
Self-referencing vs cross-page canonicals
A self-referencing canonical points at the page's own URL. Add one to every indexable page: it protects the page from parameter and protocol duplicates you did not plan for.
A cross-page canonical points at a different URL. Use it on true duplicates: a product reached through several categories, a filtered list, or an article republished on another site (a cross-domain canonical). The page with the cross-page canonical will usually not rank on its own.
Do not canonicalize paginated pages (page 2, 3…) to page 1, and do not point a canonical at a page with different content. Google may ignore canonicals that do not match the content.
Common canonical mistakes and how to fix them
| Mistake | Fix |
|---|---|
| Two canonical tags (often a theme plus an SEO plugin) | Keep one source for the canonical and remove the other |
| Canonical in the , or an element ends the early | Move the tag high in the , before scripts or elements that browsers push into the body |
| Canonical points to http://, www or a URL that redirects | Use the exact final HTTPS URL |
| Canonical points to a 404 or noindex page | Point it at a live, indexable 200 page |
| noindex used together with a cross-page canonical | Keep the canonical and remove noindex; Google advises against noindex for choosing a canonical |
| Canonical set only by JavaScript | Put it in the server HTML; if JavaScript sets it too, make both the same |
Canonical vs 301 redirect vs noindex
- 301 redirect: the duplicate URL should not be visited at all (old URL, http to https, www to non-www). The strongest signal.
- rel=canonical: both URLs must keep working for visitors (tracking parameters, filters, syndication), but only one should be indexed.
- noindex: the page should not be in search at all. It is not a way to choose a canonical, and robots.txt is not either.
To see which URL Google actually chose, open URL Inspection in Google Search Console and compare the "User-declared canonical" with the "Google-selected canonical". Fix the page when they differ.

