{"id":15858,"date":"2019-10-24T09:00:43","date_gmt":"2019-10-24T06:00:43","guid":{"rendered":"https:\/\/www.reliablesoft.net\/?p=15858"},"modified":"2021-06-27T21:04:00","modified_gmt":"2021-06-27T18:04:00","slug":"what-is-a-canonical-url","status":"publish","type":"post","link":"https:\/\/www.reliablesoft.net\/what-is-a-canonical-url\/","title":{"rendered":"What is the meaning of a Canonical URL? Easy Guide with Examples"},"content":{"rendered":"
When you get deeper into technical SEO, you\u2019ll come across canonical URLs (rel=”canonical”) and if you don\u2019t know what a canonical URL is and what it does, it can get confusing.<\/p>\n
The purpose of this post is to remove the confusion and help you understand in simple terms what is the meaning of a canonical URL and how to use Canonical URLs correctly.<\/p>\n
This guide covers the following topics:<\/p>\n
A canonical URL is added in the HEAD section of a page and tells search engines which is the preferred URL for the particular page. A canonical URL can point to itself (self-referencing) or to a different URL.<\/p>\n
Canonical Tags are most commonly used to:<\/p>\n
A canonical URL is only visible to search engine crawlers and not users. It is added to the <HEAD><\/HEAD> section of a page and has the following format:<\/p>\n
To find the canonical URL of page use one of the methods below:<\/p>\n Open a webpage in Chrome and select VIEW > DEVELOPER > VIEW SOURCE from the top menu, to view the HTML source of a page.<\/p>\n Search for the word \u2018Canonical\u2019. If the canonical tag is defined, it should look like this:<\/p>\n If you cannot find the word canonical in your HTML, then this means that there is no canonical URL defined for the particular page.<\/p>\n The URL inspection tool is part of Google Search Console<\/a><\/strong> and among other things, it shows you what Google considers to be the canonical URL of a page.<\/p>\n If the value is \u2018inspected URL\u2019 this means that the canonical URL is the same as the page URL. If Google selects a different canonical URL, it will show the value in that area.<\/p>\n A website is more likely to have duplicate content issues, even if you don\u2019t intentionally duplicate your content across different URLs.<\/p>\n Typical cases of duplicate content include:<\/p>\n A URL is accessible with or without www in the URL<\/strong> \u2013 For example:<\/p>\n A URL is accessible with both Http and Https protocols<\/strong> \u2013 For example:<\/p>\n https:\/\/reliablesoft.net\/post-title and http:\/\/reliablesoft.net\/post-title<\/p>\n Pages that have print friendly versions<\/strong> \u2013 For example:<\/p>\n Pages with identical content but different URLs<\/strong> \u2013 For example:<\/p>\n Product category pages that have the same content and using filters<\/strong> \u2013 For example:<\/p>\n Both product pages show the same shoes but in different colors. For Google, this is considered as a duplicate content.<\/p>\n In all the above cases, setting the canonical URL allows you to tell search engines which URL to include in their search results.<\/p>\n Do I need to use a canonical URL on pages that have original content? – <\/strong>Yes, and the main reason is that it\u2019s a way to protect your content. In cases where someone replicates your website, the canonical URL will tell search engines what the original source is.<\/p>\n Content Syndication and canonical URLs – <\/strong>When you re-publish or syndicate your content on other platforms i.e. medium or LinkedIn Posts, you can use the canonical URL to tell Google that this is an exact copy of an existing URL and in this way, you ensure that Google knows the original source of an article.<\/p>\n A website that is accessible through different URLs (with www or without www<\/a><\/strong>, with Http and Https) is considered by Google as different websites.<\/p>\n Google can get confused as to which version to index and to help them in this task, you need to specify your preferred domain.<\/p>\n Previously this was possible through the Google Search Console but now the only way to tell Google what your preferred domain is through canonical tags.<\/p>\n You can do this by:<\/p>\n For example, if you specify the canonical URL on the homepage to be:<\/p>\n Consistency in the canonical tags helps Google identify which is your preferred domain.<\/p>\n To help you understand how to set your canonical tags, here is an example of how they work.<\/p>\n Let\u2019s assume that the content of this page In this case, you need to set your canonical URLs as follows:<\/p>\n On this page On this page, This way you tell Google which page to add in their index and show in the search results.<\/p>\n Here is another example of how canonical tags can help you solve the problem of duplicate content for your eCommerce category pages<\/a><\/strong>.<\/p>\n Let\u2019s assume that you have a category page that displays shoes in different colors.<\/p>\n Users can narrow the results by selecting the color from a dropdown filter.<\/p>\n This is the main page Both pages have exactly the same content, the only difference is the product images that show shoes in white color only. This is a typical scenario of duplicate content pages on eCommerce websites.<\/p>\n In this case, you need to set your canonical URLs as follows:<\/p>\n On this page On this page, When you set 301 redirection users don\u2019t see the source page but they only see the target. In the case of canonical tags, users can still see both pages but search engines are told not to consider one of the two.<\/p>\n In both cases, backlinks are consolidated to the target page.<\/p>\n As a general rule, use a canonical URL when you want to keep the page on your site, for navigation or user purposes and use a 301 when you don\u2019t want users to see the particular page.<\/p>\n When it comes to SEO, accurately setting your canonical URLs has the following advantages:<\/p>\n The easiest way to specify the canonical tag in WordPress is to use Yoast SEO plugin<\/a><\/strong>.<\/p>\n When you activate Yoast SEO it will automatically add a self-referencing canonical URL for all pages.<\/p>\n To change the canonical URL of a page or post, edit the particular page and click ADVANCED and set the canonical URL.<\/p>\n For non-WordPress websites you need to add in the HEAD section of all your pages a Replace CANONICAL-URL with the actual URL you want a page to point to. This can be the same URL as the page or a valid URL of a page within your website or to a different domain (cross-domain canonical).<\/p>\n If you want to learn more about canonical URLs, you can read the following resources:<\/p>\n<link rel=\"canonical\" href=\"CANONICAL-URL\"\/><\/code><\/p>\n
View the HTML Source of a page<\/h3>\n
<link rel=\"canonical\" href=\"https:\/\/www.reliablesoft.net\/what-is-a-canonical-url\"\/><\/code><\/p>\n
Using the URL Inspection Tool<\/h3>\n
\n
When and How to use Canonical URLs?<\/h2>\n
Duplicate Content<\/h3>\n
http:\/\/reliablesoft.net\/post-title<\/code> and
http:\/\/www.reliablesoft.net\/post-title<\/code><\/p>\n
https:\/\/www.reliablesoft.net\/post-title\/<\/code> and
https:\/\/www.reliablesoft.net\/post-title\/?print=true<\/code><\/p>\n
https:\/\/www.reliablesoft.net\/courses\/SEO-Course<\/code> and
https:\/\/www.reliablesoft.net\/seo-course<\/code><\/p>\n
Duplicate Content on eCommerce Websites<\/h3>\n
https:\/\/www.reliablesoft.net\/products\/shoes\/?color=white<\/code> and
https:\/\/ww.reliablesoft.net\/products\/shoes<\/code><\/p>\n
Self-Referencing Canonical Tag<\/h3>\n
Content Syndication<\/h3>\n
Specifying your preferred domain to Google<\/h3>\n
\n
<link rel=\"canonical\" href=\"https:\/\/www.reliablesoft.net\/\"\/> <\/code>then all other canonicals should have the https and www in the URLs.<\/p>\n
Canonical URL Examples<\/h2>\n
https:\/\/www.reliablesoft.net\/courses\/SEO-Course<\/code> is the same as this
https:\/\/www.reliablesoft.net\/seo-course<\/code> and you want Google to index the second one.<\/p>\n
https:\/\/www.reliablesoft.net\/courses\/SEO-Course<\/code> the canonical URL should point to the other page, i.e.<\/p>\n
<link rel=\"canonical\" href=\"https:\/\/www.reliablesoft.net\/seo-course\"\/><\/code><\/p>\n
https:\/\/www.reliablesoft.net\/seo-course<\/code> the canonical URL will be self-referencing i.e. it will point to the page itself.<\/p>\n
<link rel=\"canonical\" href=\"https:\/\/www.reliablesoft.net\/seo-course\"\/><\/code><\/p>\n
Duplicate Content in Product Category Pages<\/h3>\n
https:\/\/www.reliablesoft.net\/products\/shoes\/<\/code> and this is one of the pages that are generated when users select the color from a filter
https:\/\/www.reliablesoft.net\/products\/shoes\/?color=white<\/code><\/p>\n
https:\/\/www.reliablesoft.net\/products\/shoes\/?color=white<\/code> the canonical URL should point to the main category page, i.e<\/p>\n
<link rel=\"canonical\" href=\"https:\/\/www.reliablesoft.net\/products\/shoes\/\"\/><\/code><\/p>\n
https:\/\/www.reliablesoft.net\/products\/shoes\/<\/code> the canonical URL will be self-referencing i.e. it will point to the page itself.<\/p>\n
<link rel=\"canonical\" href=\" https:\/\/www.reliablesoft.net\/products\/shoes\/\"\/><\/code><\/p>\n
Canonical Tags Best Practices<\/h2>\n
\n
What is the main difference between canonical tags and 301 Redirections?<\/h2>\n
Advantages of using Canonical Tags for SEO<\/h2>\n
\n
How to set canonical URLs in WordPress?<\/h2>\n
How to set canonical URLs in any CMS?<\/h2>\n
rel=\"canonical\"<\/code> link attribute that has the following format:<\/p>\n
<link rel=\u201dcanonical\u201d href=\u201dCANONICAL-URL\u201d\/><\/code><\/p>\n
Resources to learn more about canonical URLs<\/h2>\n
\n