In magento1 you can set the base url's in a multistore like this: {{base_url}}en/, {{base_url}}nl/, etc.

Trying that in Magento 2 will result in the following Error:

Invalid Base URL. Value must be a URL or one of placeholders: {{base_url}}

Is there a workaround to achieve this without editing the database directly?

What I want to achieve is to work with multiple developers in one database.

  • If you don't want to edit the database directly, is having to extend the core's source code an option for you? Mar 7, 2017 at 18:26

4 Answers 4


I found the Solution. Just end your url with a /(Slash).

  • 1
    Like {{base_url}}/en/ ? Jun 11, 2019 at 9:18
  • Yes Frank you can try with above code.Do not forget to add / at end of url.
    – Anees
    Jun 11, 2019 at 9:30

I have faced same issue and fixed to add url with end / (Slash)

For Example you can use url https://www.example.com instead https://www.example.com/

Hope it help!


Okay, found a solution.

Just set every base url to {{base_url}}.

For example when you navigate to https://url.extension/store_url the base url is automatically set to that specific url.

So when you click on a link on that page the next page will be https://url.extension/store_url/next_page

In this way you can work with multiple developers in one database :)


Check also if you have some special chart in base_url or some _ (underscore), if so, delete it or replace it with a hyphen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.