Blog / Technical SEO /

Canonical tags explained with real examples

Open a product on almost any online shop, then look at the address bar. Now find the same product through a different category, or a search, or a link with tracking on the end. There’s a good chance you’re looking at the same page on a different URL.

To a person, that’s one page. To Google, it might be three, five or fifty.

That’s the problem canonical tags solve.

What a canonical tag is

A single line in a page’s HTML that says “this is the main version of this page”:

<link rel="canonical" href="https://yoursite.com/blue-mug/">

When Google finds several URLs with the same (or nearly the same) content, it picks one to show in search and folds the signals from the others into it. The canonical tag is your vote for which one.

Notice the word vote. A canonical is a strong hint, not an order. If your other signals disagree (your internal links all point somewhere else, say, or your sitemap lists a different URL), Google may pick its own.

Real examples

1. Tracking parameters

https://yoursite.com/blog/my-post/
https://yoursite.com/blog/my-post/?utm_source=newsletter
https://yoursite.com/blog/my-post/?fbclid=IwAR3...

Same page, three URLs. Each version should carry a canonical pointing to the clean one. Good WordPress SEO plugins do this automatically; it’s worth checking that yours does.

2. Products in several categories (Shopify)

Shopify lets you reach a product through a collection:

https://store.com/collections/mugs/products/blue-mug
https://store.com/products/blue-mug

Shopify themes set the canonical on both to /products/blue-mug, which is right. Where it goes wrong is when a theme’s collection pages link to the long version everywhere. The canonical says one thing, the internal links say another. Fixing the links so they use the short URL makes the signal consistent.

3. www and non-www, http and https

http://yoursite.com/
https://yoursite.com/
https://www.yoursite.com/

These should be handled with redirects, not just canonicals: everyone (and every crawler) should end up on one version. The canonical on that version then confirms it.

4. Sorted and filtered pages

/mugs/?sort=price
/mugs/?colour=blue

A sorted list is the same content in a different order, so canonical it to the main category page. Filtered pages are trickier: a filter that creates a genuinely useful page (“blue mugs”) might deserve to be indexed on its own. Decide case by case.

5. Pagination

/blog/
/blog/page/2/
/blog/page/3/

A common mistake is pointing every page’s canonical at page one. Don’t. Page two has different posts on it, so it isn’t a duplicate of page one, and pointing it there can stop Google reaching the older posts. Each paginated page should canonical to itself.

6. Content published on another site

If an article you wrote is republished elsewhere, the other site can add a canonical pointing back to your original. That’s a cross-domain canonical, and it’s the polite way to syndicate. (It still relies on the other site actually adding it.)

Self-referencing canonicals

Every page should have a canonical, even when there’s no duplicate, pointing at itself. It’s a small safety net: if someone links to your page with random parameters on the end, the canonical quietly says “the real one is this”.

On WordPress, your SEO plugin adds these. On Shopify, the theme does.

Mistakes worth checking for

  • Canonical points to a page that redirects or returns an error. It should always point to a live page that returns 200.
  • Canonical and noindex on the same page. One says “this is the main version”, the other says “don’t show this”. Pick one.
  • Two canonical tags on one page. Usually two SEO plugins, or a theme and a plugin, both adding one. Google may ignore both.
  • Canonical points to HTTP on an HTTPS site. A leftover from an old migration.
  • Everything canonicalised to the homepage. Rare, but it happens after a bad template edit, and it’s disastrous.

How to check yours

  • View the page source (right-click → View Page Source) and search for canonical. There should be exactly one.
  • Search Console URL inspection shows the “User-declared canonical” and the “Google-selected canonical”. If they differ, Google disagrees with you. That’s your clue to look at internal links and sitemaps.
  • A crawl with a tool like Screaming Frog lists canonicals for every page, so you can spot patterns quickly.

FAQ

Is duplicate content a penalty?

No. Google doesn’t punish you for having the same content at two URLs; it just picks one to show. The risk is that it picks the wrong one, or splits signals between them. Canonicals and consistent links prevent that.

Canonical or 301 redirect?

If people don’t need the duplicate URL at all, redirect it. If the duplicate has to exist (a tracking link, a sorted view), use a canonical.

Pick your three most important pages, view the source, and find the canonical on each. If any of them point somewhere you didn’t expect, that’s your next fix.