Business wants to rank their website successfully in the search engine and this is why businesses invest their time into websites’ SEO.
Although search engine optimization has various aspects such as heading, alt tags, meta tags, robots.txt, nofollow, 301 and 302 redirects, etc. Some meta tags are a bit complex and canonical tag is the one aspect that you can not ignore.
What is Canonical Tag?
A canonical link element (rel=canonical) is an HTML tag that helps search engines to restrict duplicate content appearing on multiple URLs by defining ‘rel canonical’ as the preferred edition of a web page.
In easy words, if your website has similar or duplicate content on multiple web pages; you can use a canonical tag to indicate search engines which URL is the primary URL and should be indexed and appear in search results.
This small piece of code on your web page that informs crawlers how to index and rank the content. Canonical link element gives search engines a better understanding of content, fix duplicate content issues, and revamp the ranking and generate more leads to your website.
Usually rel=”canonical”, rel canonical, canonical URL tag, link canonical tag, and canonical link element all are the same thing. This canonical tag is written in the HTML <head> </head> tag or in Http header of a web page.
HTML Head Tag
<link rel=”canonical” href=”https://xyz.com/page.php” />
HTTP/1.1 200 OK
Link: <https://xyz.com/page.php>; rel=”canonical”
HTTP/1.1 200 OK
Header (‘Link: <https://xyz.com/page.php>; rel=”canonical”’);
When to use canonicalization?
Being a human we consider a web page as a concept like your website’s home page. But the problem is, search engines treat every unique URL as a different web page.
Let’s say –
There are multiple ways to lend on your home page –
Here we can identify the page as one, but search robots will consider them separately.
These instances are very common if you do not have a canonical tag on your website. Use a canonical tag when you diagnose following issues –
- URLs that define variations of the same product or service
- Mobile-Based URLs (mobile-specific subdomain or AMP pages)
- Region-Based URLs (it can also be based on language)
- Self-Referential URLs
- Parameterized URLs for search (https://adbizzo.com?ref=…)
- Separate printable versions of web pages
- Same content at http, https, www, and non-www variations
- Doing A/B testing on multiple pages
Why does canonical tag matter?
Search engines do not like duplicate content. Spiders crawl websites regularly to index web pages and posts. In case search robots find two or more pages with duplicate content, crawlers can’t decide which page should be ranked. Keywords and content cannibalization can hamper the website ranking potential and search engines can ignore both as there are no clear optimization signals.
Canonical tag (rel=”canonical”) analyzes the duplicate content and encourages crawlers to recognize the content to index and increase the chances to get ranked.
If search engines find canonical tag on your website, they will be able to –
- Decide to assign credit a specific version of web page
- Identify which web page to index (as robots index only one page)
- Determine which page should rank in search engine
- Analyze whether to consolidate “link equity” on one web page or split it between its versions
- Simplify tracking metrics
- Manage syndicated content
- Prevent crawling of similar pages
Setting Up the Canonical URL
Till now we have understood what is a canonical tag when to use it and why is it important; now it is the time to set-up a canonical tag on your website. There are multiple approaches to canonicalize your web-page with this code. You can choose one method according to your SEO strategy.
Let’s discuss some ways to specify canonical URLs –
- HTML tag (rel=canonical)
- HTTP header
- 301 redirect
- WP Plugin
- Google Tag Manager
HTML tag (rel=”canonical”)
rel=”canonical” metadata is the most common way to define the preferred version of similar pages. This small code snippet is placed in the web page head section. Ensure that you apply the code correctly.
<link rel=”canonical” href=”https://xyz.com/” />
Advantage – This approach can identify the canonical URL for an unlimited number of pages without worrying about individual URLs.
Disadvantage – But it can also increase the size of the web page which can lead to increased loading time. Most of the CMS don’t update this tag automatically. Managing the correct canonical URL is difficult if you update your websites’ URL so frequently.
Using rel canonical link element in HTTP header works similarly to rel=”canonical” html meta tag. It helps you to define the correct and preferred version of your content. This approach is usually helpful if you have PDFs or non-html content on your website as HTML rel link only works with HTML pages.
HTTP/1.1 200 OK
Link: <http://xyz.com/blog/>; rel=”canonical”
Advantage – rel link element in HTTP header does not work as metadata, so it doesn’t increase the size of your web page.
Disadvantage – Difficult to manage in case of large websites or frequent URL changes.
A sitemap is another way to index your canonical URLs in the search engines. Because search engines consider sitemap’s listed URLs as the preferred URL.
However Google does not consider Sitemap URL as canonical URL every time, but it is an easy method to define canonicals for large websites.
You can access your website’s home page via multiple URLs –
Here you have to choose one URL as canonical to get all the traffic on one URL.
301 redirection is the best way to set a preferred URL by permanently redirecting your website to a specific URL.
If you want to set up a canonical tag via WordPress plugin, use Yoast SEO plugin to add canonical tag easily. It also handles all the self-referencing canonical tags. To specify custom canonicals, take advantage of the “Advance” section on each webpage.
Google Tag Manager
In case you have numerous meta tags on your website, you can handle all these tags via Google Tag Manager. This forces only one tag whenever your web page loads which improve the speed of the website. You can use GTM to set parameters to define what to crawl and what not to.
Canonical Tag Best Practices
A Canonical tag is an easy snippet to include in your website code. Search engines disregard non-canonical web pages and your all SEO practices can go in vain.
Self-referencing canonical tags
A self-referential canonical is built when a web page includes a canonical snippet to itself. And it is completely fine to avoid the confusion.
https://adbizzo.com/index have this canonical :
<link rel=”canonical” href=”https://adbizzo.com/index” />
A landing page can have multiple copies and it is very common. Users can come to your website in multiple ways, using a canonical link element can be a good approach to prevent unforeseen problems.
Avoid dynamic canonical tags
Sometimes inadequate code can generate different canonical code for every version of URL. So, spot-check and ensure that canonical tags are applied correctly especially for E-commerce and CMS based websites.
Don’t send mixed signals
Search engines may not recognize or understand canonical tag if you send mixed signals. Chain canonical is also a way of sending mixed canonicalized signals. Avoid doing the following examples.
Using canonical tag for Page 1 → Page 2; then again canonicalize Page 2 → Page 1.
Canonicalizing Page 1 → Page 2; and using 301 redirect for Page 2 → Page 1.
Chain Canonicals snippets (Page 1 → Page 2; Page 2 → Page 3; Page 3 → Page 4)
Always try to send clear signs to get your website indexed in search engines.
Canonicalize near and cross-domain duplicates
While using canonicalization, most seo persons look after the exact duplicates of that particular web page. But you may have a web page with almost similar content on your subdomain or some other website. You can use a canonical tag across domains to get one website ranked in search engines, usually, this is called cross-domain canonical.
Open Graph URL should match canonical
There should not be any mismatch between the defined canonical and Open Graph URL on your webpages. If your OG tag URL is different from canonical; then you are sharing a non-canonical website on your social media.
Common Canonical Tag Errors
Applying the wrong rel canonical link can harm your website’s SEO health and disappear your canonicalized page from search engine results. Here are some common errors –
Broken canonical links
Broken rel=”canonical” leads you nowhere, it is crucial to identify the issues to get your content crawled and indexed.
Multiple canonical URLs
Multiple canonical tags may lead to unpredictability and search engines avoid all canonical code. So, ensure that you are using a single canonical link element to your website.
Non-indexable canonical tag
A canonical URL becomes non-indexable if blocked by robots.txt, redirect 3XX excluding 301 redirect, noindex, client error (4XX), or server error (5XX).
Canonicalize paginated web pages
It is fine to add a canonical tag on paginated content. But an error occurs when the same canonical snippet is applied on every paginated page.
Page 1 should have this canonical –
<link rel=”canonical” href=”https://adbizzo.com/blog_page1”>
Page 2 should have this canonical –
<link rel=”canonical” href=”https://adbizzo.com/blog_page2”>
The problem takes place when Page 2 is canonicalized to Page 1. Page 2 canonical –
Correct – <link rel=”canonical” href=”https://adbizzo.com/blog_page2”>
Incorrect – <link rel=”canonical” href=”https://adbizzo.com/blog_page1”>
If you canonicalize Page 2 to Page 1, search engines will not crawl and index Page 2.
Canonical URL is blocked via robots.txt
If you disallow a URL via robots.txt and send a canonicalized signal to it. Search engines avoid the web page from crawling and indexing. As well as the URL doesn’t pass any link equity to the canonical URL.
Using noindex tag for canonical URL
Both noindex tag and canonical link are contradictory to each other. Never apply these two snippets on the same URL. If you want to apply a noindex and canonical tag on the same URL, you can use 301 redirect or only use rel=canonical.
No canonical link for hreflang version
Hreflang meta tags indicate the language and geographic location of a website. It is recommended to define a canonical tag and alternative language tag if there is a canonical for the same web page.
<link rel=”canonical” href=”https://adbizzo.com/”/>
<link rel=”alternate” href=”https://adbizzo.com/en-ie” hreflang=”en-ie” />
<link rel=”alternate” href=”https://adbizzo.com/en-ca” hreflang=”en-ca” />
<link rel=”alternate” href=”https://adbizzo.com/” hreflang=”en” />
Canonical link element is an important part of SEO, but you should use it carefully. Follow the best practices to keep your website optimized for search engines. For huge websites, canonicalization is very crucial for SEO improvements.