I recently noticed an issue with the URL structure of my products on my WooCommerce site. Specifically, each product has two versions of URLs, illustrated as follows:
- https://www.example.com/main-category/product-name/
- https://www.example.com/main-category/sub-category/product-name/
What alerted me was the Google Search Console, indicating thousands of pages with the "Duplicate without user-selected canonical" issue. Upon checking these URLs, I noticed that the canonical tag always points to the URL combining the main category and sub-category.
I am concerned about the SEO implications of this situation and want to ensure my site is correctly indexed by search engines.
Knowing that I use WooCommerce + Yoast SEO, could you guide me towards a solution to address this URL discrepancy while retaining only the category + subcategory permalink ?
Thank you in advance for your assistance.
Best regards, Mighty