3
  1. By default in Magento, while assigning categories to the product. The Magento itself creates a URL rewrites based on each category which all going to be redirected to same product page. enter image description here
  2. Different URLs for same page is a SEO issue as per many articles.[multiple-urls-for-the-same-page, Why do I have 2 different URL's for the same page - is this good practice?]
  3. Now how to overcome this is in Magento 2.x? Do we need to change the category path product URLs as 301 to actual product URL? I wish to do this without going to 3rd party modules. enter image description here
5
  • 1
    You are overthinking this. Yes internally there is 2 links, but externally there is only one. Check the sitemap.xml - thats the URL that will be used everywhere. The internal URL that points through the catalog / category page will not be seen (depending on if you allowed category to be part of URL or not - there should be a setting somewhere). Commented Sep 16, 2021 at 7:09
  • Also check the Google Search console, you will see that the other URL does not exist in the index. Commented Sep 16, 2021 at 7:10
  • Thank you for the guidance to check at right place. I could see category path URL in sitemap even after the Admin -> Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> "Use Categories Path for Product URLs" set to "No" by default. Please check the attached screenshots and It seems to be an issue on the site. Let me check and conclude the root cause of the issue. Commented Sep 17, 2021 at 5:07
  • 1
    Is this a multisite? (multiple sites in one). If multi-site check if that setting is enabled for the specific site. Commented Sep 17, 2021 at 16:08
  • No, It is not multi-site. Commented Sep 23, 2021 at 15:07

2 Answers 2

2

Multiple URLs explanation:

  1. Thanks to Kalvin Klien, as he mentioned in the comment. The Sitemap URLs are crawled by Google.
  2. By default the category path is not added in the product URL as the configuration "Admin -> Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> Use Categories Path for Product URLs" set to "No" by default.
  3. Canonical URL is set to "No" for category and product by default. To enable "Admin -> Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -> Use Canonical Link Meta Tag For Categories (&) Use Canonical Link Meta Tag For Products" then only it will show as canonical in the page. enter image description here

Reference: CANONICAL URLS AND DUPLICATE CONTENT IN MAGENTO [Amasty]

Issue faced in our site:

  1. We use Amaty's module "amasty/module-unique-product-url" i.e Amasty_SeoSingleUrl.

  2. Regarding the category path in the product URL, the configurations are disabled from both Magento default and Amasty configuration. enter image description hereenter image description here

  3. Still, in the sitemap, the product URL exists with a category path. The issue was an Amasty configuration bug. As at 1st point screenshot, it is set to No but Amaty checks one of the params which should work only in enabled configuration (enabling 1st field shows the rest of the fields). So enabled the 1st field, changed the configurtion of 2nd field as shown in screenshot and saved. Then again disabled the 1st field configurtaion and it solved the issue. enter image description hereenter image description here

0

Each product page URL that includes a category path specifies the category-less URL as canonical in the HTML <head>.

As long as this is working as designed, I don't think any additional work is required to avoid duplicate content penalties.

https://moz.com/learn/seo/canonicalization https://support.google.com/webmasters/answer/10347851?hl=en

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.