Hello I have website test.english.com in ENG language I want to add new website view within it for Spanish language For that, I have created Folder magento_Root/pub/spanish and point it. Now the website is running on test.english.com/spanish perfectly.

  • Now I want to change the domain for Spanish language is test.spanish.com So where I have to point new subdomain(I'm asking here folder path where to point new domain DNS).
  • What i have to add in variable $MAGE_ROOT

So Spanish website will run on test.spanish.com.

Server - Nginx (With CentOs) - Varnish Enable

  • I think if its website no need to create directory under pub you can simply add URL to associated website in configuration and redirection from htaccess will work. Same thing in apache working for me. No idea about nginx here you dont have htaccess as well. You can try add redirection into htaccess but if still not work you can contact hosting provider. – anonymous Dec 23 '19 at 8:51
  • test.english.com/spanish is working now i want it on other domain i have stated – Ketan Borada Dec 23 '19 at 9:01

just add DNS record for the same ip address. add website code in magento, and use map in nginx.

map $http_host $MAGE_RUN_CODE {
        test.english.com default;
        test.spanish.com es_ES;

map $http_host $MAGE_RUN_TYPE {
        test.english.com website;
        test.spanish.com website;


location ~ \.php$ {
fastcgi_param   MAGE_RUN_CODE $MAGE_RUN_CODE;
fastcgi_param   MAGE_RUN_TYPE $MAGE_RUN_TYPE;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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