We have a multistore setup with 3 stores/domains, which should support different languages in the near future and I want to have the locale/language information in store URLs.


  • website1.com/en/
  • website1.com/fr/
  • website2.com/en/
  • ...

From the (current) technical background I understand that using same code does not work.

Store with the same code already exists.

But it is even not allowed to use uppercase codes to work around ...

The store code may contain only letters (a-z), numbers (0-9) or underscore(_), the first character must be a letter

I could use some "fake" codes, but this is also to limited ...

  • website1.com/en/
  • website2.com/english/
  • website3.com/en_en/

Is there any way to reuse same store? What files have to be adjusted to make this work?

1 Answer 1


Indeed you cannot use the same code for 2 store views.
And I don't recommend removing the restriction since magento counts on the store view code to be unique.

So I don't think there is a way to have the store codes in the url just by enabling them in the backend.
But you can create actual folders named en, fr and so on and make these folders act as the document root for specific store views.

Here is a detailed explanation on how you can setup multiple websites and store views, each one with its own document root: Multi-website multi-store set-up

  • Thanks. I know the subfolders method, but it looks like an ugly workaround. IMHO its truely a missing feature and maybe someone has time to list all the files that have to be adjusted ;)
    – sv3n
    May 24, 2017 at 12:39
  • 1
    please read my answer carefully. Magento expects for the store view code to be unique. It needs to know this in order to know which store view to display. I don't recommend even trying to make it not unique. In my opinion what I propose is not a workaround, it's the safe way to go.
    – Marius
    May 24, 2017 at 12:41
  • In my opinion Magento was designed as multistore platform and it should allow such things w/o adding files/folders to root directory. But when you say this is the safe way ... accepted :)
    – sv3n
    May 24, 2017 at 12:50
  • If it's worth something, I've used it like this on various occasions and it worked properly.
    – Marius
    May 24, 2017 at 12:53
  • Yes, it is worth something ;)
    – sv3n
    May 24, 2017 at 16:14

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.