In a nutshell, a canonical tag can be viewed as a reference to an original source of content. It looks like this: canonical Rel%3D and is usually placed in the HTML header of a web page. This part contains the URL of the page that should be considered the authorized page (the page with the original content). A canonical URL is the URL of the main version of a page when you have duplicate versions of that page on your website.
Canonical tags help to consolidate the link value (PageRank) of all duplicated pages on a canonical main page. The canonical tag is a way of marking the original source of an answer, so that it can be easily found in search results. It's not used for anything else (except perhaps as a link to the question). How the URL is chosen as canonical would affect how Google sees it as the priority URL in that group of URLs.
This is why the canonical tag exists, to help you alleviate problems of duplicate content as a result of careless content management. Therefore, Google will not see the canonical tag, but the ranking of the page will be transferred to the canonical version. A canonical tag (Rel%3D “canonical”) is a fragment of HTML code that defines the main version of duplicate, almost duplicated and similar pages. In other words, if you have the same or similar content available at different URLs, you can use canonical tags to specify which version is the main one and should therefore be indexed.
A canonical link or a canonical URL is the version of the content that you want your audience and Google to see instead of other duplicate pages. Use canonical URLs to consolidate backlinks from multiple pages into a single URL that you specify. You should start by implementing a 301 redirect from HTTP to HTTPS and then move on to replacing the internal links from the HTTP version directly to the HTPPS version. Canonical tags help you control how your content appears in search engines and whether or not this content creates confusion, both in terms of indexing and crawling.
They allow you to tell Google which version of a page to index and rank, and where to consolidate any “link values”. This creates a “canonical string” in which page A is canonicalized on page B and then canonicalized on page C. Return to the Search Engine Optimizations section of the catalog page and look for the option “Use canonical link meta tag for categories”. Therefore, these pages partially occupy the value of the links in the main version of the page, the one that you really want to position as a search result.
Either way, being careless with your internal links can also lead to these types of problems, as long as you don't redirect them accordingly. In addition, duplicate pages cause cannibalization problems, in which “link capital” is divided between several pages with the same content. And there are a lot of moving parts that need to come together to create a proper implementation of Rel%3DCanonical. John Mueller, from Google, says that it is recommended not to use relative routes with the canonical link element rel%3D.
Replace non-canonical links in the canonical tags of affected pages with direct links to their respective canonicals. For example, if A is canonicalized in B and B is canonicalized in C, you should replace A's canonical link with C's canonical link. This alone can help your site rank since these link signals that would otherwise be distributed over several URLs are consolidated into one stronger page.