I want to setup two different websites on the same Magento 2.1 Installation. The two websites will have different products and different domain (not on the same host). Right now I have only registered one domain and I'm trying to configure multiwebsite to work on mydomain.com and shop.mydomain.com (or mydomain.com/shop). I have tried different tutorial but nothing seems to work.

I'm on a Shared Hosting with no SSH and I'm unable to follow the Magento DevDocs all the way through because I can't create a Virtual host or run code with ssh.

I have also tried this two tutorial with no luck: https://www.forgeonline.co.nz/magento-multistore-website-shopfront/ https://www.fmeextensions.com/blog/how-to-create-configure-multiple-store-views-in-magento-2/

what I'm doing wrong?

  • I have figured out a solution with my hosting provider by using aliases instead of virtual host and is working fine Commented Dec 4, 2017 at 8:58

1 Answer 1


I have figured out a solution with my shared hosting provider by using aliases instead of virtual host. My provider add to apache configuration:

SetEnvIf Host www\.mywebsite\.it MAGE_RUN_CODE="mycode1"
SetEnvIf Host www\.mywebsite\.it MAGE_RUN_TYPE="website"
SetEnvIf Host www\.mywebsite2\.it MAGE_RUN_CODE="mycode2"
SetEnvIf Host www\.mywebsite2\.it MAGE_RUN_TYPE="website"

And add aliases pointing to the same directory of my main website. Not perfect but it works

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.