The short answer
A canonical tag, written <link rel="canonical" href="..." />, names the URL you want Google to treat as the representative version of a set of duplicate or near-duplicate pages. Google then aims to index that URL and consolidate ranking signals onto it.
The thing most guides get wrong: it is a hint, not a rule. Google may pick a different canonical than you declare, based on your redirects, sitemap and internal links. And if you declare nothing, Google says it will identify the version it considers the best to show on its own.
- Use a canonical when duplicate URLs must stay live for users. Use a 301 redirect when they should not exist separately.
- Line up your other signals behind the canonical: sitemap entry, internal links and any redirects should all agree.
- Never put noindex and canonical on the same URL. The two instructions contradict each other.
How to Declare a Canonical
Google defines canonicalization as the process of selecting the representative URL for a piece of content. You can influence that choice in several ways, and Google ranks them by how strong a signal each sends. The stronger the method, the more likely Google follows your preference.
| Method | Signal strength | When to use it |
|---|---|---|
301 redirect | Strong signal | The duplicate should not exist as its own page. Sends users and crawlers to the target. |
rel="canonical" link element in the <head> | Strong signal | The default. Point near-duplicate URLs that must stay live at one representative URL. |
rel="canonical" HTTP header | Strong signal | Non-HTML files such as PDFs, where there is no <head> to place a link element in. |
Inclusion in your XML sitemap | Weak signal | List only canonical URLs. It helps, but it will not override a stronger, contradictory signal. |
The signal-strength labels are Google's own, from its guide to consolidating duplicate URLs. Internal links are not a declaration method, but Google treats them as a signal too: link consistently to the canonical version.
Why Google Sometimes Picks a Different One
Because the tag is a hint, Google reconciles it against everything else it knows about your URLs. When it overrides your choice, it is almost always because another signal points the other way. The usual culprits:
- Sitemap contradiction. The variant URL is listed in your XML sitemap while the canonical target is missing. List only canonical URLs.
- Internal link dominance. Most of your internal links point to the variant, so Google reads that as your real preference. Update the links to point at the canonical.
- A redirect says otherwise. A redirect is a stronger signal than a link annotation, so a stray redirect can win over your tag.
- The pages are not duplicates. If the content differs meaningfully, Google may decide they are separate pages and index both regardless of the tag.
To see the verdict, run the URL in Search Console's URL Inspection tool. It reports the user-declared canonical, the one you set, next to the Google-selected canonical, the one Google actually chose. When they disagree, the fix is to make your other signals agree with the tag. For the broader problem this solves, see our guide to fixing duplicate content.
A Worked Example
Illustrative scenario, not client data
An online store has a category page that visitors can sort and filter. To a shopper, /sneakers and /sneakers?sort=price are the same page in a different order. To Google they are two URLs that could split the category's ranking signals. The variants need to stay live for users, so a redirect is wrong here. A canonical is right.
- On every sorted and filtered variant, add
<link rel="canonical" href="https://store.example/sneakers" />, using the clean, absolute URL. - Give the clean
/sneakersa self-referencing canonical pointing to itself. - List only
/sneakersin the XML sitemap, and make sure the on-page navigation links to it, not to a filtered version. - Inspect a variant URL in Search Console and confirm the Google-selected canonical is the clean page.
A second common case is syndication. If you republish an article on a platform like Medium, a cross-domain canonical on the republished copy, pointing back to your original, asks Google to keep your version as the representative one. It is still a hint, so it works best when the platform supports it and your own signals are consistent.
Ask which canonical Google actually chose.
Murkuz connects Google Search Console to Claude or ChatGPT, read-only. Point Inspect_URL at any page and ask "is this indexed, and which URL did Google pick as canonical?" It returns Google's own index status, so you can see at a glance when the Google-selected canonical does not match the one you declared.
Further reading
The sources behind this page, official documentation first. Each one was opened and read in full before it was listed here.
Official docsGoogle Search Central
How to specify a canonical with rel="canonical" and other methodsThe how-to. Every supported way to declare a canonical, ranked by how strong a signal it sends, plus the note that none of them are strictly required.
Official docsGoogle Search Central
What is URL canonicalizationDefines the terms and makes the key point plainly: your canonical preference is a hint, and Google may choose a different page than you do.
ReferenceMDN Web Docs
rel attribute: the canonical valueThe neutral HTML reference for rel="canonical" on the link element: what it is for and how browsers and crawlers read it.
GuideAhrefs, Joshua Hardwick
Canonical Tags: A Simple Guide for BeginnersPractical when-and-how coverage with annotated examples for parameters, syndication and pagination. A good second read after the Google docs.
ReferenceMoz
CanonicalizationMoz's evergreen primer on duplicate URLs and consolidation, useful if you want the concept explained a second way before you implement.
Frequently Asked Questions
What does a canonical tag actually do?
A canonical tag, written as rel="canonical", tells search engines which URL you consider the main, representative version of a set of duplicate or very similar pages. When Google honours it, it consolidates the ranking signals from the duplicates onto that one canonical URL and shows it in results, rather than splitting signals across the copies. It does not remove the other URLs or block them from being crawled.
Is a canonical tag a directive or just a hint?
A hint. Google's documentation is explicit that indicating a canonical preference is a hint, not a rule, and that Google may choose a different page as canonical than you do. Google weighs several signals together, including redirects, the rel="canonical" annotation, which URLs are in your sitemap, and your internal linking. If those signals contradict each other, your stated canonical can be overruled.
Do I need a self-referencing canonical on every page?
You do not strictly need one. Google says none of the canonical methods are required and that most sites do fine without specifying a preference. That said, a self-referencing canonical, where a page points to its own clean URL, is a sensible low-cost default. It makes your intended URL unambiguous when tracking parameters get appended or when another site copies your content.
Canonical tag or 301 redirect, which should I use?
Use a 301 redirect when the duplicate should not exist as a separate page for users, for example after a URL change or a merge. A redirect sends both people and crawlers to the target and is the strongest consolidation signal. Use a canonical tag when both URLs need to stay reachable for users, such as a product that lives under two category paths or a page with sort and filter parameters. The canonical keeps the variants live while pointing ranking signals at one representative URL.
What is the difference between a canonical tag and noindex?
They solve different problems. A canonical says these pages are the same, please consolidate them onto this one. A noindex says do not include this page in search results at all. Do not combine them on the same URL, because the signals conflict: noindex asks Google to drop the page while canonical asks it to fold the page into another. If a duplicate simply should not rank, noindex it. If it is a legitimate variant of a page that should rank, canonicalize it.
Why is Google ignoring my canonical tag?
Because it is a hint, and another signal is probably stronger. Common causes: the non-canonical URL is the one listed in your XML sitemap, your internal links mostly point to the variant rather than the canonical, a redirect contradicts the tag, or the two pages are not actually similar enough for Google to treat as duplicates. Use the URL Inspection tool in Search Console to see the Google-selected canonical, then line your other signals up behind it.
Should canonical URLs be absolute or relative?
Use absolute URLs, meaning the full address including https:// and the correct host. Relative paths can be resolved incorrectly when a page is scraped, syndicated or served under more than one host, which sends Google the wrong target. Spelling out the complete URL removes that ambiguity.