Canonical tags are one of the most important SEO tags. Yet, they are often misunderstood.
Google introduced them in 2009 to help webmasters control which version of a page should be indexed.
Read what they are and how to use them correctly to avoid duplicate content.
Contents:
What Are Canonical Tags?
Canonical tags (rel=“canonical”) are HTML elements that tell search engines which version of a page is the “master” or original version (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 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.
Now, let me tell you a secret.
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.
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.
You don’t want to have duplicate content issues. And using them can help you avoid this problem.
Too many duplicate pages can also influence the crawl budget that search engines allocate to your site.
In addition, these tags are essential because they help ensure that your site gets credit for the content.
For example, if you have a post republished on another site, 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.
As mentioned, 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.
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.
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.
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
An absolute URL contains the full path to the page, including the domain name. For example:
<link rel=“canonical” href=“https://mysite.com/example/” />
While a relative URL is:
<link rel=“canonical” href=“/example/” />
Both of these options 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:
It is a tag that points to the same page that it is on.
Important note: the most popular CMSs are already using self-referential canonical tags.
Only One Canonical Tag per Page
Finally, 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 of them:
- Subdomain Canonicalization
- Trailing Slash Canonicalization
- Protocol Canonicalization
Subdomain Canonicalization
Subdomain canonicalization 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 happens when you have pages with and without a trailing slash, and you don’t specify a preferred version.
Protocol Canonicalization
The last common issue is protocol canonicalization and it’s when you have pages on both the WWW and non-WWW versions of your site, and you don’t set your favorite version.
FAQs
Q: Does every page need a canonical tag?
A: Yes, it’s best practice to include a canonical tag on every page of your website. This helps search engines understand which version is the source. It also ensures that any pages with similar content are not indexed, avoiding potential duplicate content penalties.
Q: How do I check if my canonical tags are working?
A: You can use Google Search Console. Look at the Indexing report, which will show you pages with and without a canonical tag.
Also, use an SEO audit tool to scan your site for errors and issues related to canonicalization.
Q: Where is the canonical tag placed?
A: The canonical tag is placed in the HTML head section of a page. It should come after all other tags but before any content. This allows search engines to identify your preferred URL correctly.
Q: What is the difference between a 301 redirect and a canonical tag?
A: A 301 redirect is used to permanently redirect one URL to another. The canonical tag, on the other hand, tells search engines which version of a page should be indexed and displayed in search results. It does not actually redirect users to the canonical URL.
Q: Do images need canonical tags?
A: No, it is not necessary to set canonical tags for images.
Q: How can I fix an alternate page with the proper canonical tag?
A: To fix an alternate page with the proper canonical tag, you should first determine the preferred version of the page. Then, add a rel=canonical tag to that page’s HTML head section, specifying the preferred URL as the canonical URL. This will ensure that search engines understand which version is the source and prevent any duplicate content penalties. If you are using WordPress, you can also use plugins (such as Yoast) to automatically add canonical tags to your pages.
Before You Go
Canonical tags are a powerful way to avoid duplicate content penalties from Google.
If you’re not sure how to implement them, you can simply 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.
Now, it’s over to you.
Do you have experience with this kind of tag?
Let us know in the comments below.
Lisa Sicard says
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!)
Erik Emanuelli says
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!
Moss Clement says
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!😊🤗
Erik Emanuelli says
Glad you liked the post, Moss.
Thanks for your comment.
Winfred says
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.
Erik Emanuelli says
Good to hear you’re learning something new here, Winfred.
Thanks for the positive comment.