Skip to main content

What is a Canonical Tag? Learn How it Works!

Canonical tags explained: Tell Google your main URL version & set it up.

3D graphic of frosted glass duplicate webpage cards canonicalized to a solid orange main URL card.

You publish a product page you’ve spent weeks optimizing. A week later, your analytics show a different URL packed with tracking parameters getting the visits instead. 

E-commerce platforms and content management systems create duplicate URLs like this all the time. If you don’t say which version you prefer, Google picks one for you and your links and rankings may end up split between copies of the same page. 

The process of choosing which version of your site you prefer or canonical URL is called canonicalization. According to Google Search Central, the URL of a page that Google chooses as the representative out of a set of duplicate pages is a deduplication which helps Google to show only one version of the duplicate pages. 

This guide explains what a canonical tag is, how it compares to a 301 redirect, and how to set one up while avoiding the traps. Without further ado, let’s get started!

What Is a Canonical Tag?

3D illustration of transparent glass webpage cards with an orange HTML code tag attached to the top right corner.

A canonical tag is a line of HTML code on your page’s <head> that tells search engines which URL is your preferred version when multiple URLs show the same or similar content. You’ll also see it called rel=”canonical” or the canonical link element. It looks like this:

<link rel=”canonical” href=”https://yoursite.com/shirts/black-tshirt” />

The URL in the href is your canonical URL. Here’s an example of where a canonical tag might be used. Let’s say you’re selling a black t-shirt. Depending on how you arrive at the product page, you could land at several URLs:

  • https://yoursite.com/shirts/black-tshirt
  • Https://yoursite.com/shirts/black-tshirt?utm_source=newsletter
  • https://yoursite.com/shirts/black-tshirt?sessionid=5678

It might just be a one page for a visitor, but to a search engine it's three URLs to compare. Adding a canonical tag pointing to the clean URL on the two parameter versions, and you’re telling Google to consolidate its signals there. Category pages have the same problem with storing such as /shirts?sort=price, which could point back to /shirts.

One thing to keep in mind is that Google considers canonical tags to be a strong signal and not a command. Further explanation on this topic can be found  in the FAQ section. 

Read also: What Is E-E-A-T? Google's Quality Guidelines Explained

Canonical Tag vs. 301 Redirect

3D illustration of transparent glass document pages with a glass signpost and an orange curved redirection arrow.

Many website owners confuse canonicals with 301 redirects. While both tools deal with multiple URLs, they operate completely differently and serve entirely different purposes.

Here is a clear breakdown.


Canonical tag

301 redirect

What it does

Tells search engines which URL you prefer

Sends visitors and search engines to a different URL

What visitors see

They stay on the URL they clicked

They’re taken to the new URL automatically

Effect on signals

Consolidates ranking signals on the canonical URL

Consolidates signals on the redirect target

Best for

Tracking parameters, sort and filter URLs, near-identical variants

Deleted pages, site migrations, permanent URL changes

Use a 301 redirect when the duplicate shouldn’t exist anymore. If you want the duplicate still available to visitors but you want the preferred version to show up in search results, then use canonical tag. 

Why Canonical URLs Matter for SEO

3D illustration of a central orange gem node connected by glass pipes to four outer nodes with UI icons.

1. They Consolidate Ranking Signals

When other sites link to different versions of the same page, those links are split across URLs. A canonical tag helps Google treat them as links to one page. For example, signals from other sites to https://yoursite.com/shirts/formal?gclid=ABCD will get consolidated with links to https://www.yoursite.com/shirts/black/black-tshirt.html if the latter becomes canonical. 

Remember that this is about consolidating link signals, not boosting “domain authority,” which is a Moz metric that Google says it doesn’t use. 

You’d rather show https://yoursite.com/shirts/black-tshirt than URL full of parameters. Without a canonical tag, Google will choose and sometimes the choice may look messier and earn fewer clicks. 

3. They Reduce Wasted Crawling

