What Is a Canonical URL?

Aaron Haynes
Oct 24, 2021
Quick navigation

Understanding how to use canonicalization and set canonical URLs correctly is essential knowledge for any SEO, and incorrect implementation can result in widespread issues that negatively impact your site’s performance.

Canonical tags were first introduced in February 2009 by Google, Bing, and Yahoo! to assist webmasters in dealing with duplicate or very similar content that is accessible via multiple URLs.

However, in order to properly use canonical tags, you must first understand what they are, how they work, and how to implement them.

This article will act as a guide to help you understand what a canonical URL is, why canonical URLs are important, how to use canonical URLs, and if canonical URLs are good or bad for SEO.

Sit tight and add some great knowledge to your SEO efforts.

What Is a Canonical URL?

Canonical tags, also known as rel=”canonical,” are a method of informing search engines that a specific URL is the master copy of a page. They allow you to specify a page’s canonical URL. By specifying the “canonical” or “preferred” version of a web page, a canonical link allows webmasters to avoid duplicate content issues.

But, what’s the distinction between canonical tags and canonical URLs? Is there any other way to specify these?

Canonical Tags

A canonical tag appears in the  <head></head> section of a web page’s HTML source code and looks like this:

<link rel=”canonical” href=”https://www.website.com/page/” />

These can be self-referencing (a canonical tag pointing to a page’s own URL) or referencing another page’s URL to consolidate signals.

We frequently see the terms canonical tags and URLs used interchangeably, which should not be the case. This is due to the fact that while the rel=”canonical” tag is the most commonly used method for setting canonical URLs, it is far from the only one.

Canonical URLs

So, what exactly is a canonical link? A canonical link is a URL that is designated as the master URL for a collection of duplicate pages.

In Google’s own words: “A canonical URL is the URL of the page that Google believes best represents a group of duplicate pages on your site.” — Google Search Console Help

You can indicate your preferred canonical URL. Google, on the other hand, may select a different page than you do for a variety of reasons. In most cases, when set correctly, your specified URL will be chosen as the canonical.

Below is an illustration of how canonicalization works:

Why Are Canonical URLs Important?

Canonical URLs are important because:

  • They assist you in specifying which URL you want people to see in search results.

You might prefer that people access your blue t-shirt product page through:


Rather than:


Each URL refers to the same homepage content for your fancy t-shirt website, but they are different URLs. Using canonicals can assist you in keeping things “clean.”

  • They make it easier to track metrics for a single product or topic.

It becomes more difficult to obtain consolidated metrics for a specific piece of content when there are multiple URLs. Canonical URLs make things easier and more organized, especially when it comes to reporting performance to your client.

Google considers duplicate versions of the same page as a single page accessible via multiple URLs or different pages with similar content (for example, a page with both a mobile and a desktop version). Google will select one URL as the canonical version and crawl it, while all other URLs will be treated as duplicates and crawled less frequently.

According to research, 25-30% of the web is duplicate content.

  • They manage syndicated content and consolidate link signals for similar or duplicate pages.

Canonical URLs assist search engines in merging information for individual URLs (such as links to them) into a single, authoritative URL. Furthermore, if you syndicate your content for publication on other domains, canonical URLs aid in the consolidation of page ranking to your preferred URL. In other words, websites with similar or duplicate content will not have to compete for traffic/ranking in search engines.

Canonical URLs FAQ

Are canonical URLs good for SEO?

Choosing a proper canonical URL for each set of similar URLs improves your site’s SEO. This is because the search engine knows which version is the canonical one and can count all links pointing to it as links to the canonical version. Setting a canonical is conceptually similar to a 301 redirect but without the actual redirecting.

Are canonical URLs bad for SEO?

Canonical tags have an impact on SEO from two perspectives. For once they have direct control over how search results are displayed. They can also have an impact on a website’s overall rankings due to a variety of factors such as URL structure, user experience, and PageRank flow.

A common flaw is directing the canonical to a URL that is either blocked by robots.txt or set to “noindex.” Search engines may receive mixed and confusing signals as a result of this.

There is no denying that if pagination is used incorrectly, it can result in duplicate content. However, canonicalizing all URLs in a series back to the first page isn’t always the best solution. Instead, canonicalize these to a ‘view all’ page.

How do I fix my canonical URL?

There are two methods for resolving canonical issues on a website: using 301 redirects and/or adding canonical tags to your site’s pages to tell Google which of several similar pages is preferred. The best option is determined by the canonical problem you’re attempting to solve.

  • Implement 301 Redirects for Duplicate Pages Across the Site

This resolves HTTP/HTTPS and www/non-www issues. Canonical issues with HTTP/HTTPS and www/non-www URLs can be resolved by implementing a sitewide 301 redirect to the correct version of your URL.

There are several methods for implementing a sitewide redirect. Setting up the redirect through your website’s host is the simplest and least risky method.

To begin, search Google for “HTTP to HTTPS redirect [host name]” or “www to non-www redirect [host name]” and see if your host has a support page explaining how to make the change. Alternatively, you can seek assistance from your host’s support team.

  • Add Canonical Tags to All of Your Site’s Pages

