I want to remove category ids from category URLs and replace them with the current category or subcategory name.

Is this possible?

Any help will be appreciated.


1 Answer 1


I think you don't need to replace it programmatically. Please check the admin settings.

  • Admin->Stores->Configuration->Catalog->Catalog->Search Engine Optimization
  • Catalog->Categories->Select Category->Search Engine Optimization

After updating them, you have to flush the caches and run the reindex.

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.