In order to configure a multi store with different domains or sub domains you need to follow these steps:
- Create store categories (Magento admin)
Those can be either shared between the different domains or you can set up separate root category trees for each domain
Go to Catalog -> Categories -> Manage Categories - Store configuration (Magento admin)
Go to System -> Manage Stores - Domain and server configuration (not in Magento admin)
Your domain has to either use the Openstream name servers or if you’re using your own name servers you will have to create a so called A record in your zone file pointing to our server’s IP adress. This should usually be done by someone who has at least basic knowledge about DNS. You also need to add a switch command to Magento’s index.php file which again requires some basic developer skills
For more details on steps 1 and 2 you can refer to the official Magento Knowledge Base. For step 3 please get in touch with our technical support team.
Domain Mapping via index.php
In index.php change
Mage::run($mageRunCode, $mageRunType);
to
switch($_SERVER['HTTP_HOST']) { case 'shoes.com': case 'www.shoes.com': $mageRunCode = 'shoes'; $mageRunType = 'website'; break; }
Domain Mapping via .htaccess
Alternatively, if the webserver understands .htaccess files, you can also configure it via .htaccess.
SetEnvIf Host www\.domain1\.com MAGE_RUN_CODE=domain1_ch SetEnvIf Host www\.domain1\.com MAGE_RUN_TYPE=website SetEnvIf Host ^domain1\.com MAGE_RUN_CODE=domain1_ch SetEnvIf Host ^domain1\.com MAGE_RUN_TYPE=website SetEnvIf Host www\.domain2\.com MAGE_RUN_CODE=domain2_ch SetEnvIf Host www\.domain2\.com MAGE_RUN_TYPE=website SetEnvIf Host ^domain2\.com MAGE_RUN_CODE=domain2_ch SetEnvIf Host ^domain2\.com MAGE_RUN_TYPE=website