This resolves problems with URLs that change as a result of user interactions (e.g. eCommerce sites). There are several ways to canonicalize URLs other than using rel=”canonical.”

Rather than allowing Google to decide which of your duplicate URLs should be considered canonical, you can specify which page you want to be considered canonical by adding a rel=canonical tag to each page of your website.

<link rel=”canonical” href=”https://www.website.com/page/” />

Adding this code to every page of your site is likely inconvenient and impractical, but most content management systems have ways to make canonicalizing your site’s pages easier.

On WordPress sites, for example, you can use the premium version of the Yoast SEO plugin to automatically add self-referential canonical tags to every page. Users of HubSpot CMS can configure the CMS to automatically add self-referencing URLs. Shopify automatically adds canonical tags to your pages, so you may not need to worry about it.

  • When publishing your content on other sites, ensure that they use Canonical Tags.

This resolves problems with syndicated content/content that is duplicated across multiple sites.

If you syndicate or publish your content on multiple sites, make sure that any secondary site that publishes your content includes a rel=canonical tag that points back to the URL of the content on your website. If Google is unable to determine the original source of the content, it may rank a secondary site higher than yours.

When content is published across multiple domains and pages, the cross-domain canonical URL can be used to tell search engines which version of the page should be indexed. Canonical tags should be referenced using absolute URLs rather than relative URLs to ensure proper interpretation.

How do I find my canonical URL?

A canonical link element, also known as a canonical tag, is found in a webpage’s HTML header and informs search engines whether there is a more important version of the page. The canonical tag is displayed as rel=” canonical”.

For example, this line of HTML code informs search engines that the URL “https://shoestore.org” refers to the original version of the page on which this tag appears:

<link rel=”canonical” href=”https://shoestore.org” />

The tag is important because search engines crawl websites on a regular basis to look for information that will help them decide how to rank pages and posts. Site crawlers are essential to the process of indexing websites on search engines.

If the search crawler discovers two pages with identical content, it is unsure how to rank them. It can’t decide which page should rank, so the two pages cannibalize each other’s ranking potential. As a result, neither piece of SEO content is guaranteed to rank.

How do I use canonical URL?

Make use of the rel=”canonical” link tag

To indicate when a page is a duplicate of another page, you can use a <link> tag in the head section of your HTML.

Suppose you want https://example.com/dresses/green-dresses to be the canonical URL, even though a variety of URLs can access this content. Follow these procedures to mark this URL as canonical:

  1. Mark all pages that are duplicates with a rel=”canonical” link element.

To the <head> section of duplicate pages, add a <link> element with the rel=”canonical” attribute pointing to the canonical page. Here’s an example:

  1. If the canonical page has a mobile variant, add a rel=”alternate” link to it that points to the mobile version:

  1. Add any hreflang or other redirects that are appropriate for the page.

Make use of the rel=”canonical” HTTP header

If you know how to configure your server, you can use a rel=”canonical” HTTP header (rather than an HTML tag) to indicate the canonical URL for any document supported by Search, including non-HTML documents like PDF files.

If you expose a PDF file via multiple URLs, you can return a rel=”canonical” HTTP header to tell Googlebot which URL is the canonical one:

Google currently supports this method for web search results only.

Utilize a sitemap

Choose a canonical URL for each of your pages and include it in a sitemap. All pages on a sitemap are suggested as canonicals; based on content similarities, Googlebot will identify which sites (if any) are duplicates.

Google will not guarantee that the sitemap URLs will be considered canonical, but it is a simple way of defining canonicals for a large site, and sitemaps are a useful way to tell Google which pages on your site are the most important.

Non-canonical pages should not be included in a sitemap. If you use a sitemap, only include canonical URLs in the sitemap.

For retired URLs, use 301 redirects

Use this approach when you wish to get rid of existing duplicate pages but need to ensure a smooth transition before retiring the old URLs.

Assume your page can be accessed in a variety of ways:

  • https://example.com/home
  • https://home.example.com
  • https://www.example.com
  • http://example.com/index.php
  • http://www.example.com

Choose one of those URLs as your canonical URL, and use 301 redirects to redirect traffic from the others to your preferred URL. The best way to ensure that users and search engines are directed to the correct page is to use a server-side 301 redirect. A 301 status code indicates that a page has been permanently relocated to a new location.

If you use a website hosting service, look for documentation on how to set up 301 redirects.

Note: Code snippets must be included in the head of your site’s theme template.

Don’t forget: check out the other definitions (over 200) in our growing SEO glossary.

Rid Your Site of Duplicate Content

Hopefully, this article has given you a better understanding of canonical URL

Canonicalization is one of the most fundamental principles for you to understand as an SEO, and getting it wrong can have a negative impact on the performance of your site.

That being said, I hope now you understand how it works and what it does, as well as how to find and fix problems, you will be in a great position to use it effectively and rid your site of duplicate content.

However, If you have not fully grasped the concept, at Loganix, we have a dedicated team to ensure that the technical SEO part of canonicalization is not an unpleasant experience for your SEO efforts.

Let us help you today!

Written by Aaron Haynes on October 24, 2021

CEO and partner at Loganix, I believe in taking what you do best and sharing it with the world in the most transparent and powerful way possible. If I am not running the business, I am neck deep in client SEO.