1. SEO Wiki
  2. Canonical URL

Canonical URL

Canonical URL definition

A canonical URL (also called a canonical link) is a page that is most representative of a set of duplicate or near-duplicate pages on your site. It is the URL that Google indexes and displays in search results.

Setting up canonical URLs

A canonical URL is defined with the help of the canonical tag (rel=”canonical”) in the HTML code of the set of duplicate pages.

For example, your site has the following pages:

www.site.com/shoes.html

www.site.com/shoes_print.html (the print version)

These pages may have slightly different designs but identical content. So, in order not to get a duplicate content penalty from Google, you should indicate which page is the iconic version and should be indexed. 

To do this, you need to add the rel=”canonical” tag in the HTML of the duplicate page, like this:

<link rel="canonical" href="http://www.site.com.shoes.html" />

If you need to specify canonical for non-HTML files such as PDFs, you can add a rel=”canonical” HTTP header response.

Checking canonical URLs

There are various free and paid tools to check if a page is canonical. If you need to check a specific URL, you can use canonical tag checkers such as SEO Site Checkup or SEOptimer. If you need to bulk check what pages on your website have canonical tags, then use WebSite Auditor (Site Structure > Site Audit > Redirects > Pages with rel=”canonical”):

checking canonicals with WebSite Auditor

Canonical URLs best SEO practices

Top Google guidelines for canonical URLs[1] include:

  • Do not include duplicate URLs in the sitemap
  • Do not use canonicals in case of pagination
  • Do not use the robots.txt file for canonicalization purposes
  • Do not use the noindex tag on duplicate pages
  • Do not specify different URLs as canonical for the same page using the same or different canonicalization techniques
  • Do not use the URL removal tool, as it removes all the versions of the page
  • Only use 301 redirects when you want to replace a page with more relevant content
  • Link to canonical URLs only

Canonical URLs and CMSs

Many content management systems (CMS) such as Shopify, Wix, WordPress, etc. do not let you edit HTML source code. Still, most of them let users set up canonicals via settings or various plugins. As for Shopify, this CMS sets up canonicals by default because most of Shopify URLs are dynamic[2].

Pagination & SEO: 9 Must-Learn Tips

What’s the Best CMS for SEO? Top 10 Platforms Compared