A canonical URL is the preferred version of a web page. It appears in a small piece of code found on a page that tells search engines how to crawl the page and rank the importance of the content. In the event that you have the same content found on different URLs, using this code— referred to as rel=canonical tag—will help search crawlers better understand what content is important, resolve duplicate content issues, improve the ranking of that content, and ultimately, can lead more customers to your site.
To show you how to use a canonical URL, the rest of this post will cover:
- What is a canonical URL?
- Why is rel=canonical good for SEO?
- When do I use a canonical URL?
- Canonical URLs vs. 301 redirects: What’s the difference?
- Canonical URLs vs. Noindex robots meta tags: What’s better?
- How to set up a canonical URL
What is a Canonical URL?
A canonical link element, or canonical tag, is found in the HTML header of a webpage and tells search engines if there is a more important version of the page. The canonical tag appears as: rel=”canonical”.
For example, this line of HTML code tells search engines that the URL “https://shoestore.org” is the original version of the page that this tag occurs on:
<link rel=”canonical” href=”https://shoestore.org” />
The tag is important because search engines regularly crawl websites to look for information to help them decide how to rank pages and posts. If the search crawler finds two pages with the same content, it doesn’t know how to rank them Click & Tweet! . It can’t decide which page should rank, so the two pages cannibalize the ranking potential of the other. As a result, it’s possible that neither piece of SEO content will rank.
A canonical URL should be set up if you have two pages of similar content on your website or if you have content on your site that is also used on another site. You can use a canonical tag to point Google to the original content and make sure the first piece gets all of the credit and SEO benefits.
This tag was introduced in 2009 when Google worked with Microsoft (Bing) and Yahoo to build a consensus to accept the canonical terms. While this article will likely focus on using canonicals to help Google crawlers, know that the vast majority of search engines accept these tags.
Why is Rel=Canonical Good for SEO?
Simply put, duplicate content confuses search engines. When search engines look at multiple pages with the same content and no clear keyword optimization signals they:
- Don’t know which piece to assign credit to
- Don’t know what to index
- Don’t know which pages should rank
A rel=canonical tag clarifies this, helps search engines understand the content, prevents them from ignoring the page, and improves the chances the content will be ranked.Use rel=canonical tags to clarify duplicate content, help search engines understand content, and improve the chances your content will be ranked. Click To Tweet
There once was talk that duplicate content could lead to search penalties, dropping a website’s entire ranking or removing it from SERPs entirely. However, now many SEOs believe there is no real penalty.
Google doesn’t punish websites with duplicate content; it merely filters out duplicate results to create a better experience and meet search intent.
- Google knows that users don’t want to see the same content multiple times. If a user didn’t find what they wanted in the first listing, why would the same content in the second, third, and fourth listing be any different?
- Google actively tries to find the best source of content so it can display that page and create a positive experience for users. This prevents users from having to click through to the original sources or falsely credit a source that belongs to someone else.
- While a page with duplicate content won’t be penalized, it may be filtered out in results in favor of other content. There won’t be a lot of traffic for that post, but it won’t negatively impact the website as a whole.
Despite your best efforts, it’s likely that you have duplicate content on your website or that other websites may have taken your content and duplicated it on their pages. Experts estimate that as much as 29% of all content on the web is duplicated.
But you can easily resolve these issues and generate long-term SEO results by utilizing relative canonical URL best practices and knowing when to use this tag.
When Do I Use a Canonical URL? (5 Rel Canonical Examples)
Here are a few rel canonical examples that show when you should use this tag to identify duplicate content and meet best practices for SEO.
When You Repost Existing Content
If you have a website that is a part of a franchise or national organization, then you may share statements, press releases, and even blog content originally published on the main national website. Instead of merely linking to the original content and hoping site visitors click through, you may publish the content on your own site. This is duplicate content that needs a canonical tag. You can use a canonical URL to direct search crawlers to the original post so that it doesn’t look like you are copying the page.
When You Syndicate Blog Content
One of your marketing strategies might include syndicating your existing content on other websites. Blog syndication helps you expand your brand awareness and reach while the publisher gets content for their pages. However, syndicated content means your words are now spread across the internet on multiple pages. Without canonical URLs, search crawlers might not know which content came first and what to prioritize. Fortunately, many blogs that syndicate content know to set up a canonical URL so they don’t compromise the SEO or search authority of the brands they work with.
When You A/B Test Different Pages
A/B testing is a strategy that marketers employ to see which elements on a page work the best. You may test small details like the color of various buttons or big changes like the page layout or content. In some instances, Google could end up crawling both pages and be confused about which one to index as the original. Canonical URLs serve as a roadmap to the original content.
When You Use Multiple URL Variations (Often on E-Commerce Sites)
Canonical URLs are often used for e-commerce websites that set different hierarchies and URLs as their sites change. An e-commerce website might have a category dedicated to shoes with product listings and then change the hierarchy to break the category into women’s and men’s shoes, or sandals versus running shoes. This means the URLs for these product pages change even though the pages themselves remain the same. As a result, there are two URLs with the same content. Canonical URLs are a part of e–commerce SEO best practices that direct search engines to the top pages.
If There is Unintentional Duplicate Content on Your Site
As mentioned earlier, you may have duplicate content on your website and not even know it Click & Tweet! . There are dozens of situations that can lead to unintentional duplicate content. A few of the most common causes are:
- Your site has separate versions of HTTP and HTTPS or WWW and non-WWW pages
- Another site has scraped and republished your content
- SEO meta descriptions and titles are the same for multiple pages
- There are technical issues such as pagination problems or multiple versions of printable and text-only pages
Because it can be difficult to identify technical duplicate content issues on your site, you should use a duplicate content checker to find problems. Alexa’s SEO Audit Tool can help you find hidden duplicate content issues you may not be aware of.
Canonical URLs vs. 301 Redirects: What’s the Difference?
In some instances, you may want to set up a 301 redirect instead of a canonical URL. A 301 redirect automatically sends site visitors to a new URL when they click on an old link. The vast majority of times, you would use a 301 redirect if you are consolidating content into your archives or updating your URL or webpage. However, if you still want people to access the page, even if the content is duplicated, then you need a canonical URL instead.
Canonical URLs vs. Noindex Robots Meta Tags: What’s Better?
Another way you may want to resolve duplicate content issues is by blocking search engines from crawling the page in the first place. Through meta tag SEO and a robots meta tag, you can tell search engines not to crawl your pages, which may seem like quick a fix. In most cases, however, the more pages Google can crawl on your website, the better. So it’s usually best to use noindex for pages that you do not intend to rank or get traffic for.
How to Set Up a Canonical URL
Now that you understand why you would want to use a canonical tag and how it can help you, it is time to add this tag to your own site. There are multiple ways to do this depending on the plugins that you use and your comfort level of adding code to your website.
While there are many methods to choosing the best way to add the canonical tag, it is important that you follow a unified format on your website Click & Tweet! . If multiple people have access to the pages, then they could be adding tags in different ways, which could lead to even more SEO problems.
Add Canonical URLs Using Yoast
Yoast SEO is one of the most popular SEO plugins for WordPress, and it is a simple and easy tool for adding canonical tags. If you have a WordPress site, install the free plugin and easily add a canonical tag through the edit page or post section. This is an ideal option if you don’t want to touch the code or technical elements of your page.
Add Canonical URLs Using On-Site Code
Without a specific plugin that offers canonical linking (or if you just don’t want to use it for this purpose), you can add rel=canonical tags to your website using small code snippets. You can place the code in your page header to establish the canonical URL as soon as crawlers land on your page:
<link rel="canonical" href="inserturl.com<?php echo $_SERVER['REQUEST_URI'];?>">
If you aren’t familiar with adjusting the header code on your WordPress page, you can follow this guide to make sure you apply the code correctly.
Add Canonicals Through Google Tag Manager
If you have multiple tags on your website, then you can manage them through Google Tag Manager. This allows you to fire one tag when your page loads instead of dozens, improving the speed and making it easier to troubleshoot problems. Moz has an in-depth guide for managing your rel=canonical tags through GTM. You can use this tool to set different parameters for what can be crawled and what should be ignored.
Find Duplicate Content and Add Canonical URLs
Setting up a canonical URL is a quick way to fix SEO issues that come along with duplicate content on your site Click & Tweet! . Use a canonical URL checker to find and fix duplicate content issues on your site to make sure your content is optimized to attract and communicate properly with search crawlers.
To get access to Alexa’s duplicate content checker, which is just one part of our detailed SEO site audit report, sign up for a free trial of our Advanced Plan today.
Google and the Google logo are registered trademarks of Google LLC, used with permission.