Google crawls the canonical page most often and visits duplicate pages less frequently. That matters most for very large sites, such as big e-commerce catalogs with fillers. But you don’t need to worry about the crawl budget if you have a small site. According to Google, just keeping updating your sitemap and checking Page Indexing reports regularly is enough. 

How to Add a Canonical Tag

3D graphic of a glass hand placing an orange link tag on frosted glass browser windows

Step 1: Pick Your Canonical URL

Choose the cleanest version of each page: HTTPS, no tracking parameters, and a consistent format (choose whether you want www or non-www, with trailing slash or not). Then make sure to stick to it everywhere. 

Step 2: Add the Tag to Your Duplicate Pages

You need to add a rel="canonical" link directly into the <head> section of the HTML on all duplicate pages. Google only reads it there, not in the <body>. If you use CMS, check its SEO settings, because plugins like Yoast and Rank Math typically include a canonical URL field. For non-HTML files like PDFs, you can send the canonical as an HTTP header instead. 

Step 3: Add a Self-referencing Canonical

The canonical page should point to itself. Google recommends this, and it keeps the preferred URL clear if copies of the page turn up at parameter URLs later. 

Step 4: Point Every Duplicate Straight at the Final URL

Don’t send page A to page B when page B points to page C, because chains can lead into inconsistent results. Then back the tag up with consistent signals: link internally to the canonical URL, list only canonical URLs in your sitemap, and don’t specify different canonicals through different methods.

Step 5: Check what Google Chose 

In Search Console, the URL inspection tool shows which URL Google considers canonical. If it isn’t the one you picked, review your internal links, redirects, and check whether the pages are actually similar. After you fix an issue, Google can take up to two weeks to re-evaluate. 

Common Mistakes 

You should pay attention to these mistakes that commonly happen when setting up a canonical tag.

  • Putting the tag in the <body>
  • Pointing to a page with a different content. Google may ignore the tag if the pages aren’t equivalent. 
  • Blocking duplicates in robots.txt. Google recommends against using robots.txt for canonicalization, and blocked URLs still be indexed without their content. 
  • Combining noindex with a canonical to another URL. The two send opposing messages, so pick one. 

Read also: Technical SEO Checklist 2026: Crawlability, Indexing & Core Web Vitals

Protect Your SEO Foundation

A canonical tag won’t make a page rank higher on its own. It removes ambiguity by telling Google which URL you want indexed and pointing your signals at it. Pick one canonical URL, add a self-referencing tag on it, point duplicates to it, and confirm in Search Console that Google agrees. 

Technical SEO can feel overwhelming, but you do not have to tackle it alone. The Crawl Compass team provides comprehensive SEO audits and advanced technical implementation to ensure your digital foundation is flawless. Contact our team today for a free consultation and start capturing the traffic you actually deserve.

Frequently asked questions

Are canonical tags a strict directive?
No. Search engines treat them as a very strong hint, not an absolute rule. If you set a canonical tag but your internal linking structure heavily favors a different URL, Google might ignore your tag and choose the other page instead.
Can I use canonical tags across different domains?
Yes, a cross-domain canonical is supported. But don’t rely on it for republished or syndicated content. Google says canonicals aren’t recommended there since the pages are often different, and the most effective fix is for the partner to block indexing.
What happens if I just do nothing?
If you ignore this process completely, Google will attempt to identify the best version of your pages on its own. This often leads to messy search results, diluted link equity, and severe crawl budget waste as bots get stuck navigating infinite URL parameters.
Should I use a canonical tag or a noindex tag for duplicate pages?
Use a canonical tag when you want the page to stay accessible to users while consolidating ranking signals to your preferred version, it keeps the duplicate live but tells Google not to rank it. Google doesn’t recommend noindex for choosing a canonical within one site, because it blocks the page from Search completely. Don’t put both on the same page.
Does the canonical tag need an absolute URL, or can I use a relative path?
Use absolute URLs (the full https://yoursite.com/page). Google supports relative paths, but recommends against them as they can cause issues later, like if your test site gets crawled.

Related reading

Get the Search Journal in your inbox.

New articles and research, sent when we publish.