Your online store shows the same product under five different URLs. Filters, sort orders and tracking tags each spin up a new address for identical content. Search engines see five pages, not one, and split your ranking signals across all of them, or pick the wrong version to show. Left alone, this quietly drags down the page you actually want to rank. A canonical tag fixes it by naming the one URL that counts. This guide covers what canonical tags are, when to use them, how to add them on any platform, and the mistakes that quietly break them.

What is a canonical tag?

A canonical tag, written rel=”canonical”, is a line of HTML in a page’s <head> that tells search engines which URL is the master version when several pages hold the same or near-identical content. It consolidates ranking signals onto that preferred URL. Google treats it as a strong hint rather than a command, so it can still pick a different canonical if other signals disagree.

This matters because search engines index by URL, not by page. Two addresses with the same content are two pages in their eyes, even when they look identical to you. The canonical tag points them to the version you want indexed and ranked.

What a canonical tag looks like

A canonical tag is a single <link> element. It sits in the <head> section of the page and points to the preferred URL:

<link rel="canonical" href="https://www.example.com/preferred-page/" />

Three parts do the work. The <link> element declares a relationship, the rel=”canonical” attribute names that relationship as “this is the master version”, and the href holds the full, absolute URL you want search engines to treat as canonical. Viewing a page’s source and searching for “canonical” shows you the tag as it ships, which is the quickest way to confirm one is present.

Canonical tag vs canonical URL

People use these two terms interchangeably, but they describe different things. The canonical tag is the markup, the <link rel=”canonical”> element you place in the code. The canonical URL is the address that tag points to, the single version you have chosen as the master copy.

So a page has one canonical tag, and that tag declares one canonical URL. When Google picks its own preferred version, the docs call that the Google-selected canonical, which can differ from the one you declared.

Why canonical tags matter for SEO

Duplicate content rarely earns a penalty. The real cost is quieter: search engines scatter your ranking signals across several URLs, crawl pages that add no value, and sometimes show the version you never intended. Canonical tags pull all of that back onto one page. Here is what that buys you.

They prevent duplicate content problems

When several URLs serve the same or near-identical content, Google clusters them and picks one to represent the group. Without a clear signal, Google chooses that canonical for you, and its pick may not match yours.

There is no duplicate content penalty here. The pages simply compete with each other, and only one gets shown. A canonical tag removes the guesswork by naming your preferred version up front.

They consolidate ranking signals

Duplicate pages often pick up their own backlinks, from other sites, social posts or forums. Each link that lands on a duplicate is a link that isn’t strengthening your main page.

A canonical tag rolls those signals back onto the URL you have chosen. Because links remain one of Google’s core ranking inputs, keeping them pooled on a single page rather than split across near-copies gives that page a better chance of ranking.

They save crawl budget

Search engines allocate a finite amount of crawling to your site. Every duplicate URL they fetch is capacity spent on a page you didn’t need indexed.

Google’s own guidance is to consolidate duplicate content so crawling focuses on unique pages rather than unique URLs. Canonical tags do exactly that: the canonical gets crawled most often, and the duplicates far less. On a large site with faceted navigation or parameters, that saved budget can mean your new pages get discovered faster. If crawl efficiency is a recurring problem for you, it is worth reading up on managing crawl budget more broadly.

They control which URL appears in search results

Only the canonical version is eligible to rank and show in results. If you leave the choice to Google, a filtered or parameter-laden URL might be the one that surfaces, which looks messy to searchers and can undercut trust.

By setting the canonical yourself, you decide which clean, authoritative URL represents the content. Pick the version with the strongest metrics, usually the one with the most links and traffic, and point everything else to it.

When should you use a canonical tag?

Reach for a canonical tag whenever the same or very similar content is reachable at more than one URL, and you want both versions to stay live. If a page should be removed entirely, a redirect is the better tool. These are the situations where canonicals earn their keep.

E-commerce filter and parameter URLs

Online stores generate duplicates faster than anywhere else. A single category page can appear at a clean URL and at dozens of parameter variants as shoppers filter and sort:

https://www.example.com/shirts/
https://www.example.com/shirts/?size=XL
https://www.example.com/shirts/?size=XL&color=red

The content is basically the same list of shirts, but each address is a separate page to Google. Point the canonical on every variant at the clean /shirts/ URL, and the ranking signals stay pooled there. This is the classic case, and if you run a store it is worth handling properly as part of your wider e-commerce SEO work.

