Canonical tags are one of the most important SEO tags. Yet, they are often misunderstood.
They were introduced by Google in 2009 as a way to help webmasters control which version of a page should be indexed.
In this post, we’ll explain what canonical tags are and how to use them correctly to avoid duplicate content.
Contents:
- What Are Canonical Tags?
- Examples of Canonical Tags
- Why Are Canonical Tags Important For Seo?
- When Should You Use Canonical Tags?
- Canonicalization Best Practices
- How to Implement Canonical Tags
- Common Canonicalization Issues
What Are Canonical Tags?
This is important because duplicate content can hurt your SEO by confusing search engines and causing them to index multiple versions of the same page.
Using canonical tags can help you avoid this problem by telling search engines which version of a page is the original.
Examples of Canonical Tags
Canonical tags are placed in the <head> section of a page, and they look like this:
<link rel=“canonical” href=“https://mysite.com/example/” />
The “href” attribute contains the URL of the original or master page.
Website architecture is an important aspect of technical SEO but is often to blame for duplicate content.
If, for example, you have the same post or product page that is attached to two different categories, but exists on two URLs:
https://example.com/black-shirts/black-and-red-shirts/ https://example.com/red-shirts/black-and-red-shirts/
And if these URLs are for the same purpose (product, or service), you might want to choose one as the canonical URL to inform Google and other search engines which one to display in the search results.
Let’s take another example. If you have a blog post that is republished on another site, you can use a canonical tag to tell Google that the original version is on your site.
This ensures that your site gets credit for the content, and it helps to avoid duplicate content penalties.
Why Are Canonical Tags Important For Seo?
Canonical tags are important for SEO because they help search engines understand which version of a page is the original.
This is important because duplicate content can hurt your SEO by confusing search engines and causing them to index multiple versions of the same page.
Using them can help you avoid this problem by telling search engines which version of a page should be indexed as the original.
Too much duplicate content can also influence the crawl budget that search engines allocate to your site.
In addition, canonical tags are important for SEO because they help ensure that your site gets credit for the content.
If you have a blog post that is republished on another site, for example, you can use a canonical tag to tell Google that the original version is on your site.
When Should You Use Canonical Tags?
There are a few different situations when you might want to use canonical tags.
If you have multiple pages on your site that contain similar or identical content, you can use them to tell search engines which page is the original.
This is important because it helps to avoid duplicate content penalties.
In addition, if you have a blog post that is republished on another site, you can use a canonical tag to tell Google that the original version is on your site.
This helps to ensure that your site gets credit for the content.
If people deliberately chose to syndicate their content, it makes it difficult to identify the originating source. That's why we recommend the use of canonical or blocking. The publishers syndicating can require this. https://t.co/hblGLsD0ir pic.twitter.com/yjtx43II8j
— Danny Sullivan (@dannysullivan) September 18, 2019
Finally, if you have different versions of a page (for example, a mobile version and a desktop version), you can use canonical tags to tell search engines which version is the original.
This helps to ensure that only one version of the page is indexed, and it can help you avoid duplicate content penalties.
Canonicalization Best Practices
There are a few best practices that you should keep in mind when using canonical tags:
- Use Absolute URLs
- Choose the Correct Domain Version
- Force Lowercase URLs
- Use Self-referential Canonical Tags
- Only One Canonical Tag per Page
Use Absolute URLs
During canonicalization, it is important to use absolute URLs, as suggested by John Mueller:
You can use either, but I'd recommend using absolute URLs so that you're sure they're interpreted correctly.
— johnmu likes 🥚 staplers 🥚 (@JohnMu) October 24, 2018
An absolute URL contains the full path to the page, including the domain name.
For example, an absolute URL is:
<link rel=“canonical” href=“https://mysite.com/example/” />
And a relative URL is:
<link rel=“canonical” href=“/example/” />
Both of these URLs will work, but it is important to use absolute URLs because they are more specific, and they can help avoid problems caused by relative URLs.
Choose the Correct Domain Version
When choosing a canonical URL, you should always choose the correct domain version.
There could be different versions of domains:
- WWW
- non-WWW
- subdomain
- HTTPS
- HTTP
For example, if you are on a secure domain, you want to use:
<link rel=“canonical” href=“https://mysite.com/example/” />
Force Lowercase URLs
When choosing a canonical URL, you should always force lowercase URLs.
Here‘s how to do it.
Use Self-referential Canonical Tags
As suggested by John Mueller, Webmaster Trends Analyst at Google, using self-referential canonical tags is recommended:
A self-referential canonical tag is a tag that points to the same page that it is on.
The most popular CMSs are already using self-referential canonical tags.
Only One Canonical Tag per Page
Remember, you should always use only one canonical tag per page.
If your page has multiple canonical tags, Google will ignore them:
How to Implement Canonical Tags
The most common way to implement these tags is by using the HTML tag (rel=canonical).
To do this, you need to add a rel=canonical tag to the head of your page.
For example:
<link rel=“canonical” href=“https://mysite.com/example/” />
This tells Google that the canonical URL for this page is:
https://mysite.com/example/
If you are using WordPress, you can install the Yoast SEO plugin, which will automatically add canonical tags to your pages.
In the “Advanced” section, you can specify the canonical URL for each page:
Important Note
Common Canonicalization Issues
There are a few common canonicalization issues.
Here are some among them, that you should be aware of:
- Subdomain Canonicalization
- Trailing Slash Canonicalization
- Protocol Canonicalization
Subdomain Canonicalization
Another common issue is subdomain canonicalization. This occurs when you have pages on both the WWW and non-WWW versions of your site, and you don’t write a specific version in your canonical tags.
Trailing Slash Canonicalization
Another common issue is trailing slash canonicalization. This occurs when you have pages with and without a trailing slash, and you don’t specify a preferred version in your canonical tags.
Protocol Canonicalization
The last common issue is protocol canonicalization. This occurs when you have pages on both the WWW and non-WWW versions of your site, and you don’t set your favorite version in your canonical tags.
Before You Go
Canonical tags are a powerful way to avoid duplicate content penalties from Google.
When using them, it is important to keep in mind the things mentioned in this guide.
If you’re not sure how to implement canonical tags on your site, you can install the Yoast SEO plugin for WordPress, which will automatically add them to your pages.
Did you know that you can check the canonical tags using a Chrome Extension? Find it out here.
By following these tips, you can make sure that your site avoids duplicate content penalties and ranks higher in Google search results.
Now, it’s over to you.
Do you use canonical tags on your site?
Let us know in the comments below.
HI Erik, I didn’t realize Yoast does this for us – yay! I was wondering how else I would go about it, thanks for sharing the details about canonicals as I’ve read a lot about them. (not as detailed as your post here!)
Hi Lisa,
there are a ton of things the Yoast Plugin does for us, including setting up meta robots tags, canonical URLs, SEO meta tags, and adding structured data to get rich snippets!
https://erikemanuelli.com/rich-snippets/
https://erikemanuelli.com/seo-meta-tags/
https://erikemanuelli.com/lsi-keywords/
It really does a lot!
Hi Erik,
Duplicate content has been a complicated subject for the longest, and it can cause numerous SEO issues. One is that search engine crawlers may find it challenging to pick the right URL for a search query. But here you have done an excellent job publishing this detailed post.
Thanks for sharing!😊🤗
Glad you liked the post, Moss.
Thanks for your comment.
Hi Erik.
Thanks for this amazing insight.
I always enjoy reading your content and i learn so much from you.
Thanks for always sharing your knowledge.
Good to hear you’re learning something new here, Winfred.
Thanks for the positive comment.