Magento 1.9 – Setup Multiple Websites on Different Domains

apachemagento-1.9multistoreserver-setupwebsites

I read and viewed all things related to multiple websites for Magento, but I still cannot setup properly to handle different domains with different Magento websites.

Could somebody let me know step by step, how to setup the virtual hosts properly and htaccess or/and index.php?

I know that setting multiple websites in subdomains/catalogs is easy, but I like it to work with different domains.

I have set up everything in Magento admin:

1st store:

  • domain: abc.com
  • website code: domain1

2nd store:

  • domain: xyz.com
  • website code: domain2

I have Apache configured in /etc/httpd/conf/httpd.conf with the following document roots:

  • /home/admin/domains/abc.com/public_html
  • /home/admin/domains/xyz.com/public_html

What should I put in the second domain directory (.htaccess, index.php? should I copy it from first one?)

Best Answer

You can find how to setup multiple storefronts on one Magento installation by following: http://www.ecommercegorilla.com/how-to-set-up-multiple-store-fronts-with-magento/

This method works for any store post Magento CE 1.4

Look to the end of the article you will see there are two methods, one that uses separate directories for each domain and a second method that allows you to use pointer domains.

If you are looking to have customers checkout on the store domain and not one shared domain under SSL you will want to use the separate directories method. It describes how to setup the symbolic links so the store will properly pull files and how to modify the the index.php of each store to assign the correct website/store code.

Related Topic