{"id":718,"date":"2022-03-18T14:13:59","date_gmt":"2022-03-18T14:13:59","guid":{"rendered":"https:\/\/easyschema.com\/blog\/?p=718"},"modified":"2022-03-18T14:15:09","modified_gmt":"2022-03-18T14:15:09","slug":"what-is-a-canonical-tag-and-how-to-use-it","status":"publish","type":"post","link":"https:\/\/easyschema.com\/blog\/what-is-a-canonical-tag-and-how-to-use-it\/","title":{"rendered":"What is a canonical tag? (and how to use it)"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">A canonical tag, often called rel=canonical, is part of HTML code that helps SEO identify the main version from similar or other identical pages. In SEO, canonical tags serve as means of identification for Google. Google knows exactly which version of the page you want to display in SERPs through them. In addition, this markup is used to point out the original content source from the duplicate content pages and improve the crawling, indexing, and your website&#8217;s performance in general.\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here is an example of how a canonical tag looks like:<\/span><\/p>\n<pre><code class=\"language-\">&lt;link rel=&quot;canonical&quot; href=&quot;https:\/\/easyschema.com\/robots-txt\/&quot; \/&gt;<\/code><\/pre>\n<h1><span style=\"font-weight: 400;\">The importance of canonical tags in SEO:<\/span><\/h1>\n<p><span style=\"font-weight: 400;\">As we mentioned above, the main goal of canonical tags is to let search engines quickly notice the original page and the duplicated one. Duplicates are pages from the main webpage with different URLs that display the same content. Then, Google has to pick the right page for indexing and ranking purposes. It won&#8217;t use all the pages as search results because they all look similar.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">An excellent example of that is the product pages commonly displayed by more than 1 (primary) URL. They are shown with several URL parameters that can be used for sorting, sizes, currency, etc., for example:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.randomshop.com\/clothes\/shirts.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/www.randomshop.com\/clothes\/shirts.html<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.randomshop.com\/clothes\/shirts.html?Size=XL\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/www.randomshop.com\/clothes\/shirts.html?Size=XL<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><a href=\"https:\/\/www.randomshop.com\/clothes\/shirts.html?Size=XL&amp;color=red\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">https:\/\/www.randomshop.com\/clothes\/shirts.html?Size=XL&amp;color=red<\/span><\/a><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">As you can see in the example, a product page is displayed in the main category (clothes) and with various URL parameters such as size and color. Again, canonical tags play an excellent role in this, indicating to Google that the main URL category\/clothes are the one that needs to be indexed and used as a search result.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Underline that Google does not perceive the canonical tag as a directive but as a signal (which sometimes may be ignored).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here are some essential SEO benefits that come with canonical tags:<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">They help to consolidate link equity (PageRank)<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">As you now know, canonical tags can help consolidate PageRank from all duplicate pages displayed on the main page. Duplicate pages usually contain backlinks from external resources such as backlinks from random sites, users on social media, and so on.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Setting up canonical tags on these duplicate pages, PageRank turns into a single URL, which will help you improve the overall ranking in Google Search.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">They can help manage syndicated content.<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Canonical tags let Google know the website that contains the original version of content and the one that just republished it. Many site owners often use other sites to publish their content for promotional or informative purposes when Google must make the right decision on the website with the original content and display it in Google Search.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Implementing canonical tags on duplicated websites (they promote the original content) can help you solve the problem and display the original version as a search result.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">They can improve crawling.<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You can help Google or other search engines crawl the page you want to index more efficiently. In contrast, duplicate pages shouldn&#8217;t be crawled at all. Despite being irrelevant for crawling and indexing purposes, pages containing identical content also waste a lot of Google&#8217;s time and resources.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">With canonical pages, Google can be more focused on pages that matter, and in this way, it can save that what is called &#8220;crawl budget.&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">How to add a canonical tag to your pages?<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Adding a canonical tag to your webpage is pretty simple. But, first, you must add a rel-&#8220;canonical&#8221; tag into every duplicate web page in the &lt;head&gt; section.<\/span><\/p>\n<blockquote><p><b>Note:<\/b><span style=\"font-weight: 400;\"> The link in the canonical tag you are adding must denote the main version of the webpage.<\/span><\/p><\/blockquote>\n<p><span style=\"font-weight: 400;\">\u00a0Implementing a canonical tag on a page-by-page basis may take you a lot of time and consume many resources. Not only that but adding these canonical tags on large web pages can be almost impossible.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">But here is an optimal solution for that.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">You can automatically implement a canonical tag via distinct plugins like Yoast SEO that can be used for WordPress. Implementing the canonical tags using this plugin (Yoast SEO) can be applied genuinely.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">First, choose the page you want to add the canonical tag.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Second. Go to the &#8220;Advanced&#8221; section of this page.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Third. Then implement the canonical URL that you wanted to refer to at first.<br \/>\n<\/span><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-722\" src=\"https:\/\/easyschema.com\/blog\/wp-content\/themes\/veen\/assets\/images\/transparent.gif\" data-lazy=\"true\" data-src=\"https:\/\/easyschema.com\/blog\/wp-content\/uploads\/2022\/03\/can.png\" alt=\"canonical tag\" width=\"825\" height=\"400\" data-srcset=\"https:\/\/easyschema.com\/blog\/wp-content\/uploads\/2022\/03\/can.png 825w, https:\/\/easyschema.com\/blog\/wp-content\/uploads\/2022\/03\/can-768x372.png 768w\" data-sizes=\"auto, (max-width: 825px) 100vw, 825px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">We will also show you some other methods that you can use to indicate to a search engine your canonical web pages.<br \/>\n<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Use HTTP header.<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Another good way to implement a canonical tag is by adding it in the HTTP header of the page. This method is mainly used for specific non-HTML documents (PDFs) that do not contain the &lt;head&gt; section to add a canonical tag as usual. When adding canonical tags to the HTTP header, you have to initially ask for access in the .htaccess file of your website. Once you have done that, you can continue adding the canonical tag that will appeal in this form:<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Link: &lt;https:\/\/www.yoursite.com\/random-document.pdf&gt;; rel=&#8221;canonical&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Down below, you will find a few other methods on how you can let Google know about the pages you want to be main, canonical versions.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Sitemap \u2013 There is not much to guess for Google that the URLs listed in Sitemap are the main canonical versions<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Internal linking \u2013 Your website contains internal links that can help Google decide easily whether a page is canonical or not by directing them to duplicate pages.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Redirect \u2013 Pages with duplicate content can transfer traffic and page signals into the canonical URL using 301 directs.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">HTTPS \u2013Many search engines, including Google, prefer canonical pages, as they provide a valid SSL certificate (the HTTP encryption).<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">The best canonical tag practices<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Self-referencing canonicals<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">It is always an excellent strategy to implement a canonical tag on a webpage that points to itself. Once you use self-referencing rel=canonical on the original ou webpage, Google can see clearly that it is a canonical version.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Absolute URLs usage<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Using absolute URLs in canonical tags can prevent unintentional mistakes and avoid bad interpretations of canonical URLs by Google. Know that absolute URLs have to include hhtps, \/\/, www, as well as trailing slashes when possible. Here is what an absolute URL looks like in a canonical tag,<\/span><\/p>\n<pre><code class=\"language-\">&lt;link rel=&quot;canonical&quot; href=&quot;https:\/\/www.randomwebsite.com\/randompage\/&quot; \/&gt;<\/code><\/pre>\n<p><span style=\"font-weight: 400;\">and here is what a relative URL looks like:<\/span><\/p>\n<pre><code class=\"language-\">&lt;link rel=&quot;canonical&quot; href=&quot;\/randompage\/&quot; \/&gt;<\/code><\/pre>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use lowercase URLs<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">You should know that the upper and lower cases in the URLs considerably impact Google and other search engines. Therefore, you can avoid duplication issues by using lower chances in canonical URLs.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Canonicalize cross-domain duplicates<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Canonical tags can also be used to an instance of<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0your main page from other domains (not only from your site). There are two things that you can do if you have duplicate content on several pages of a different website:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use self-referencing canonical tag on your webpage<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Apply the canonical tag on the external website (referencing your original page)<\/span><\/li>\n<\/ol>\n<h1><span style=\"font-weight: 400;\">What to avoid when using canonical tags?<\/span><\/h1>\n<h3><span style=\"font-weight: 400;\">Multiple canonicals on a single page.<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Although it happens rarely, several canonical tags may occur in the HTML of a page against your will. Anyway, you have to pay attention to this inconvenience because it can cause massive confusion for Google (and any other search engines), ignoring the canonical signal.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Avoid canonicals on non-duplicate pages.<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">When implementing canonical tags, you have to make sure that the content on the duplicate pages is very similar (or better identical) to the primary, original version of the page. Applying canonical tags on totally different pages is pointless, and it can confuse search engines or be negligible.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Canonical tags on paginated pages.<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Pagination is a procedure of dividing web content into different pages. First, you must understand that pagination pages consist of offragmentedcontent divided into other pages. For example, the comment section on a website is divided into several pages &#8220;1&#8221;, &#8220;2&#8221;, &#8220;3&#8221;.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this case, you have to use self-referencing tags on each of these individual pages and not refer only to page &#8220;1&#8221;.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Don&#8217;t block canonical tag URLs by robots.txt<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Keep in mind that you should never block canonicals vis robots.txt files. That&#8217;s because these types of files (robots.txt) prevent search engines from crawling duplicate pages. In this way, Google or other search engines can&#8217;t see canonical tags reference the original version of the page.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Plus, blocking canonicals via robots.txt files would prevent the transfer of PageRank into your main versions.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Don\u2019t use canonical in the &lt;body&gt; section<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You should know that canonical tags are only applied in the &lt;head&gt; section of the page in the HTML document. So, if you implemented a canonical tag in the &lt;body&gt; section (or any other place), the search engine would ignore it.<\/span><\/p>\n<h3><span style=\"font-weight: 400;\">Avoid canonical loops &amp; chains.<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">You have to be careful and avoid canonical loops by always using canonical tags that can refer directly to your original page version. E.g., suppose you first use canonical tags from page X to page Y and later use them from page Y to page Z. In that case, you will create a canonical chain, which will confuse Google (or other search engines) and make them waste their time and resources.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A canonical tag, often called rel=canonical, is part of HTML code that helps SEO identify the main version from similar or other identical pages. In&#8230;<\/p>\n","protected":false},"author":1,"featured_media":724,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,18,14,20],"tags":[38,36,40,39,41,37],"class_list":["post-718","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-easyschema-blog","category-beginner-seo","category-seo","category-technical-seo","tag-canonical-link","tag-canonical-link-element","tag-canonical-tag-example","tag-canonical-tag-html","tag-canonical-tag-seo","tag-canonical-url"],"_links":{"self":[{"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/posts\/718","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/comments?post=718"}],"version-history":[{"count":7,"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/posts\/718\/revisions"}],"predecessor-version":[{"id":727,"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/posts\/718\/revisions\/727"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/media\/724"}],"wp:attachment":[{"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/media?parent=718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/categories?post=718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easyschema.com\/blog\/wp-json\/wp\/v2\/tags?post=718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}