Magento – How to generate URL rewrites in Magento 2

magento2url-rewrite

Is there a way to force Magento 2 to redo all of the product/category urls? The majority of the site is fine with urls such as category-name/product.html but a few categories refuse to conform to the same rules.

Before I could get rid of the table and reindex but this option no longer exists.

Best Answer

I currently use this to update the url keys of certain products:

  1. Update 'url_key' attribute through Magento Import
  2. Admin --> Products Catalog --> Select the products you imported the new url_key for --> Actions: Update Attributes --> Websites: Add to website You can just tick the website it is already assigned to. This way the product gets 'updated' and it writes the new imported url_key to the url_writes table
Related Topic