0

By looking at my magento product page I get this format:

https://mywebsite.com/catalog/product/view/id/18680/s/THIS-IS-THE-NAME-OF-MY-PRODUCT/category/17/

However, I don't think this is good for SEO. I want something like:

https://mywebsite.com/MY-CATEGORY-NAME/THIS-IS-THE-NAME-OF-MY-PRODUCT/

I also want this to be unique (even if a product is assigned to multiple category) to avoid duplicate content.

Did anyone achieve that yet?

2 Answers 2

0

You may follow the below steps and update the configuration from the back end to follow SEO best practices as per your requirements.

Step 1: In the Admin login go to path Stores > Configuration > Web.

Step 2: After that, expand the Search Engine Optimization section.

Step 3: Set Use Web Server Rewrites to ‘Yes’.

Set up automatic redirects:

To set up automatic redirects we need to follow the steps given below:

Step 1: In the Admin login go to path Stores > Configuration > Catalog > Catalog.

Step 2: Expand the Search Engine Optimization section. Set Create Permanent Redirect for URLs if URL Key Changed to “Yes.” and save the config value.

Step 3: Use Categories Path for Product URLs: Yes [to make product URL unique even if a product is assigned to multiple categories)]

1
0

As you have performed @Pritam Solution & it didn't work. Try the below

Enable Magento 2 Product URL Rewrite

  • Navigate to CATALOG -> Products
  • Select the products that you want to change the URL of
  • Expand the Search Engine Optimization menu Update the URL Key to the new one. Remember, only lowercase letters & characters are allowed
  • Save the changes and Clear the Cache

Enable Magento 2 Category URL Rewrite

  • Navigate to CATALOG -> Category
  • Select the product that you want to change the URL
  • Expand the Search Engine Optimization menu
  • Update the URL Key to the new one. Remember, only lowercase letters & characters are allowed
  • Save the changes and Clear the Cache

Check Magento 2 URL Rewrite Record

On the Admin Panel, navigate to MARKETING -> URL Rewrites under SEO & Search Section. It shows all the regenerated URL Rewrites with the most recent on the top.

Remember to Re-Index from CLI using php bin/magento indexer:reset && php bin/magento indexer:reindex & Perform Cache Flush Once the above are done

For More Detailed Information - https://experienceleague.adobe.com/docs/commerce-admin/catalog/catalog/catalog-urls.html

1
  • Thanks for the advice. However, I have 17000 products and going one by one won't be possible.
    – Henri
    May 23 at 1:39

Your Answer

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

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