It’s hard enough to rank well on Google today without creating SEO problems for yourself.

But if adding page variants to your site has created the problem of duplicate content, then you should know that canonical tags are the solution.

Inadvertently creating duplicate content is exactly what can happen when you’re in the ecommerce space and have a ton of category or product variations, or if you’re a blogger who eventually covers the same topic from a different angle.

What happens? Google sees separate pages that are a bit too similar for its liking. The search engine either has to choose a page to rank or ranks none of them.

You never want to leave your technical SEO up to someone else, even if that someone is Google. You want to be in full control of it at all times.

Using canonical tags to differentiate between similar URLs is an excellent way of taking your SEO back from Google.

Canonical tags tell Google which page to index so those pages can start ranking where they should be.

The good news here is that understanding and using canonical tags on your own website isn’t complicated at all. It just requires understanding:

  1. What canonical tags are
  2. Why we use canonical tags
  3. How duplicate content appears
  4. How canonical tags address duplicate content
  5. How to apply canonical tags to your site

So, here in this beginner’s guide to canonical tags, we’ll cover these basic elements so you can understand and start making moves to improve your SEO.

As you’ll see below, just before this post really gets going, we’ve also provided some helpful infographics so you can easily visualize how canonical tags work on websites.

Let’s get going!

URLs with slight variations an seem like duplicate content to Google
Google doesn't always know how to rank duplicate content
duplicate content can cause Google not to rank any of the similar or identical; pages
canonical tags tell Google what the correct pages of your website are so they can be properly indexed
Google indexing your pages properly can lead to increased rankings for those pages!

What Are Canonical Tags, Anyway?

Canonical tags are snippets of HTML code that are placed on the back ends of web pages to let search engines know that a certain page is the best, correct, or “canonical” version of a page.

Google started supporting the use of canonical tags in 2009.

A canonical tag looks like this:

<link rel=“canonical” href=URL-of-page-goes-here/” />

Why Do We Use Canonical Tags?

So, if you get the function that canonical tags serve, you might be wondering why we have to use them at all.

Well, it’s important sometimes to identify canonical pages for the search engines because, depending on the structure of your website, you could end up with duplicate content.

Maybe it’s actually better to say that you could end up with content that Google thinks is duplicated.

illustrations of content on web pages

Duplicate content is bad for SEO. Google will see that and select one to show, only it might not be the “right” one. Or, Google might not fully understand the relationship among the duplicate pages and end up ranking none of them.

It’s all problematic, and it’s why we use canonical tags. Then, Google ranks only the correct one that you specify.

Why Does Duplicate Content Appear At All?

Duplicate content isn’t supposed to appear online at all, but it still does, and often for understandable reasons.

For instance, say you used to have your site on unsecure HTTP protocol but have since moved to secure HTTPS. If you didn’t redirect all your pages to go to the HTTPS versions, and the HTTP versions can still be accessed, then you have a duplicate content problem.

Google will index both versions of each page, thinking you have duplicated your content.

However, “duplicate” content is a bigger problem in the ecommerce space. It’s due mostly to the fact that ecommerce site structures usually allow for product and category variations that change the main URL of a page, but only slightly.

Say you have a product page that features a drop-down box with size options. When you select a new size, the URLs on some sites change to reflect that. Viewed one on top of the other, the URLs might look like this:

Or maybe you’ve included one product in several categories because of its crossover features. On that product page, the same content will be served, but with a different URL structure from the page listed under the other categories.

The result?

Google will see duplicate content and probably lower the rankings for all related pages, since it will have some trouble understanding what’s actually going on.

From the site owner’s perspective, setting up products this way is a sensible way to do things sometimes; it’s probably not even fair to call it a mistake. That’s just how some ecommerce websites are structured. Organize your products however you want.

Just know that duplicate content can and probably will occur in situations like those above.

To fix that and save your rankings, you can turn to canonical tags.

building a web page with a construction vehicle

How Canonical Tags Fix Duplicate Content Issues

