Showing results for 
Search instead for 
Did you mean: 

Change and redirect URL structure

Change and redirect URL structure

Hello community! I'm working in a big store and they have the URL structure messed up.

For example

Is there a way to Change all URL structure and automatically redirects to the new URLs created? Let's say an URL migration without any extension or a free one


Re: Change and redirect URL structure



try installing the following module

composer require olegkoval/magento2-regenerate-url-rewrites



php bin/magento module:enable OlegKoval_RegenerateUrlRewrites
php bin/magento setup:upgrade



this will add a command to re-generate all URLs for Product & Categories. 


php bin/magento ok:urlrewrites:regenerate --entity-type=product


kindly Accept as a Solution if this works for you and give Kudos Smiley Happy 


Re: Change and redirect URL structure



You can achieve it through Magento Configuration.

Go through Magento Admin->Stores->Configuration->Catalog->catalog->Search Engine Optimisation
There you can select yes for Create Permanent Redirect for URLs if URL Key Changed.

Let me know if you have any issues.


Thank you.