Canonical tag - this way you will avoid duplicating content
Your site has several pages with different URLs but the same content? Do you run a store and your product page has multiple URLs because it's searched from different categories? Google bots may treat this as duplicate content and consider it an attempted scam. How to effectively prevent it? There are several effective solutions, including the canonical tag - the canonical URL.
What is the canonical tag?
Suppose you are dealing with the situations we have outlined above. The urls of the same page are different and when scanned, the Google crawler will index them all. Then, only one of these addresses is selected for the search results - they all lead to the same content. However, it is worthwhile for you to decide for yourself which address will be displayed in the search results. This is why the canonical tag was created.
Canonical is the canonical URL in Polish. In the case of different addresses of pages with the same or similar content, canonical should be used - this will be the form of the address that the robot will index and direct to the search engine. Therefore, it is best to consider the base address as the canonical address, which does not depend on variables, e.g. session IDs or tracking numbers.
How to apply the canonical tag?
Setting up a canonical tag for a page is very simple. In a section of a given page you put the line:
Then, the set URL will be treated as canonical by robots and it will be included in the search engine's index in this form.
When to use the canonical tag?
Generally speaking, when there is a risk of duplicate content. Duplicating content may, in some cases, be considered Google as an attempt to scam your site or page ranking. This may negatively affect the position of the page in search results or completely remove it from the Google index.
Most often, the canonical tag should be used for online stores. There, the URLs of specific pages can be different depending on the customer search paths, especially when one product is included in several categories. The canonical tag is also useful when information about a specific session, such as session ID, appears in the URL. You should also consider using a canonical URL when certain content is placed in several sections of the page.
What to remember when using the canonical tag?
If you want to apply the rel = canonical tag to your pages, you need to remember a few of the most important rules for using canonical URLs.
-
The page that the canonical link refers to cannot be poorer in content than the pages on which the canonical tag will be placed.
-
Include the exact URL of the canonical page in the link.
-
Make sure the page opens at the address provided.
-
Check that the canonical page is not blocked from search engine robots.
-
Only apply one canonical tag per page.
The use of rel = canonical has the power to transfer Page Rank to the canonical address, but it is difficult to confirm to what extent. However, specialists are skeptical about the use of the canonical tag, especially as there are alternatives. An example is often cited of accidentally placing a canonical address to the main page of a website in a subpage's source. In this case, the subpage will be indexed, and thus - it will be necessary to rebuild its position in the search results. So when using canonical URLs - great care is recommended.
Canonical Tag - Alternatives
As already mentioned, it is possible to use another option for robots to index a specific page. Specifically, there are two such possibilities - the first is a 301 redirect and the second is the noindex tag.
A 301 redirect is used when multiple URLs link to a single web page. Then, you can use a redirect, thanks to which a specific page - in addition to the search engine robot itself, also goes to Page Rank. However, it is not without losses - it is estimated that during the redirection of robots using both the canonical tag and the 301 redirect, up to 10% of the PR value is lost.
The noindex tag tells crawlers that certain pages are not to be indexed. You can use them to mark the non-canonical versions of a specific website.