Canonical Tag: What It Is, How to Add It and How to Check It
A canonical tag tells search engines which address is the main version of a page. See the syntax, where it goes and what our free check reports.
Free to use 16 min read Updated Oct 2026
Canonical tag in one minute
Quick answer: A canonical tag is a link element with rel="canonical" in the head section of a page. It names the preferred URL for that content, so search engines know which version to index when several addresses show the same page. Our report wants exactly one on every page.
- Pass: one canonical link element is found, and the report prints its address in a green badge.
- Warning: two or more are found, even identical ones, and every address is listed.
- Fail: none is found anywhere in the page HTML.
- Fix: add one absolute, self referencing tag to the head of each indexable page and remove any second tag that a theme or plugin adds.
The Meta Canonical row counts the tag and shows the address it found. It is not a redirect audit, and the section on how we test spells out its limits. The report is free and needs no account.
What is a canonical tag?
The canonical link element carries a rel value of canonical and an href attribute that holds the preferred address of the page. Search engines weigh it together with other signals, so treat it as a hint rather than an order. Here is what one looks like in the page source:
<link rel="canonical" href="https://example.com/shoes/">It has three parts: the link element, the rel keyword that says what kind of link it is, and the href that carries the address you want treated as the main one.
- Canonical link and rel canonical. Both names mean the same link element.
- Canonical URL. This is the address the tag points to, which is a different thing from the tag that declares it.
The major search engines announced support in 2009, and the RFC 6596 canonical relation later described it. That document is informational, not an Internet standard. Files that are not HTML, such as a PDF, can carry the same signal in an HTTP Link header, shown in the syntax section below.
Choosing one preferred address across http and https, with and without www, and with or without a trailing slash involves redirects. The URL canonicalization guide covers that, so this page stays on the tag itself.
Why the canonical tag matters for SEO
When the same content can be reached at several addresses, link equity and relevance get split between them, and on large sites Googlebot can spend crawl budget fetching copies instead of new pages. A canonical signal asks search engines to treat one preferred URL as the main one and to combine the ranking signals from the rest.
Duplicate addresses come from the way sites work:
- URL parameters. A link ending in utm parameters such as utm_source, or one carrying session IDs, loads the same page under a new address.
- Sorting and faceted navigation. A shop list sorted by price is usually the same list in a different order.
- Printer friendly copies. A second version of an article built for printing repeats the full text.
- Host and protocol versions. The www and bare domain, or http and https, can both answer.
- Shared products and syndicated content. One product under three category paths, or an article republished on a partner site, appears more than once.
Be clear about the limits. The tag is not a ranking boost, it does not stop crawling, and it will not rescue thin or unrelated pages. Google can choose a different canonical when other signals disagree with it. A wrong tag costs more than a missing one: if hundreds of pages point at one unrelated address, those pages can drop out of the index.
Google's documentation lists redirects and rel canonical as strong signals and a sitemap entry as a weak one. The comparison table further down puts them side by side, and the technical SEO checklist shows where the tag sits in a wider audit.
How SEO Site Checker tests your canonical tag
The Meta Canonical row in our free report reads the page the way a browser does and counts canonical link tags. It does not judge the quality of the address, so you should know exactly what a green badge does and does not prove.
The exact rule: our report opens your page in a headless Chrome browser, waits for it to load and takes the final HTML after any redirects. It then counts the link elements whose rel includes canonical and prints the href of each one. The URL Canonicalization row runs the same code, so the two rows always agree and a tag problem shows up in both.
What the report counts
The count is made on the rendered DOM after the page has loaded, so a tag that a script adds in time is seen. Every tag found is listed with its address, so an old staging host or a stray parameter stands out. A rel with several keywords, such as alternate canonical, is counted too.
Pass, warning and fail in our report
The icon on the row is green, amber or red, and the two non passing states also show the red How to Fix button.
| Status | What we found | What it means | What to do |
|---|---|---|---|
| Pass (green) | Exactly one canonical link tag | A single hint is declared and its address is shown in the badge | Nothing, apart from checking the address by hand |
| Warning (amber) | Two or more canonical link tags | The page sends repeated or conflicting hints, even if the addresses match | Find the source of each tag and remove all but one |
| Fail (red) | No canonical link tag | Search engines choose the main address without your input | Add one self referencing tag to the head |
One quirk to know about: the amber state shows the same message as the red one, This webpage is not using the Canonical meta tag, so a page with two tags is told it has none.
What the test cannot see
A pass only proves that one tag exists. The address is not checked, so an empty, relative, http or other domain address still passes, and we do not test whether it is reachable or indexable. There is no head only rule either, so a tag in the body is counted although Google reads only the head and would ignore it.
A canonical sent only in an HTTP Link header is not seen, because the check reads the HTML. Capital letters matter too: rel="Canonical" is not counted, even though the MDN link rel values page in the MDN Web Docs says keyword values are case insensitive. A browser would accept it, our count would not, so the row would show a fail for a tag that exists. Confirm the address by hand using the checking methods further down.
Canonical tag syntax and where to place it
This is a minimal head with the canonical line in its usual place:
<head>
<meta charset="utf-8">
<title>Running Shoes for Trail and Road</title>
<meta name="description" content="A short summary of the page.">
<link rel="canonical" href="https://example.com/shoes/">
</head>Notice that the tag sits inside the head with the other metadata and uses an absolute URL. The page it describes lives at exactly that address.
Rules that keep the tag valid
- Head only. Google ignores the tag anywhere else, so one pushed into the body by a broken template does nothing, even where our row counts it.
- One per page. A second tag turns a clear hint into a conflict.
- No fragment. Leave off anything such as #section, because it is not part of the page address.
Write the address in full, with protocol and host. RFC 6596 allows a relative URL, but Google advises full addresses, and a full address leaves no room for misreading. It also has to match the live page: if the tag says http while the site serves https, Google will probably pick the https version anyway. Keep rel in lowercase as well, as covered above.
Google also ignores canonical annotations that carry hreflang, lang, media or type attributes, so language alternates belong in their own separate link elements. JavaScript can inject the tag, but the HTML sent by the server is safer, so check the source again after any script change. The official wording is in the Google rel canonical guidance on Google Search Central.
Canonical as an HTTP header
A PDF or an image has no head to hold a tag, so the server can send an HTTP Link header canonical instead. The address goes in angle brackets, followed by the relation. This example is the header the server sends along with shoe-sizing.pdf, naming the web page that should win:
Link: <https://example.com/guides/shoe-sizing/>; rel="canonical"It suits a PDF copy of a web page, where you want search engines to prefer the page and not the file. Our report does not read headers, so check this one with curl, as shown in the checking section.
How to add a canonical tag to your website
Most platforms already print a self referencing tag, so view the page source first and add one only when the report shows a fail. Menu names change between versions, so read each step against the vendor's current help page.
WordPress
- Look before you add. Core WordPress prints a self referencing tag on single posts and pages through its rel_canonical function, which hooks into wp_head. Archives are not covered by that function.
- Use your SEO plugin. Yoast SEO and Rank Math print their own tag and give you a Canonical URL field in the Advanced area of the post editor, which you can use to point a page somewhere else.
- Remove the double. Two tags usually mean the theme and a plugin both print one. Delete the theme's line, or unhook the core function with remove_action on wp_head for rel_canonical.
Shopify
- Open the code. In the admin go to Online Store, then Themes, then Edit code, and open theme.liquid.
- Find the line. Most themes already print the canonical_url Liquid object inside a link element in the head, so search the file for canonical before adding another.
- Add it if missing. Paste the line below inside the head. If the report shows two tags instead, an app or a second snippet usually prints the extra one.
<link rel="canonical" href="{{ canonical_url }}">Wix
- Know the default. Wix adds a canonical tag to every page on its own.
- Change it only when needed. Per the Wix help center, open Pages and Menu, choose More Actions, then SEO basics, the Advanced SEO tab and Additional Tags, and edit the canonical entry. Check that path against the current editor, and if the report shows two tags, look there for a hand added one that duplicates the default.
Plain HTML and static sites
Paste the tag in the head of each page, or build it in the shared layout from a base address plus the page path, so new pages get one automatically. The classic slip is copying a finished page as a template and forgetting to change the address.
Next.js and Laravel
- Next.js. In the App Router, set alternates with a canonical value in the page metadata and the framework prints the tag in the head. Set metadataBase once in the root layout so a relative path resolves to a full address.
- Laravel Blade. Add a link element to the layout head, built from the stored clean path rather than the raw request address, so query strings never leak into it.
export const metadata = {
alternates: { canonical: "https://example.com/shoes/" },
};<link rel="canonical" href="{{ url($page->path) }}">In the Blade line, url() builds the address from the stored path. Using request()->fullUrl() would copy every query string into the tag, while url()->current() would not.
The same rules apply everywhere: one tag, in the head, absolute, and self referencing unless you deliberately point elsewhere.
Self referencing canonical tag: the safe default
The rule: every indexable page names its own clean address. A self referencing canonical protects against parameter copies, tracking links and scraped versions, and Google's documentation recommends it.
Making the address clean means stripping tracking and session parameters, keeping one slash style, and using https with the preferred host. On dynamic sites, build the tag from a stored preferred path and not from the address in the request. Otherwise the tag copies every parameter a visitor happens to add, and you have recreated the problem inside the fix.
Two cases need extra thought. With pagination, each page of a list should name itself, not page one, because Google advises against using the first page as the canonical for a whole series. Translated pages follow the same logic: each language version names itself, and hreflang links connect the alternates. Slash, case and parameter choices belong to URL structure, so the SEO friendly URL guide is the place to settle them.
When a canonical tag should point to another page
Sometimes the tag should name a different page. RFC 6596 sets the limit: the target must hold the same content or a superset of it, and pages that only look alike but differ in meaning must not share a canonical.
| Situation | Where the tag points | Example |
|---|---|---|
| Tracking parameters on a link | The clean address | /shoes/?utm_source=news points to /shoes/ |
| Sorted or filtered list | The main category | /shoes/?sort=price points to /shoes/ |
| Printer friendly page | The normal page | /guide/print/ points to /guide/ |
| Product variants that differ only by color | The main product | /boot-blue/ points to /boot/ |
| Syndicated article on a partner site | Your original article | The partner's copy points to your post |
A cross domain canonical is allowed. For syndication, ask the partner to add one pointing to your original article, because you cannot edit their site. If an old address is retired and nobody needs it, a 301 redirect is the better tool, and the URL canonicalization guide covers that route.
Here is the pairing for a tracked address. The page served at the parameter address should carry this tag in its head:
Address in the browser: https://example.com/shoes/?utm_source=news&utm_medium=email
Canonical tag: <link rel="canonical" href="https://example.com/shoes/">Canonical tag vs 301 redirect, noindex and sitemap
These four methods get confused constantly, yet they do different jobs. Choose by what visitors should experience and how strongly you need to tell search engines.
| Method | What visitors see | Signal strength | Use it when |
|---|---|---|---|
| 301 redirect | They are moved to the new address | Strong, and the old address stops serving | The old address is retired |
| Canonical tag | Both addresses keep working | Strong | Duplicates must stay reachable |
| Sitemap entry | Nothing changes | Weak | You list only preferred addresses |
| Noindex | Nothing changes | Not a canonical signal | A page should be removed from the index and not appear in search at all |
Google's documentation calls redirects and rel canonical strong signals and sitemap inclusion a weak one, and signals work best when they agree. So do not mix them carelessly. Never combine noindex with a canonical that points to another page, because the two instructions contradict each other, as the noindex tag guide explains. Never list non preferred addresses in your sitemap either, and the XML sitemap guide shows how to keep that file clean.
Canonical tag mistakes that trigger a warning or fail
Our report shows a warning for two tags and a fail for none. Other mistakes pass the report and still hurt, so the list separates the two groups.
Mistakes our report catches
- Two tags. A theme and an SEO plugin each print one, or a cached head fragment adds a second. The report warns, and conflicting tags may be ignored, so remove the extra.
- No tag on some templates. Archives, taxonomy pages and custom templates are the real gaps, typically theme code or a custom post type archive that no plugin covers, and each shows a fail. Add the tag in the template that builds them. Error pages and internal search results are different: a red row there is expected and harmless while they return a 404 or carry noindex, so ignore it and never add a canonical to a 404.
- A tag that is not a tag. A meta element with name="canonical" is not a real canonical tag, and rel written with capitals is not counted by our test, so both show a fail. Switch to a link element with lowercase rel.
Mistakes only a manual check or Search Console shows
- Leftover staging or http addresses. After a launch or migration the tag may still name a test host, and relative or empty values behave just as badly. Search the source for your old host.
- Bad targets. A canonical that points at a redirected, missing or noindex page wastes the signal, and a canonical chain from A to B to C makes it worse. Point straight at the final live address, one that returns 200.
- Everything points home. Sending every page to the home page can drop real pages from the index. Self reference unless a page is a true duplicate.
- A tag in the body. A stray element in the head can close it early and push the tag down. Fix the markup above the tag.
Search Console canonical statuses
Search Console reports canonical trouble in the page indexing report, and the wording is easy to misread. Duplicate without user selected canonical means you declared nothing, so Google chose a main address itself: add a self referencing tag. Duplicate, Google chose different canonical than user means you declared one and Google disagreed. Check redirects, internal links and sitemap entries that favor another address.
Alternate page with proper canonical tag is the odd one out, because it is usually fine. It means Google accepted your tag and left the duplicate out on purpose, so leave it alone.
Once you have changed something, use the checks in the next section to confirm the fix.
How to check a canonical tag on any page
- Start with our report. Read the Meta Canonical row. The green badge shows the address we found.
- View the page source. Press Ctrl+U (Cmd+Option+U on a Mac in Chrome) or right-click and choose View page source, search for canonical and confirm one tag inside the head. View source shows the HTML the server sent, while the Elements panel in Chrome DevTools shows the page after scripts have run.
- Use the command line. A curl call piped to grep prints just the tag, even on a minified page, and a second call with the head flag shows any Link header, which is where the PDF example from earlier would show up.
- Ask Search Console. The URL Inspection tool in Google Search Console shows the user declared canonical next to the Google selected canonical. If they differ, look for conflicting signals such as redirects, sitemap entries or internal links.
curl -s https://example.com/shoes/ | grep -io '<link[^>]*canonical[^>]*>'
curl -sI https://example.com/guides/shoe-sizing.pdf | grep -i "^link:"The first command prints each link element that mentions canonical and nothing else. To read every head tag at once, the Meta Tag Analyzer lays them out on one screen.
Canonical tag checklist
- One tag per page. Exactly one, inside the head, on every indexable page.
- Absolute https address. It matches the live page, host spelling and slash style included.
- Self reference by default. Point elsewhere only for true duplicates.
- A healthy target. It returns 200, can be indexed and does not redirect.
- Consistent signals. Internal links and the sitemap use the same preferred address.
- No contradictions. Never pair a robots meta tag noindex with a canonical to another page.
- Re-test after changes. Run the report again after a theme change or migration.
How to Fix
The short version, the same steps you see when you click How to Fix in your report.
Why this fails: the report did not find exactly one canonical link tag in the HTML of this page. No tag at all is a fail, and two or more tags is a warning that uses the same wording.
Why it matters: without a tag, search engines choose the main address themselves whenever the page loads at several addresses. With two tags the hints conflict and may be ignored. Keep a tag on every indexable page, even when you have no obvious duplicates, and do not remove it.
How to fix it:
- Decide the one clean address for this page: https, your preferred host and no tracking parameters.
- Add one canonical link tag inside the head with that absolute address if the report shows none.
- View the page source and search for canonical if the report shows two or more, then find which theme file or plugin prints each tag and remove all but one.
- Save the change, clear any page cache and reload the page.
Copy this line and replace the address with your own:
<link rel="canonical" href="https://example.com/your-page/">- WordPress: SEO plugins print a self referencing tag, so a second tag usually comes from the theme.
- Shopify: the theme.liquid file prints the canonical_url object.
- Wix: a default tag is added, and in the current Wix editor you change it under Advanced SEO, then Additional Tags, in the page SEO basics.
- Static or custom sites: paste the line into the head template.
Re-test: view the source, search for canonical and confirm one tag in the head. Then run our free report again and check that the Meta Canonical row turns green. The Google rel canonical guidance explains the rules in full.
Frequently Asked Questions
What is a canonical tag in SEO?
Where do I put the canonical tag in HTML?
Do canonical tags improve rankings?
Can a page have more than one canonical tag?
Can Google ignore my canonical tag?
Should every page have a self referencing canonical tag?
How do I check if a page has a canonical tag?
How do I add a canonical tag in WordPress?
See how your site scores right now
Paste your address into the free report, then use the How to Fix button on anything that needs work.
Free to use. Results in under a minute for most sites.