Duplicate content across www, non-www and HTTP or HTTPS

Your homepage feels like one page to you. To a search engine, these can all be separate URLs:

http://example.com
https://example.com
http://www.example.com
https://www.example.com

That is four versions of a single homepage before you have added a single parameter. A canonical tag (ideally backed by a redirect to your preferred version) tells search engines which one is real.

Desktop and mobile versions of a page

If you run a separate mobile site on an m. subdomain, the two versions share content across different URLs. Google’s guidance is to add a canonical on the mobile page pointing to the matching desktop URL, and a rel=”alternate” on the desktop page pointing to the mobile one.

That said, separate mobile URLs add complexity. If you are building from scratch, a single responsive site avoids the problem altogether, which matters more now under mobile-first indexing.

Print, sort and session-ID variants

Plenty of ordinary site features spin up duplicate URLs without you noticing. A printer-friendly version, a re-sorted table of products, or a session ID appended to the address all create a second URL for the same content.

Each of these should carry a canonical pointing back to the main version. Otherwise you leave Google to sort out which one matters.

Syndicated or republished content

If another site republishes your article, or you post the same piece across several domains you own, you risk the copy outranking your original. A cross-domain canonical on the republished version, pointing back to your URL, tells search engines where the content really lives.

This is the one scenario where the canonical crosses domains rather than staying within your own site. Ask the republishing site to add it, or include it yourself if you control both.

Tracking and UTM parameter URLs

Campaign tags like ?utm_source=newsletter create a fresh, indexable URL every time you share a link. Left unchecked, those tagged variants can end up in the index alongside your clean page.

A self-referencing canonical on the clean URL keeps the tracked versions from fragmenting your signals, so you can measure campaigns without muddying your search presence.

How to add a canonical tag

Adding a canonical tag means placing one <link> element in the page’s <head>, or letting your CMS do it for you. The method changes by platform, but the rules that keep it working are the same everywhere. Start with those.

The three golden rules

Get these three right and most canonical problems never happen.

Use absolute URLs, not relative ones. Write the full address, https://www.example.com/page/, rather than /page/. Google supports relative URLs but advises against them, since they are easier to get wrong.

Use the correct protocol and domain. Point to the https version and to your preferred www or non-www form. A canonical that names the wrong protocol sends a mixed signal.

Declare only one canonical per page. If a page carries two canonical tags, Google may ignore both. This happens more often than you would think, usually when a theme and a plugin each add one.

Adding it manually in the HTML head

If you edit your own HTML, place the tag inside the <head> section:

<head>
  <link rel="canonical" href="https://www.example.com/preferred-page/" />
</head>

On the page you have chosen as the master, add a self-referencing canonical that points to itself. This tells search engines plainly which URL you consider canonical, even on the original.

Canonical tags on WordPress

WordPress does not add canonical tags on its own, but the main SEO plugins do it automatically and let you override any page by hand. The two most common are Yoast and RankMath.

Using Yoast SEO

Yoast adds a self-referencing canonical to every page and post by default. To set a custom one, open the post, go to the Yoast SEO sidebar, click the Advanced tab, and paste the full URL into the Canonical URL field. Leaving it blank keeps the self-referencing default, which is right for most pages.

Using RankMath

RankMath works much the same way. Open the post, find the RankMath meta box, and set the URL under the Advanced tab in the Canonical URL field. If you cannot see the Advanced tab, switch on Advanced Mode from the RankMath dashboard first.

Canonical tags on Shopify

Shopify handles canonicalisation well out of the box. Its themes include <link rel=”canonical” href=”{{ canonical_url }}” /> in theme.liquid, which generates the correct canonical for each page. Product variants and collection-based URLs roll up to the clean /products/handle automatically.

You only need to step in for special cases, such as two near-identical products where one should rank. That means editing the theme’s .liquid files or using a metafield, so it is worth a developer’s help if you are not comfortable in the code. If you run a store, this fits into your broader Shopify SEO checklist.

Canonical tags on Wix

Wix adds a self-referencing canonical to every page automatically. To change one, open the page’s menu, click SEO Basics, open the Advanced SEO tab, expand Additional Tags, then edit the canonical and apply. Wix also canonicalises parameter and filter URLs back to the original page for you.

