Sommaire
Canonical tag for SEO

Canonical URL: How to use the canonical tag for SEO

Your website may contain several URLs that share identical or highly similar content. However, search engines may penalize sites with too many duplicate pages. Adding a tag allows you to indicate which URL you want to appear in search results. Here, we reveal the secrets behind a tag that’s essential for SEO!

What is a canonical tag?

Placed within the <head></head> section of your web page’s source code, the <link rel="canonical"> tag allows you to specify a canonical URL.


This HTML tag is easy to use and understand. 

It takes the form of a <link> tag with two attributes:

  • rel="canonical" specifies the canonical relationship.
  • href="https://www.mysite.com/my-url.html" indicates the canonical URL.

The URL in a canonical tag can be:

  • Identical to the URL of the page hosting the tag (if that page is canonical),
  • Or different, if another page is designated as the canonical version.

The term “canonical” is borrowed from mathematics, where it refers to a standard element chosen among a group with similar properties. The same logic applies to SEO: the canonical URL is the one the site owner designates as the preferred version among a set of identical or near-identical URLs.


Alternatives to the <link rel="canonical"> Tag

Using a canonical tag isn’t your only option for canonicalization. You can also set a rel="canonical" HTTP header. Including canonical URLs in your sitemap is also recommended, as it sends an additional signal to search engines. However, we strongly recommend using either a tag or HTTP header for optimal canonicalization handling.


When should you define a canonical URL?

Canonical URLs are especially helpful in preventing internal duplication, particularly when multiple pages share similar content.


Avoiding duplication from URL rewriting

Some URL rewriting rules unintentionally create duplicates, with one piece of source code accessible via multiple URLs:

  • URLs with and without trailing slashes (if the server doesn’t redirect to a single version),

  • URLs accessible regardless of the slug, as long as an ID appears at the end,

  • Etc.


For instance, the same content may appear on:

  • https://www.mysite.com/my-page/ and https://www.mysite.com/my-page

  • https://www.mysite.com/my-slug-pr12345.html and https://www.mysite.com/my-slug-2-pr12345.html


By adding the same <link rel="canonical" href="https://www.mysite.com/my-page/"> tag to both versions, you inform Google and other search engines that the canonical page is https://www.mysite.com/my-page/.


Avoiding duplication from filtering or sorting listings

Depending on your technology stack, filtering or sorting product listings can generate parameterized URLs:

  • Default URL: https://www.mysite.com/category

  • Filtered by manufacturer: https://www.mysite.com/category?manufacturer=5

  • Filtered by manufacturer and color: https://www.mysite.com/category?color=red&manufacturer=5

  • Sorted by price: https://www.mysite.com/category?orderby=price&orderway=asc


You may end up with hundreds of thousands of filtered or sorted variations that harm your SEO if all are crawlable and indexable. Specifying a canonical URL tells search engines that only the default category URL should rank. In our example, all filtered versions should contain the same canonical tag:
<link rel="canonical" href="https://www.mysite.com/category">.


Running an A/B testing strategy

Want to test changes before deploying them? You can create a A/B test version of a page to collect performance data. Each test page can reference the original as its canonical URL, preventing duplication issues.


Add a self-canonical to secure all your URLs

Some platforms add tracking parameters to URLs (e.g., ?utm_source=newsletter). By including a self-referencing canonical tag on every indexable page, you prevent duplicate content caused by URL variations.


For example, the page: https://www.mysite.com/my-awesome-page.html
will display canonical tag: <link rel="canonical" href="https://www.mysite.com/my-awesome-page.html">


What are the SEO benefits of the canonical tag?

The canonical tag provides many advantages:

  • Avoids content duplication and internal cannibalization;

  • Specifies which page you want to appear in search results;

  • Simplifies analytics tracking across multiple URL variants;

  • Prevents bots from wasting crawl budget on duplicates;

  • Enhances the canonical URL’s authority, since canonicalized pages transfer PageRank and SEO signals.


How to monitor canonical URL deployment

You can crawl your site using tools like ScreamingFrog or Oncrawl to simulate search engine behavior and identify canonical issues—such as non-indexable canonicals or tags pointing to a different URL than the one crawled.

Another, simpler option is Google Search Console. In the “Pages” report (under “Indexing”), you’ll find key insights for your SEO.


Duplicate page: Google chose a different canonical than the user

Google doesn’t always follow your canonical tag, it may rely on other signals like internal linking or backlinks. The algorithm relies on other signals to determine which URL is most relevant when it detects multiple duplicate pages, such as internal linking or netlinking.


For example, you may have defined pages with a slash at the end as canonical URLs, but all of your internal linking points to pages without a slash at the end: search engines may well ignore your requests and index the pages without a slash since you are sending users to them.


By analyzing the examples provided by Google Search Console, you will likely identify the cause of this choice and apply the necessary corrections.


Duplicate page without user-selected canonical

This report gives you an idea of the volume of duplicate pages on your site that do not have a rel=”canonical” tag or header. A high number of duplicate pages should alert you to the importance of quickly deploying a canonicalization solution.


Alternate page with proper canonical tag

This report lists pages where Google detected a canonical tag pointing to another URL.
Example: https://www.mysite.com/category?manufacturer=5 will appear here if it has this tag:
<link rel=”canonical” href=”https://www.mysite.com/category”>

You can regularly check this report to make sure that important pages are not included, without worrying if a large number of URLs appear in it.


EdgeSEO for managing canonical tags

Popular platforms like WordPress and Prestashop offer built-in or plugin-based support for canonical tags, but configuration can be tedious and error-prone.

Our EdgeSEO tool includes a “Bulk SEO” app that lets you manage canonical tags and other essential SEO elements effortlessly. You can update all canonical tags on your site using a simple CSV file. This saves precious time and brings peace of mind to your SEO operations!

Summary
Share!
Recevoir la newsletter

Published by

Partagez !

Discover other articles…

On 14 October, the SEO Summit returns to the Parc des Princes with a day of conferences and meetings dedicated to the SEO strategies of tomorrow. The Fasterize team will be there to share its vision and exchange ideas with you.
Internal linking is one of the keys to optimising your natural referencing. The basic principle is to direct popularity towards strategic pages to reinforce their legitimacy.
WAM has identified 9 obstacles that slow down projects and limit the development of our recommendations. How can we deal with them and adapt as best we can?

But stay informed!

Register!

Every month, no more, receive:

🆕 The latest publications on our blog: platform developments, new features, events, technical advice, analyses…

💡 A selection of monitoring articles: technical news, tips, tutorials, and other findings on web performance…