After creating a second website on my Magento admin (setting up the store, storeview, base url etc.) I can't reach the newly created store. Whenever I go try the url I want website to use I just get redirected to my main store.
I also configured the DNS settings correctly (I think).

Main Store: main.store.eu
Second store: store.second.eu

Whenever I use store.second.eu it redirects me to main.store.eu
I've been looking into the magento2/index.php file and magento2/nginx.config but the explanations aren't totally clear, talk about M1 or talk about an Apache server...

Can somebody please help :)

1 Answer 1


You should add this to your .htaccess files inside <IfModule mod_rewrite.c>

SetEnvIf Host .*store.second.eu.* MAGE_RUN_CODE=CODE
SetEnvIf Host .*store.second.eu.* MAGE_RUN_TYPE=website

where you should replace MAGE_RUN_CODE with your website code.

More info on devdocs

  • Unfortunately my hosting service doesn't work this way... I'm working with a Hypernode. Here they give a short explanation on multisture but it's not clear at all to me what I should do. Dec 5, 2016 at 12:24
  • You can't edit the .htaccess file in your magento root dir? Dec 5, 2016 at 12:25
  • I can edit the file but it's not going to help if I can follow my hosting service's knowledge base. Dec 5, 2016 at 12:28

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.