Canonical tags on Squarespace

Squarespace generates self-referencing canonicals automatically. For a custom one, go to Page Settings, open the Advanced area, and add the tag through header Code Injection:

<link rel="canonical" href="https://www.example.com/preferred-page/" />

One limitation: Squarespace does not offer header code injection on individual blog posts, so cross-posting a single post needs a workaround rather than a clean per-post field.

Canonical tags on Webflow

Webflow is the exception: it does not add a canonical tag by default. You set a global canonical by adding your base URL under Site settings → SEO, and Webflow then builds a self-referencing canonical for every page by combining that base with each page’s slug, CMS collection pages included.

For a one-off override, add a custom canonical in the page’s Head Code field. Just don’t set a global canonical and a custom one at the same time, or you end up with two competing tags.

Canonical tags on Magento

Magento (Adobe Commerce) supports canonicals for products and categories, switched off by default. Turn them on under Stores → Configuration → Catalog → Catalog → Search Engine Optimization, then enable Use Canonical Link Meta Tag For Categories and Use Canonical Link Meta Tag For Products.

Magento does not cover CMS pages or the homepage natively. For those, you need an SEO extension that adds canonical control across the rest of the store.

Other ways to declare a canonical URL

The rel=”canonical” tag in your HTML is the most common method, but it isn’t the only one. Google reads several canonicalisation signals, and they stack: combining a few makes your preferred URL more likely to win.

rel=canonical in the HTTP header for PDFs and non-HTML files

A PDF has no <head> to hold a <link> tag. For files like these, you can send the canonical in the HTTP response header instead:

Link: <https://www.example.com/downloads/report.pdf>; rel="canonical"

This tells search engines which URL is canonical for a document that can’t carry an HTML tag. It is the standard way to canonicalise PDFs, images and other non-HTML resources.

Listing only canonical URLs in your XML sitemap

Google treats a URL’s presence in your sitemap as a weak canonicalisation signal. It won’t override a strong conflicting signal, but including only canonical URLs, and keeping duplicates out, nudges Google toward the right choice.

On its own this is not enough. Treat it as support for your canonical tags rather than a replacement, and keep your XML sitemap clean of parameter and duplicate URLs.

301 redirects

A 301 redirect is the strongest signal of all, because it physically sends both users and crawlers to the target URL. Use it when you want to retire a duplicate for good rather than keep it accessible. We cover this in depth in our guide to 301 redirects.

Consistent internal linking

Every internal link you place is a small vote. If your menus, buttons and in-content links all point to the canonical URL rather than a parameter variant, you reinforce your choice. Linking inconsistently, some to the clean URL and some to duplicates, muddies the signal you are trying to send.

Canonical tag vs 301 redirect, which to use

Both consolidate signals onto one URL, but they do different jobs. Choosing the wrong one either removes a page you needed or keeps a duplicate you wanted gone.

How they differ

A 301 redirect removes the old URL from circulation. Anyone visiting it, human or bot, lands on the destination instead, and the original page is no longer reachable.

A canonical tag keeps both URLs live and accessible. Users can still reach either version, but search engines consolidate ranking signals onto the one you named. Here is the quick comparison:

Canonical tag301 redirect
Both URLs stay accessibleYesNo
Strength of signalStrong hintStrongest
Users can see both versionsYesNo
Best forNear-duplicates you want to keepPages you want to retire

When to use each

Use a canonical tag when both versions need to stay live: product variants, filtered listings, printer-friendly pages, tracked links. The content serves a purpose at more than one URL, and you only want one of them to rank.

Use a 301 redirect when the duplicate has no reason to exist: a page you have merged, an old URL after a migration, or an http version you want gone. If nobody needs to reach the old URL, redirect it.

Canonical tag vs hreflang, how they work together

These two answer different questions. A canonical tag says which URL is the master version. An hreflang tag says which language or regional version to show a given user. On a multilingual site, you need both, and they must not contradict each other.

The rule that keeps them from clashing: when you use hreflang, each page’s canonical should point to itself in the same language, never across to a different language version. If your French page canonicalises to the English one, you tell Google the French page isn’t worth indexing, and the whole language cluster can collapse.

