Before asking this question, I did Google search but could not find a clear answer.

I have:

  • 01 Website + 01 Store
  • 03 Store Views (vi, en, zh) sharing same products and categories

I want to setup:

  • mydomain.com/vi (for Vietnamese)
  • mydomain.com/en (for English)
  • mydomain.com/zh (for Chinese)

(All the URLs above include "http://", StackExchange wants me to remove it away from the post)

I did: go to Stores -> Configuration -> General -> Web -> choose Store View (vi, en, zh) -> edit Base URL for each Store View to be domain.com/vi (or zh, en) -> Save Config -> go to Cache Management -> select all rows and Refresh

THE RESULT: when going to the store home page (mydomain.com), the system redirects to the default Store View (which is mydomain.com/en), and then it shows 404 error.

What am I missing? Please give me a clear step-by-step answer. I'm using Apache with cPanel, PHP 7, Magento 2.1.2 Community Edition. I'm completely new to (2 days), I understand some basic fundamental ideas of Magento.

Your answers not only help me, but those newbies who would Google the same issue in the future.

  • Have you figured this out? I'm facing the same issue. Commented Apr 9, 2018 at 16:18

1 Answer 1


On Magento 2.1.5 :

Stores > Configuration > Web > Url Options, with selected Store view : "Default Config"

switch option "Add Store Code to Urls" to "Yes" :

you don't need to change base urls

  • Do you happen to know why the option Add Store Code to Urls select option is not present for websites or stores view?. This seems to be available only Default Config. Commented Jan 18, 2019 at 14:41
  • I suppose it is only displayed on the Default config to not confuse users. Commented Jan 18, 2019 at 17:51

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.