When you have what Google would consider duplicate content, you obviously don’t want to fix the problem by getting rid of important pages.

You also can’t address duplicate content with 301 redirects, because then, no one would be able to access those variable URLs for different product sizes and colors or categories.

That’s why canonical tags are the best solution.

By installing those bits of code on the back ends of the “master” versions of your pages, you will be telling search engines that this page is the one to index on search results pages.

Take the two sample URLs from above:

The top one is the base URL, if you like. It’s the main product page that you’d like to rank on Google. The bottom one is a URL that results when someone selects the 35-milligram version of that product.

Google sees two separate URLs, but with the same content, so it calls the pages duplicated.

But, by installing a canonical tag on, you are telling Google that this is the main page and is “approved” to be indexed.

Google understands the language of the canonical tag and follows your instruction: to show only that page in search.

Now, it’s worth it to say that search engines will still crawl the variable URLs, since that content still legitimately exists online. Those pages just won’t show up in search and won’t compete with the “correct” page.

How to Canonicalize Your Web Pages

Now that you understand all about canonical tags and how useful they can be for you, let’s go through a few ways you can canonicalize your pages.

There are several ways you can do it that don’t include manually adding the tags. It’s also a little different for each CMS, but it’s really not hard.

Add Canonical Tags to Master Page Versions

Adding the canonical tags right onto a page is the most direct way to canonicalize that page.

Just use <link rel=“canonical” href=“sampleURL” /> and add it into the <head> section of a page.

On WordPress, you can add the tags right in your Yoast SEO plugin on the appropriate pages. However, know that, if you use Yoast, each page you create includes a self-referencing canonical already, preventing cases of duplicate content in the future.

You’ll also get self-referencing canonicals on other popular CMSs such as Shopify and Squarespace. If you want to add your own on those sites, though, you’ll have to add the tags to the code of the pages.

Include Only Canonical Pages on Your Sitemaps

This is an easy one. Sitemaps are good to have for large websites, such as ecommerce websites, so search engines have roadmaps to how your website is structured.

You can present your canonical pages to Google right in your sitemap, since the search engine has said that you should be putting only canonical pages in sitemaps.

If you include only the correct versions of your pages in your sitemaps, that’s the canonical work done for you right there.

multiple screens of web content

Use 301 Redirects to Move Traffic to Your Canonical Pages

We talked about 301 redirects earlier. You can’t always use redirects to fix your duplicate content problem, but you can definitely use them to control whether your website traffic goes to the canonical version of a page.

This applies only to pages that are actually duplicates, not pages containing variations of products.

If your homepage has multiple versions out there–say, versions with http, without a trailing slash, or with /home/ at the end–you can set the canonical page as the correct homepage and then 301 redirect all those other versions to the right one.

That way, you’ll tell Google which page to show in search while directing all traffic to that same page. It’s all good for your rankings.

Choose Your Canonical URLs Carefully

One more thing to say about canonical tags here: be mindful of which URLs you make your canonical ones.

You should only be doing this if you have actual duplicate content problems, not because you’re trying to manipulate your rankings in any way. That won’t work.

When it is appropriate to add canonical tags to a page, be sure you add the tags to your preferred versions of pages.

So, if you want your canonical tags to be on the safest, cleanest version of a page, you might make sure that the canonical page has the following elements:

-https instead of http

-www instead of no www, or the reverse

-trailing slash instead of no trailing slash

Which version of a duplicated page you make the canonical one is up to you. It will depend on the context and the kind of content you have.

As long as you’re smart about setting canonicals on pages that actually need them, your SEO should be tip-top in this area.

Need Help with Your Canonical Tags? Get in Touch with LSEO

Adding canonical tags across your site can be overwhelming, especially if the site is large.

If you’d like to correct numerous duplication issues on your website, get in touch with us at LSEO. Our SEO experts have years of experience getting the technical SEO right for enterprise clients.

We’d be happy to help drive your online business growth. Let us know what you need.