Canonical tagHreflang tag
Question it answersWhich URL is the master?Which language version to show?
Points toYour preferred versionEvery language or regional variant
On multilingual pagesSelf-referencing, same languageReciprocal, all variants linked

So on a multilingual site, give every localised page a self-referencing canonical, and let hreflang handle which version each user sees. Keep the two roles separate and they work together cleanly.

Common canonical tag mistakes to avoid

Canonical tags fail quietly. A misconfigured one rarely throws an error, it just makes Google ignore your choice and pick its own. These are the mistakes worth checking for, most of them straight from Google’s own list of common errors.

Blocking the canonical URL in robots.txt

If you block your canonical URL in robots.txt, crawlers can’t reach it to read the tag. Google then can’t confirm your choice and may index a different page instead. The canonical URL must stay crawlable.

Combining rel=canonical with noindex

A canonical says “index this other page”; a noindex says “don’t index this one”. Put them together and you send contradictory instructions. Google may drop the page entirely. Keep the two apart.

Pointing the canonical at a 4XX or 5XX URL

A canonical that targets a broken URL, one returning a 404 or 403 or a server error, can’t do its job. Google can’t see a valid page there, so it ignores the tag. Always point to a live URL that returns a 200 status.

Canonicalising to a redirected URL

If your canonical points to a URL that then redirects somewhere else, you make Google work through an extra hop and muddy the signal. Point straight at the final destination, not at a URL that bounces onward.

Canonicalising all paginated pages to page 1

Page 2 of a list is not a duplicate of page 1. Canonicalising every paginated page back to the first means pages 2 and beyond never get indexed, along with any products or links only they contain. Let each paginated page self-reference instead.

Placing the canonical in the body instead of the head

A rel=”canonical” tag only counts in the <head> of the page (or the HTTP header). Injected into the <body>, usually by JavaScript or a misplaced snippet, Google ignores it. Check that yours renders in the head.

Declaring multiple canonicals on one page

If a page carries more than one canonical tag, Google ignores all of them. This often happens when a theme adds one and a plugin adds another. One tag per page, no exceptions.

Canonical chains and loops

A chain happens when A points to B, and B points to C. A loop is worse: A points to B and B points back to A. Both confuse search engines about which URL is really canonical. Point every duplicate directly at the single master URL.

Using relative instead of absolute URLs

A relative canonical like /page/ leaves room for misreading, especially across protocols or subdomains. Google supports relative URLs but recommends against them. Write the full absolute URL every time.

Canonicalising pages that aren’t actually duplicates

A canonical tells Google two pages are the same. Point it at a page with genuinely different content and you risk the wrong page being dropped from the index. Only canonicalise pages that really are duplicates or very close near-duplicates.

How to check and audit your canonical tags

Setting a canonical tag is only half the job. You also need to confirm search engines see the version you intended. Here are four ways to check, from a quick spot-check to a full-site audit.

View the page source

The fastest check is the page’s own HTML. Open the page, press Ctrl+U (Cmd+U on a Mac) to view source, then search for canonical. You will see the tag as it ships, and can confirm the href points where you meant it to.

This catches the obvious problems: a missing tag, a wrong URL, or two canonicals where there should be one.

Check with the URL Inspection tool in Search Console

Google Search Console’s URL Inspection tool shows something the page source can’t: the difference between the canonical you declared and the one Google actually chose. Paste a URL, and the Indexing section reports both the user-declared canonical and the Google-selected canonical.

When those two match, your signal is working. When they differ, Google has overruled your choice, and it is worth finding out why.

The “Duplicate without user-selected canonical” report

This status appears in the Page indexing report when Google finds duplicate pages but you haven’t set a canonical on them, so Google picks the representative URL itself. The page usually stays out of the index while Google defers to its own choice.

The fix is to take back control. Add a self-referencing canonical to the version you want indexed, and point the duplicates at it. Parameter and tracking URLs are common culprits here, so check those first.

What “Alternative page with proper canonical tag” means

This one worries people needlessly. It is not an error. It means Google found a duplicate, saw that it correctly points to your chosen canonical, and excluded it from the index on purpose. That is canonical tags working exactly as intended.

You generally don’t need to act on it. Just confirm the canonical version itself is indexed and is the page you want to rank. If an important page is wrongly listed as an alternate, then the canonical is pointing somewhere it shouldn’t, and that is worth fixing.

Bulk auditing with a site-crawl tool

