Guide SEO

What is Canonical URL: An Ultimate Guide for Beginners

Cover image of an article talking about canonical URLs and tags

What is a canonical URL?

In a nutshell, A canonical URL is the URL of the best representative page from a group of duplicate pages. Canonical URLs can be useful if a website has multiple pages with similar or identical content and can also help improve a website’s search engine optimisation.

What is a canonical tag? 

Canonical URLs and canonical tags are not the same, but they are often used together. Canonical tags are used to tell search engines which version of a website’s URL is the preferred one. canonical tags are placed in the <head> section of a website’s code.

How to identify canonical URLs on your website?

A canonical URL is typically the version that includes the www subdomain, but it can also be the version without it. For example, if you have a page that can be accessed via both “” and “”, the canonical URL would be “”. By specifying a canonical URL, you’re basically telling the search engines which version of the URL should be indexed and to ignore any duplicates.

Common examples of different URLs with duplicate content

  • Parameterised URLs for search parameters (e.g.,
  • Parameterised URLs for session IDs (e.g.,
  • Separate printable versions of pages (e.g., and
  • Multiple URL paths for posts under different categories (e.g., and
  • Page versions for different device types such as desktop and mobile (e.g., and
  • AMP and non-AMP versions of a page (e.g., and amp.example/page)
  • Non-www and www variants (e.g., and
  • Non-https and https variants (e.g., and
  • With and without trailing slashes (e.g., and
  • Serving the same content at default versions of the page such as index pages (e.g.,,,,,, etc.)
  • Serving the same content with and without capital letters (e.g., and

Why are canonical URLs & tags important to SEO? The benefits of using canonical URLs

If you’re a webmaster, you probably know a thing or two about SEO. And if you’re anything like me, you’re always looking for ways to optimise your site and improve your ranking in search engines. One SEO technique that is often overlooked is the use of canonical URLs. There are a few benefits to using canonical URLs: 

Avoid duplicate content

First, it helps avoid duplicate content issues. If the search engines index both versions of the URL, they may think that you’re trying to spam them with duplicate content. By implementing correct canonical tags, the website tells Google or the other search engines which URLs have the original content and therefore search engines should only crawl those ones.

Consolidate URL ratings

Second, since a canonical tag’s mission is to tell Google which page the search engines should crawl, it helps search engines to transfer the URL metrics toward the variants into a single URL (the canonical URL)it can help to simplify your SEO efforts by consolidating all your links to a single URL. As a result, canonical URLs can help prevent duplicate content issues and improve your website’s search engine optimisation (SEO).

Help manage content on multiple sites

Canonical tags can tell search engines which sites contain the original version of the content and which sites are only republishing/syndicating that content.

If you’re also a website owner who uses other websites to publish content (i.e. guest posting or promoting their own content), Google has to determine which website is the original source of this content and should appear in search results, and which website is just promoting that content.

Canonicalising these external websites can help solve this problem and promote the original, main version of the page in Google Search.

How to implement canonical URLs?

According to Google Search Central, There are a few different ways to set up canonical URLs for your website:

  1. HTML tag (rel=canonical)
  2. HTTP header
  3. Sitemap
  4. 301 redirect*
  5. Internal links

1. Using rel=”canonical” HTML tags

canonical tag in the http header

The most intuitive and common practice to implement canonicals. Simply add the following code to the <head> section of any duplicate page:

<link rel=“canonical” href=“” />

WordPress plugins

Canonical URL section on Premium Yoast SEO

Alternatively, some WordPress plugins like Yoast SEO (seen above) provide features to set up a canonical URL easily from your page editor.

2. Using rel=canonical HTTP header

For documents such as PDF, there is no <head> page, so there is no way to put canonical tags in the page <head> section. In such cases, you should set the canonical using an HTTP header. You can also use canonical in standard web page HTTP headers.

3. Using sitemaps

Google usually sees URLs in sitemaps as canonical URLs, which means any non-canonical URLs are not supposed to be in sitemaps.

4. Using 301 redirects

Setting 301 redirects on the non-canonical URLs pointing to their canonical pages.


  • https:
  • http:
  • https: (canonical URL)
You should redirect the traffic of the non-canonical URLs to the canonical URL.

5. Using internal links

The way you connect the content between your website pages is also a canonicalisation signal. If one page is receiving traffic through internal links from another page, it communicates to Google that it is a canonical page with relevant content for the other pages. For more detail, watch Google Webmaster Trends Analyst John Mueller’s #AskGoogleWebmasters video


The better you follow these 5 practices, the more likely Google will understand which pages are canonical URLs on your website. Why bother with all this? Well, if you don’t take steps to control which version of your page is being indexed, you run the risk of having duplicate content on your site, which can hurt your search engine rankings. By setting up canonical URLs, you can make sure that only one version of each page is being indexed, and therefore boost your site’s overall SEO.

Tips for avoiding common mistakes when implementing canonical URLs 

Canonicalisation mistakes are surprisingly common. Here are a few tips for avoiding some of the most common mistakes:

Use the correct URL

Make sure that you use the correct format for your URLs. Canonical URLs should always use the https:// protocol and include the www subdomain. For example, is the correct format for a canonical URL. However, if your website operates on a non-www domain or your www-URLs are no longer accessible (redirected from www. to non-www or else), the canonical URL should be the one you’d like to rank in search results.

Use absolute paths for all of your links

Absolute URLs include the domain name, whilst relative URLs do not. For example, the relative URL for this page is “/canonical-url”, whilst the absolute URL would be “”.

Don’t use parameters in your canonical URLs

Parameters are the parts of a URL that come after the “?” character. For example, the URL for this page includes the parameter “?utm_source=test, however, including parameters in your canonical URL can cause problems with search engines indexing your pages.

Clear up your sitemaps

Don’t forget to remove the non-canonical URLs from your sitemaps! As this article on Google Search Central explains, Google considers all sitemap URLs as canonical URLs. Keeping non-canonical pages (pages with canonical tags pointing at different URLs) in the sitemap sends mixed signals to search engines, which might get confused about which page to rank.

By following these tips, you can avoid common canonicalisation mistakes and ensure that your SEO efforts are successful. If you’re not sure of the current state of your website’s canonical URLs, you can contact our SEO specialists for help. They will be able to assess your website and determine where canonical URLs would be beneficial for your specific situation.


Canonical URLs and tags can be a little confusing, but they’re important for your website’s SEO. So if you’re not already using canonical URLs on your site, I encourage you to start doing so. It’s an SEO technique that can have a big impact on your site’s ranking in SERPs. Luckily, you don’t have to do it alone! We can help you audit your website and make sure these best practices are implemented properly. Book a free website audit with us today and let us help you take your website to the next level!

author avatar
Digilari Media