You’ve probably heard of the rel=canonical tag, and maybe you’ve even used it before, but if you’re still not quite clear on what it does or which situations call for its use, you’re not alone—the canonical tag can be tricky.
In this guide, we'll discuss the basics of rel=canonical, including what it does, when you should use it (and when you shouldn’t), and common mistakes to avoid when using this tag.
What Is the Rel=Canonical Tag?
Rel=canonical is an HTML tag that solves the problem of duplicate content. Webmasters use this tag on a page that is almost exactly the same as another page. The tag tells Google and other search engines which page is the original (or canonical) version. The search engine then knows to index only the canonical page, and all the “link juice” to the duplicate page gets passed to the canonical page.
Let’s look at an example. Suppose you have an ecommerce site, and all of the following URLs take visitors to the same page.
There are a couple of problems here. You don’t want duplicate content on your site because search engines might penalize you for it (learn how to avoid this with an AgencyAnalytics SEO audit report here). It would also be good for your rankings if you could get people to link to only one of these URLs. If your link juice is divided between the three of them, it's likely that none of them will rank highly.
The rel=canonical tag solves both of these problems. To use it, first choose which URL to designate as the original one. It doesn’t matter which one you choose, although in general, it’s a good idea to choose the simplest version of the URL. In the example above, let’s say you want https://example.com/coffee-grinder to be your canonical URL.
Then, place the rel=canonical tag in theof each duplicate page. The code looks like this:
This tells search engines to index only the page specified in the tag and ignore the duplicate. It also tells search engines to pass any link juice from the duplicate page to the original page. This way, you can keep both versions of the page live, but your SEO doesn’t take a hit.
The rel=canonical tag is sometimes also called rel-canonical, rel canonical, the canonical tag, or the canonical link element.
When Should You Use Rel=Canonical?
The rel=canonical tag is used when you think you might have a duplicate content issue, but it doesn’t make sense to remove one version of the content or to do a 301 redirect. Here are some times you would want to use it.
- The same content shows up under different categories or tags on your website.
- You have a dynamic page that lets people reach the same content through multiple filtering or sorting options. Ecommerce sites, in particular, often display the same content under many URLs.
- You own multiple sites and use the same content on more than one of them.
- You syndicate content, or you let other sites syndicate your content. In either case, the site re-posting the piece should use a rel=canonical tag to direct link juice back to the original.
When Shouldn’t You Use Rel=Canonical?
The rel=canonical tag is definitely useful, but it isn’t always the right solution. Here are some situations when you shouldn’t use rel=canonical (and what you should do instead).
There’s more than one way to get to your homepage. For instance, suppose both of the following URLs take someone to your homepage:
You might want to use rel=canonical to set your preferred URL as the canonical version. However, it’s better to just set up a 301 redirect so that visitors always land on your preferred version. Why? It’s cleaner and simpler not to have two versions of your homepage floating around the Internet. Also, since people will only ever land on your preferred homepage, all the links you get to your site will have the correct URL.
In general, don’t use rel=canonical when you can use a 301 redirect instead. Redirects are usually less complicated, and the less you complicate your site, the better.
You’re using a special referral or tracking URL. Tracking URLs can be very useful, but it’s not a good idea to let people land on them, even if you use rel=canonical to point them towards the original page. The reason? If other people start linking to these URLs, your tracking numbers won’t be accurate anymore.
You can fix this problem by setting up a 301 redirect from the tracking URL. Count the visit to the special URL, and then send the person to the main version of the page. That way, your numbers stay accurate.
You have paginated content on your site. For example, suppose you have a news story that spans three pages, each of which has its own URL. It might seem natural to use the canonical tag on pages 2 and 3 to specify that the first page is the original version. However, this is a big mistake because the content on the second and third pages isn’t duplicate, so by using rel=canonical, you prevent any of the pages except the first one from ever showing up in search results. This could result in the loss of a lot of traffic if people search for terms that closely match something on the second or third page of the story.
You have a couple of better options here. The first one is to use the “next” and “prev” tags to specify the order of your pages. These tags are formatted similarly to the canonical tag.
For example, the next and previous tags would look something like this if you placed them on page two of your article.
You can also create a “view all” page that contains the whole news story. Then you can use a rel=canonical link on each of your three pages to specify that the “view all” version is the canonical one.
Does a rel=canonical tag pass 100% of the link juice to the canonical page?
No, but it passes most of it. No one knows for sure how much link juice gets lost in the transition, since search engines haven’t talked openly about it. However, the loss seems to be minimal, so it’s probably not worth worrying about.
Can I use the canonical tag if two pages aren’t exactly the same?
Yes, but don’t abuse the feature. Search engines will probably honor your request, even if your content isn’t the same on both pages. But if they notice that you’re using the canonical tag on pages that aren’t actually duplicates, they’ll start to ignore all the canonical tags on your site.
That said, your pages don’t have to be 100% identical to use rel=canonical. For instance, it’s fine to use the canonical tag with pages that differ by a sentence or two.
Can I point a page at itself?
Yes. It’s a little redundant, but if you want to be thorough, there’s no reason you can’t put a canonical tag on the canonical page itself.
Can I canonicalize every page on my website?
Yes, but this is slightly controversial – some people think overusing rel=canonical might make search engines take your canonical tags less seriously, while others think it’s perfectly fine. If you want to use rel=canonical on your whole site, it’s probably safe, but double-check to make sure all your tags are correct.
Can I canonicalize a page that canonicalizes another page?
Yes, but there’s usually no good reason to do this. Chaining rel=canonicals together is confusing and messy. You also lose a little link juice every time you make that jump from one page to another, so doing it more than once isn’t smart. Just point your page at the original canonical page instead.
Can I canonicalize a page on a different site?
Yes, rel=canonical works across different domains.
Common Mistakes Webmasters Make with the Rel=Canonical Tag
It’s easy to make a mistake with the rel=canonical tag, but these mistakes aren’t always obvious. This can have devastating effects because by the time you realize something is wrong, your SEO has already taken a hit. Here are a few common scenarios to avoid.
Using more than one rel=canonical on a page
You should only have one canonical tag per page. If you have two or more, search engines will ignore all of them. Having more than one canonical tag tells Google there are multiple original versions of the content on that page, which defeats the purpose of using a canonical tag to begin with.
Canonicalizing a noindex page
Always check that search engines are able to index a page before you canonicalize it. Otherwise, none of your content will have a shot at ranking, because you’ve told search engines to ignore it.
Putting a rel=canonical tag in the body instead of the head
This is an easy mistake to make, but your canonical tag will be completely useless if you do this. Double-check to make sure your rel=canonical is in the head of the page, where your title and meta description are.
Using relative URLs instead of absolute URLs
An absolute URL is explicitly spelled out, including http or https at the beginning. A relative URL is assumed to be relative to the current page. For instance, here’s a canonical tag that uses an absolute URL:
There’s no room for ambiguity with this absolute URL. And here’s the same tag with a relative URL:
This URL is assumed to be relative to http://example.com.
It’s always a better idea to be specific and use absolute URLs in your canonical tags. Otherwise, there’s a good chance of making a mistake and canonicalizing a page that doesn’t even exist. For instance, take a look at this canonical tag:
At first glance, this looks fine. But because the http protocol isn’t specified, search engines will think this is a relative URL. You’re telling them to index the page http://example.com/example.com/blog. Avoid SEO disasters like this by spelling out the entire URL in every canonical tag you use.
The canonical tag is a great tool in your SEO arsenal, but you’ve got to be careful with it. This tag isn’t forgiving of mistakes, and it can even wipe your site off search engines’ radars, but if you use it right, it’s a very useful way to consolidate link juice and boost SEO. Don’t fear rel=canonical – just do your research first, and this tag can reward you with improved search rankings.