What Is a Canonical Tag?
Learning how to properly use a canonical tag is an excellent way to solve issues related to duplicate content and improve your website’s SEO. In this article, we’ll define canonical tags, discuss their SEO implications, and leave you with some best practices to apply when creating your own.
What Is a Canonical Tag and How Does it Work?
A canonical tag, also referred to as “rel canonical,” is a specific piece of HTML code that tells a search engine that a URL it's landed on is the definitive original version of that page. This is helpful if a website has multiple URLs with identical or similar content so that the website doesn’t run into issues with duplicate content on search engines. Essentially, a canonical tag tells a search engine like Google, Yahoo!, or Bing which version of a webpage it should index in order for it to appear in search results.
What Does a Canonical Tag Look Like?
Generally speaking, canonical tags should be included in the coding of the <head> of a webpage. The tag is relatively simple and looks something like this:
<link rel=“canonical” href=“https://example.com/sample/” />
What this tells search engines is that the link that’s a part of this tag is canonical, so the original copy, and then it presents the URL where the canonical version can be located.
Canonical Tags vs 301 Redirects
A 301 redirect refers to a permanent redirect from one URL to a secondary one. In other words, all clicks on a URL with a 301 redirect will automatically go to the secondary URL. People often get confused between canonical tags and 301 redirects since 301 redirects can be used to send viewers to a main or original copy of a webpage.
However, the difference is that canonical tags are only visible to search engines, and viewers of a canonical URL stay on the same webpage. With 301 redirects, both the search engines and viewers are redirected from one URL to another.
How Are Canonical Tags Important for SEO?
Canonical tags are important for SEO mainly because they help prevent duplicate content, which can be a roadblock when trying to get a webpage to rank. Google sends out crawlers to different URLs in order to rank them on a search engine results page (SERP). When content is similar or duplicated on multiple web pages belonging to one website, these crawlers can miss out on the original content.
Not only that, but sometimes crawlers can’t differentiate between the original content and duplicate content on their own, so they might wind up indexing a duplicated page rather than the original if it’s not canonically tagged. Lastly, Google’s crawlers may spend a lot of time crawling duplicate webpages and miss other important content on your website that can help it rank.
Google itself claims that “the canonical page will be crawled most regularly; duplicates are crawled less frequently in order to reduce Google crawling load on your site.” Therefore, tagging a page as canonical helps Google’s bots crawl your page, which in turn helps your page get indexed and rank higher on a SERP.
Using canonical tags is a good way to prevent canonicalization and organize your web pages to make them easily crawlable by Google’s bots. For example, an eCommerce website may have multiple slightly different web pages for items of the same model that come in different sizes or colors. In order for Google to accurately rank this product, it’s helpful to indicate to the bots crawling a website which version of the URL is the original so that when it comes up in a search, users are being directed to the correct page.
You may also be interested in:
Canonical Tags Best Practices
While adding canonical tags themselves isn’t a difficult task to do, there are a number of tips and best practices to be aware of to ensure the tags are giving Google the most accurate information. Whether you’re just getting started on making your website or you want to improve your existing site’s SEO and index-ability, here are a few tips to use when implementing canonical tags.
01. Use Full URLs
According to Google, it’s ideal to avoid using real paths with the rel=“canonical” tag in order to ensure that the link is read correctly by the bots. So, the links should look like this:
<link rel=“canonical” href=“https://example.com/sample/” />
A real path link would look like this:
<link rel=“canonical” href=”/sample/” />
It’s best practice to use the full URL, also known as “absolute URLs” in canonical tags. Absolute URLs should always include specific elements, such as:
The complete domain name
When canonical tags don’t use absolute URLs or use real paths instead as with the example above, they risk being ignored by Google.
02. Self-reference Canonical URLs
There’s nothing wrong with having a canonical tag that points to the current URL. If there are multiple duplicates of a certain page, it’s ok to have the tag pointing to the canonical URL page on the page itself. For example, if link A is the original, and B and C are duplicates, it’s acceptable to add a tag pointing to A on URL A. These self-referential tags aren’t mandatory, but they’re recommended by Google’s experts since they help indicate which URL should be indexed.
03. Always Use Lower-case URLs
The title case may not seem like it makes a big difference, but when crawling webpages, bots might mistake two identical URLs with different title cases as two separate URLs or duplicates. Therefore, it’s best to use lower-case URLs across the board to avoid this potential issue altogether.
04. Make Sure to Use the Correct Domain Version
If you switched your website to SSL and you’re currently on a secured domain, make sure this is included in your canonical tag. By contrast, for websites without a secure domain, make sure not to include that in a tag. When creating a canonical tag, ensure that you’re using either HTTPS or HTTP in the URL depending on what is relevant to your website.
05. Add a Canonical Tag to the Homepage
Canonicalizing a homepage isn’t necessary, but it’s another tip that’s helpful in ensuring the right URL gets indexed. Websites often have duplicates of a homepage for a number of reasons so it’s ideal to add a canonical tag to the homepage’s template in order to avoid any unnecessary issues down the line.
06. Ensure Canonical Pages Are Accessible
It doesn’t make much sense to go through all the effort to show Google that a page is canonical only for it to turn up as a 404 when users click on it from the SERP. It’s important to ensure that a canonical page is accessible and isn’t blocked by robots.txt. To avoid this, ensure the canonical URL is listed on your XML sitemap and double-check that all canonical tags are accurate and the pages viewable if you’re using a program to create them.
07. Use Canonical Tags Across Domains
When relevant, it’s possible to add canonical tags across different domains. This is primarily for companies that own more than one website with similar content. For example, a news company with a couple of websites that publish the same content or articles might want to add a canonical tag to a specific URL in order for it to rank and so that the duplicate content doesn’t confuse the search engine’s bots.
08. Keep an Eye on Dynamic Canonical Tags
When using a program to create canonical tags, it’s not uncommon for there to be inaccurate code that leads to adding a different canonical tag to all duplicates of a URL. Of course, this completely defeats the purpose of assigning a canonical tag to a URL and the only way around this is to be aware and regularly check for anomalies on all your web pages that might lead to a page not getting crawled or indexed by bots.
Looking to expand your SEO knowledge? Check out the Wix SEO hub for more great resources.