How to find and fix canonical URL errors for ecommerce website

If you have ever worked with ecommerce website development, then you would have noticed that there are a huge number of product pages. And more times than not, duplicate URLs are created with same content. As such, canonical tag is used to tell Google spiders that a particular page is your primary version, which needs to be indexed and shown to visitors.

Let’s take a real case study example, which happened to one of our clients. Our client has an fashion ecommerce website (Opencart platform) selling in Australia.

Finding the canonicalized URLs:

We went to our go to tool seofrog and crawled the website.

What we noticed was innumerable URLs with duplicate content and structure as below:

Domain.com/category/product-1

Domain.com/product-1

Google was indexing the second URL whereas our client preferred the first. Moreover, navigational links in the main header also pointed to first URL.

The second URL was also not accessible through any of the homepage links. On investigating, we noticed that canonical tag was inserted in the first URL like this:

<link href=”https://domain.com/product-1″ rel=”canonical” />

This tells Google that ignore the page URL for indexing, and instead index the URL mentioned in the canonical tag.

The fix was simple. On both URLs, we inserted canonical tag like this:

<link href=”https:// Domain.com/category/product-1″ rel=”canonical” />

Again, this canonical tag tells Google that the URL contained within the tag is the primary version.

Once done fixing all the canonical tag issues, we submitted the sitemap at Google Search Console so that Google can crawl website again. Final results were the expected URL started showing at the Google search results page.

Have you faced canonical issues for your website? Share your experience below in the comments section.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *