What does canonical meta tag mean?
The Canonical tag is one of those tags that all webmasters have had to solve at least once due to problems caused by not using it properly. The most common mistake an SEO can make is not indexing pages that the Canonical Search claims canonically tag for them either incorrectly or with a canonical meta tag detected by Google; Is different. How to define a canonical tag for pages that have this problem is very important, and in the first step, in order to be able to use this tag correctly and in a standard way, we must first understand the canonical meaning well and know what it is. Where and how to use it, because improper use of this tag, in addition to misleading you and Google bots, prevents you from getting the right rank for your pages. And in this article, you will learn how to use this canonical tag correctly from the SEO teaching site.
Of course, apart from Canonical, we also have the term Canonicalization and we will deal with this issue as well.
What is a Canonical tag?
What does canonical mean? The whole canonical story is that Google is very sensitive to duplicate content, in the article Penalty site on Google we talked about duplicate content problems and even wrote a little about the canonical tag there and said what effect on penalizing the website We have in Google results.
Does Google pay attention to the canonical tag?
When Google bots with URLs that contain duplicate content; They have to prefer one of those contents to another and index that URL as the primary URL, which is the URL of the page. Now with this popular tag you can tell Google that please listen to me instead of which URL is the main one. In this case, you should keep in mind that setting the Canonical tag does not mean listening to Google, but it will most likely prioritize your letter.
Basically, Google considers the first URL, the first URL it indexes, to be the main one, although this is not always true, but also consider that the final decision to apply canonical tags to your site is made by Google, not you. Google said in the document:
Which is my canonical URL, according to Google?
Use the URL Inspection tool to learn which page Google considers canonical. Note that even if you explicitly designate a canonical page, Google might choose a different canonical for various reasons, such as performance or content.
So know that the priority in choosing Canonical is a page with Google and not with you, however SEO teaching suggests that you use this widely used meta tag on your pages. Read the reason for use in the next paragraph.
Cause of duplicate content on the site
Of course, no SEO professional will deliberately produce pages with the same content, so why create pages with duplicate content on your site?
- Multiple URLs: These URLs are generated on store sites that are generated by changing variables such as price, color and different categories or, for example, the best products or bestsellers.
- URLs generated by different sessions: URLs that are generated automatically by your site content management system by changing the session. Do you have pages that are going to look good with a printer? Do you use Breadcrumb Links in addressing?
- HTTP, HTTPS versions with and without WWW A site: If you do not correctly tell Google bots that URLshttp://example.com
- They all point to the same page; These URLs are indexed separately in Google. (This problem can be solved with a permanent transfer code or Redirect 301 code.)
- Small or large English words in the URL of the site pages: It does not matter to the browsers and users the small or large letters, but search engines are sensitive to this issue. If your site is not sensitive to uppercase and lowercase; No doubt you will get into trouble.
- Different URLs for mobile: If the URLs of your pages are different from those of the desktop user when a mobile user visits your site, consider m.example.com for the mobile version of example.com.
- Some websites have shorter URLs to share their content on social networks and this URL is not redirected, like Digikala, in fact any Digikala product can be displayed with two different URLs but they have solved the problem of duplicate content with canonical tags.
Note that in the examples we mentioned, duplicate content is not necessarily generated, but it is the multiplicity of URLs that results in duplicate content on the same pages that are available with multiple URLs. Also note that resolving duplicate content is not the only problem with canonical tags, and there are other ways to resolve this issue, such as permanently redirecting pages (Redirect 301) and using the URL Parameter section in the search console. In the Search Console tutorial video course, in addition to the URL Parameter topic, we also covered how to redirect in a very comprehensive way so that you have the least possible content.
Application of Canonical meta tags
As we said, we use the canonical tag when we want to tell the Google robot which of the few pages that seem to have duplicate content, which page to consider as the main page.
With the help of the canonical tag, we understand to Google bots that different URLs that do not have unique content and are part of the content of another page should not be shown in search results.
How to use rel = ”canonical”
1 – https://www.example.com/quality-wrenches.html
2 – https://example.com/quality-wrenches.html
3 – https://example.com/quality-wrenches.htm?sort=price
4 – https://example.com/quality-wrenches.htm/print
Example: Note the above addresses. Suppose in an online store, the first address points to the main product page. The second address is without www. The third address sorts the products by price and the fourth address is the printable version of the home page. The products of this online store should be indexed only with the address of the first page in Google, so for all pages (even the main page) we define the Canonical meta tag as follows.
<link rel = “canonical” href = “https://www.example.com/quality-wrenches.html” />
Note that this tag is located in the head section of the html code every 4 pages.
By doing this, we tell the Google bots that if they see the above 4 addresses, they should only consider address 1 and show it in the results, and the next 3 addresses, whatever they have, belong to address 1.
Canonical tag in Yoast WordPress plugin
If your site is written with a WordPress content management system and you use the Yoast plugin to improve the SEO status of your site, you can simply define the canonical URL for each page from the section shown in the figure below.
Here are some examples of how to use the Canonical tag on different sites
Before reviewing canonical meta tags in a few examples of Iranian sites, keep in mind that the use of canonical meta tags depends on the strategies of each organization and the version that a site has used to use the Canonical tag; It may not be consistent with your site strategies.
The best way is to carefully consider the various scenarios below, and then use the Canonical meta tag according to the program you have to index your site pages in Google.
Example 1 – How to use the Canonical tag in the Digikala store
Let’s look at how to categorize pages in this store. In the main menu of Digi Kala, we see a series of different product categories. Suppose we fall into the category of copper goods. Note the page address in the figure below.
In this page, DJ Kala has gathered all its copper products together. Look at the top of the photos, which have several different filters to change the way these items are displayed. Click on one of these filters. Now look carefully at the page address. As mentioned above, one of the applications of using the canonical tag is when new filters are generated by changing filters such as color, price, and… new addresses.
Let us now answer these questions:
- On which page are all the copper products of Digi Kala site?
- By clicking on the latest filter, we will see products that were on the main page? Or are there new products to display?
Now let’s look at the source code of the page above. We searched for rel = ”canonical” in the code page. You can see the result in the image.
The canonical tag of this page is the main page of Messi products. When you use the Canonical meta tag in this way, you are informing Google bots that this filtered page has content that includes the content of the products homepage, and instead of the page being indexed with the filtered URL in Google, the page with the original products should be indexed. Is a more complete page; Be indexed.
Let’s take a look at the source code of the home page of Messi products, DJ Kala has defined this page as a precaution. The Canonical meta tag has also defined this page as a page to help Google better understand the home page that should be indexed as the page of Messi products; Have helped.
Example 2 – How to use the Canonical tag on the SEO teaching site
In this example, we want to show you what we mean by different page indexing strategies in Google and its effect on how the canonical tag is used.
One of the most popular sections of our site is the Articles> SEO Training> The Complete SEO Archive. In this section, we have gathered all the articles we have about SEO. (https://seo-teaching.com/blog/category/seo/)
At first glance, it may seem that we intend to either index every page of this category in Google, or just the first page of these categories. But our site strategy in indexing the complete SEO archive is different from what you may have in mind, which is why we have used canonical tags differently in these categories.
Take a closer look at the image below, which is the source code of the first pages of our entire SEO archive category.
Find the phrase rel = ”canonical” and see what pages are defined as canonical tags for these pages.
Note which page is supposed to have more complete and up-to-date content? In the example I gave you from SEO teaching, there is a page at this address where the title of the SEO course is fully listed and a full explanation of the nature of SEO is given. Our site strategy in using the Canonical tag is to transfer all incoming traffic and rank for SEO training to that page, so for the categorization pages we defined the canonical tag in such a way that we understand the Google bots to categorize the pages. Which page are copies and which page should be indexed in Google.
In short, SEO archive is more about user experience and in terms of SEO, its content is repetitive. In other words, by doing so, we avoided canonicalization. This was a practical example of canonical usage.
Example 3 – How to use the Canonical tag in an online magazine
We are going to review a journal that publishes different content in different paginations to see how different the definition of Canonical can be on different sites.
Look at the figure above. In this magazine, you will see the heading of a category called Travel Guide, which by clicking on it, you will enter a page where all the articles related to this category will be displayed in several pages. The strategy of this magazine to be indexed and get a rank (Rank) on the travel guide word has been in such a way that only the first page in Google is indexed and the existence of other pages with pagination parameters is made known to Google. See the image below, which is the source code of the second page of this category, the address of the first page of the category is defined as a canonical tag for all pages.
Common Mistakes in Using the Canonical Tag
- One of the errors that can occur is that the homepage URL is defined as canonical to all pages of the site. Doing so means telling search engine bots that all pages on my site are a copy of the site’s home page. In this case, all your pages will be indexed by Google and only the main page will be indexed.
Define more than one canonical tag for a page: Only the first canonical tag is accepted by search engine bots.
- (Update 28-4-98) Of course, this issue is debatable because in 2013, Google mentioned in this article that if it is seen in the canonical roll on a page of our site, it will ignore both. However, whether it ignores or considers the former, we suggest that you always use this important SEO meta tag once (end of update 28-4-98).
- Canonical link not defined correctly: Suppose your page URL is available with http, https with www and without www, and you have defined the URL with https and www in the .htaccess and .webconfig files from the host as the primary URL. When you want to define a canonical tag for a page, you should pay attention to the type of URL of that page and be sure to use the URL created with https and www.
- Define canonical displacement: In a store site, product pages need to be indexed separately. Index product category pages instead of the full product page, and instead of defining product pages as canonical category pages, index category pages and do not index product pages; You have made one of the most common mistakes in using a canonical tag.
- Improper use of canonical roll in pagination of pages or articles: Note that your strategy for indexing pages that are multi-page on your site; Determines how you use canonical tags on them. If you want all incoming traffic to belong to the first page of a category and the links on the next pages can be followed and indexed, you can define the first page of each category as the canonical of the next pages. But if the scenario of your site in the pagination is as follows, never use the canonical tag.
You may have defined a story in one of your categories that is ongoing. In this case, if the URL of the first page of your tutorial or story is considered as a canonical of the next pages, the next sections of your tutorial or story will not be indexed in Google. In this case, the best way is to use rel tags that take the values of next and prev; is.<link rel = “next” href = “https://seo-teaching.com/blog/category/seo/page/2/” />
Canonical tag in HTTP Headers
(Update 28-4-98 starts) It may be interesting to you that some pages can not use the canonical meta tag, because these pages do not have a head at all, as we said this important meta tag should be inserted in the site head. Well, you may be wondering what kind of pages are like this?
If we’ve talked about pages so far, we mean HTML documents or HTML pages, but some pages are like a blank file. Like a PDF file or a Word file or a photo file. These types of pages are empty of the Head section and canonical insertion in the form of a metatag is not possible. What is the solution? Use HTTP header codes in the browser.
You may ask why we should use HTTP headers to canonize these files?
- Because these files can not be easily SEO.
- Because these files can not be easily analyzed.
- Because it may affect your site ranking in Google results, it may have a negative effect, especially if your PDF content is a copy of an indexed page.
How to create a canonical header?
First you need to access the .htaccess file and then you need to know what file you are going to canonicalize to which address. Suppose we have a PDF file called Canonical.pdf and the content of this file is a copy of this page and we intend to make this file canonical to this page. Its code is as follows.
Header add Link “<https://seo-teaching.com/blog/canonical-tag/>; rel=\”canonical\””
In the end, you should know what canonical means and what it means, you should know how canonical is used in WordPress. In this article, we taught you how to use the canonical tag in WordPress.
Using the Canonical meta tag correctly can have a huge impact on your site’s internal SEO and thus help to increase the ranking of your site pages in a targeted way in Google search results. Because by directing inbound traffic to the main pages that have richer content, you will get the desired page rank.
What experience do you have using the Canonical tag on your site? Has improper use of the canonical roll changed the ranking of a page on your site?