Checking pages one by one doesn’t scale past a small site. A crawler that reads every page’s canonical, such as Screaming Frog or a cloud-based site audit, surfaces the patterns: missing canonicals, canonicals to redirected or broken URLs, chains, and pages canonicalising off to unrelated content.

For a site of any real size, a crawl is the only practical way to catch these at scale. Run one periodically, not just once, since new duplicates appear as your site grows.

Canonical tags in Singapore, a local checklist

If you run a Singapore website, a few local habits create duplicate URLs that catch site owners out. Here is a short checklist tuned to the SG market.

Watch your `.com.sg`, `.sg` and `.com` versions. Many Singapore businesses register more than one domain to protect the brand, then serve the same site on each. If .com.sg and .com both load identical content, that is duplication. Pick one as your primary, and canonicalise (or redirect) the others to it.

Handle parameter URLs on local Shopify and WooCommerce stores. Singapore e-commerce sites lean heavily on filtered navigation, size, colour, brand, price. Each filter combination spins up a parameter URL. Make sure these carry canonicals pointing back to the clean category page, so your product and collection pages keep their ranking signals.

Mind your regional footprint if you serve both SG and Malaysia. Plenty of local businesses run near-identical pages for the Singapore and Malaysian markets. If the content is genuinely the same, canonicals or hreflang keep the two from competing. If you are targeting each market separately, make each page distinct enough to stand on its own, and let hreflang signal the regional split.

Confirm your `https` and non-www choices. The homepage duplication problem, four or more versions across http, https, www and non-www, applies just as much to .sg domains. Settle on one canonical form and make every signal agree.

Getting canonicals right is one piece of a healthy technical setup. If you would rather have this handled as part of a wider programme, our SEO services cover technical audits like this end to end.

Frequently Asked Questions

What is a canonical tag in simple terms?

A canonical tag is a line of HTML that tells search engines which URL is the main version of a page when the same content sits at more than one address. It points ranking signals to your preferred URL, so that page is the one indexed and shown in search results.

What does a canonical tag look like?

It is a single <link> element in the page’s <head>:
<link rel=”canonical” href=”https://www.example.com/preferred-page/” />
The rel=”canonical” attribute marks the relationship, and the href holds the full URL you want treated as the master version.

What is a canonical URL example?

Say a product appears at a clean URL and at a filtered one: https://www.example.com/shirts/ and https://www.example.com/shirts/?colour=blue. The content is the same, so you set the canonical on the filtered version to point at the clean /shirts/ URL. That clean address is the canonical URL.

Do canonical tags affect SEO rankings?

Indirectly, yes. Canonical tags don’t boost a page by themselves, but they consolidate duplicate content, pool ranking signals like backlinks onto one URL, and stop search engines splitting your value across near-identical pages. That consolidation gives your preferred page a stronger footing.

Is a canonical tag a directive or a hint?

A hint. Google treats rel=”canonical” as a strong signal, not a command, and can pick a different canonical if your other signals, internal links, sitemap or redirects, point elsewhere. Keeping all your signals consistent makes Google far more likely to honour your choice.

Should every page have a canonical tag?

It is good practice for every indexable page to carry a self-referencing canonical, one that points to itself. This removes ambiguity if parameters or tracking tags ever create duplicate versions. Most modern CMS platforms and SEO plugins add these automatically.

What is “Duplicate without user-selected canonical” in Search Console?

It is a status in the Page indexing report meaning Google found duplicate pages but you didn’t set a canonical, so Google chose the representative URL itself. The affected pages often stay unindexed. The fix is to add your own canonical tags so you control which version wins.

Can I use a canonical tag and a 301 redirect together?

Not on the same URL, since they conflict: a redirect removes a page while a canonical keeps it live. But you can use both across a site, redirecting URLs you want gone and canonicalising near-duplicates you want to keep. Match the tool to whether the page should stay reachable.

Final thoughts

Canonical tags are one of the simplest ways to keep search engines focused on the pages you actually want to rank. Get them right and you stop duplicate URLs quietly draining your rankings, pool your signals onto one strong page, and stay in control of what shows up in search.

Start with a self-referencing canonical on your key pages, check them in Search Console, and fix any duplicates you find. If you would like a technical audit that covers canonicals and the rest of your setup, an SEO agency can help you get it right.