Upon hearing the term ‘duplicate content’, one automatically thinks about spammysites and an impending Google penalty.
However, duplicate content is nothing to worry about as long as you are managing it correctly. All search engines understand that duplicate content is not always avoidable, and in some cases, even necessary.
So, to avoid issues arising from duplicate content, Magento 2 store owners need to add Magento 2 Canonical tags. In this article, we will discuss how Magento 2 canonical tags prevent duplicate content. Before doing so, let’s first understand duplicate content and why it is an issue for websites.
In the simplest terms, it refers to the content which appears on multiple web pages. The content is either highly similar or entirely copied. The image below provides a comprehensive understanding of duplicate content.
The next question on your mind is, why would a website owner have duplicate content on their website? Store owners don’t have duplicate content due to choice. Instead, it can happen due to the following reasons:
One of the top reasons behind duplicate content is when website owners forget to remove/disable unused theme pages. Once the website goes live, these unused, duplicate pages appear in the search results.
You might notice that the same product is accessible despite selecting different categories. For example, if you are looking to buy an iPhone, it will be accessible through the brand as well as the smartphone/mobile category. So:
www.onlinestore.com/brand/apple/iPhone
www.onlinstore.com/smartphones/iPhone
While the URLs differ, the content would be the same because they both point towards the iPhone webpage.
Similarly, when browsing an online store, users are likely to apply filters to find the desired product quickly. Again, different filters may point to the same product. Thus, while each filter is a different URL, the product is the same. In other words, there will be duplicate content.
Most websites have a search button to allow users to find relevant information or products quickly. Suppose a user searches for blue men’s jeans on a website. Apart from the category and filter URLs, the internal search results will also point to the same product, resulting in duplicate content.
If your store has 1000 unique products, would you display them in one go? Of course, the logical approach is to divide the products into pages. For instance, 10 products per page or maybe 50 or 100. While each page displays different products, the titles, meta information, and other descriptions remain similar. This leads to content duplication.
Did you notice that most websites are accessible with HTTPS and HTTP? To the user, there is no discernible difference. However, from a search engine’s perspective, HTPPS and HTTP are two distinct URLs with the same content.
www vs. non-www
Like HTTPS/HTTP variants, websites are accessible with www and non-www. While the URLs are unique, the content remains unchanged.
It is important to address why duplicate content is an issue before we discuss adding Magento 2 Canonical Tags.
The biggest risk of having duplicate content on your website is receiving a penalty. Most search engines, including Google, consider duplicate content as spam. Thus, they might either deindex your website altogether or at least throw it down in the search rankings. In either case, your website traffic will go down significantly.
Moreover, when there are multiple web pages with duplicate content, search engines have no way of knowing which page to rank or prioritise. What happens is that the ranking power is then divided among the multiple web pages. Again, this contributes to poor rankings in SERPs.
The crawl budget is simply the number of pages that a web crawler can crawl and index in a specified period. When there are too many pages with the same content, the crawl budget is wasted. It prevents the crawler from indexing new pages or those with updated content. In other words, users will be accessing outdated content.
Lastly, it is important to mention that duplicate content leads to poor user experience. Despite accessing unique URLs, if users are viewing the same content, they may perceive your website as spammy or low quality. Thus, by strategically deciding which pages to index or prioritise, websites can avoid this issue.
Now, let us understand how Magento 2 canonical tags or URLs help address duplicate content. The canonical tag is simply an HTML tag that tells the search engine which version of a webpage to prioritise for indexing purposes. This ensures that search engines ignore the duplicates and focus only on the one with the canonical tag. This is shown below.
Magento 2 has an in-built feature for adding canonical tags. To do so, go to your Magento 2 Admin Panel à Stores à Configuration à Catalog à Search Engine Optimisation.
You will see two options:
Turn both these options to ‘Yes’.
Once you turn on these options, Magento 2 automatically assigns a canonical tag to the main URL. There’s no doubt that Magento 2’s inbuilt canonical tag feature is helpful but falls short of offering much-needed advanced features such as dealing with CMS pages, pagination or layered navigation pages, and more.
Therefore, merchants have no option but to use a Magento 2 Canonical Tag extension. The extension allows merchants to add canonical URLs without any coding.
This concludes our article on preventing duplicate content in Magento 2 with canonical URLs. Remember, duplicate content is not the issue as it is not always avoidable, especially in the context of online stores. The real issue is failing to manage the webpages with duplicate content as per search engine guidelines.
Google recommends adding canonical tags to help crawlers know which page to prioritise for indexing purposes. It prevents issues like penalties, lower rankings, and poor user experience. While Magento does have an in-built feature for adding canonical tags, it is very basic. Thus, we recommend using a canonical tags extension.