I have got two websites (one in french, the other one in spanish). I have set up two websites and not view stores because selling prices are different. The main website is the french one. I have translated the whole content in spanish. No problem.

My issue is about Spanish URLs :

For my category, it's ok (www.website.com/es/proyectos.html) the URL is correctly implemented in spanish. But, If I select the subcategory the url is www.website.com/es/projet/subcategory.html Or, for me, it should be www.website.com/es/proyectos/subcategory.html I want this URL fully in spanish (better for the SEO). And I do not want to modify those URLs manually, because each time I will create a subcategory I will have this issue.

So could you help me please ? Do I have to developp something or Can I set up it in the Admin interface ? Thanks in advance.

1 Answer 1


I have setup my local environment with a french store and an english store, then using luma sample data, I have changed 2 things for my categories:

  • the category name and the url key need to be changed (see screenshot). You need to select the french store view and untick the checkbox 'use default value'.

enter image description here

to verify if it works, go to the french view and load the top category you've just changed. Verify both name and url are as expected.

enter image description here

  • then iterate for the sub category (altough I suspect you've got this right already)

then if the problem, persist, you may look at the backend screen Marketing/Url rewrite and see whether these appear with the store url key value you have saved your categry with.

  • Thank you for your answer. I have aleary done this set-up.... I guess I did something wrong when I have uploaded all the products.
    – Newton
    Jul 3, 2020 at 14:36
  • thought you would but we need to start somewhere: now, how about the screen marketing / url rewrite, if this screen is fine you may run php bin/magento index:reind Jul 3, 2020 at 14:38
  • index:reindex will not help.... Jul 3, 2020 at 14:40
  • it isn't. But when a create a new category and subcategory, the url is correct (in french and in english). So I guess, If I create new category it will be fine. I have to correct the existing URLs. Any idea how can I do that automatically ?
    – Newton
    Jul 3, 2020 at 15:11
  • somehow your system has an issue to update the url key for a top category. My guess is you should have an error somewhere in log file or webserver telling you this? so it is not so much about resolving your url but more understanding the underlying issue. Otherwise change the url key for top category could be done via a script of course. But your system would still have a bug you want out Jul 3, 2020 at 15:33

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.