
This tutorial guides you through setting up Magento Multi-Store on Shared Hosting with cPanel with the “parked domain” method. The set-up has been tested on our servers and works perfectly with all TerraNetwork hosting accounts. Any problems, feel free to contact support and we can take a look.
Shared Hosting Caveat: Whilst it’s perfectly possible to run Magento on Shared Hosting it does require more resources than other carts. If your shop gets busy or you have a large number of SKUs, then you may wish to consider an upgrade to Semi-Dedicated or Dedicated Hosting.
The set-up has been tested with Magento Community Edition 1.6.1.0 on Shared Hosting with cPanel on PHP5.3.
- Adding another shop in Magento
- Adding a parked domain to cPanel
- Modifying .htaccess
- Setting up SSL for checkout
Adding another shop in Magento
First off we need to add a second shop in Magento. We’re using a dummy name “example.com”. Please replace with the real domain you wish to us.
Create Root Category
- Log into your Magento admin
- Go to the Catalog tab and select “Manage Categories”
- Click on the “Add Root Category” button on the left
- For “Name” enter example.com. Set the dropdown for “Is Active” to “Yes”.
- Click “Save Category” button.

Create Website
- Go to the “Systems” tab and select “Manage Stores”.
- Click on the “Create Website” button.
- For the “Name” enter example.com and for the code example. The code will be important later when we need to modify .htaccess.
- Click on the “Save Website” button.

Create Store
- Click on the “Create Store” button.
- For the “Website”, select example.com from the dropdown. For the “Name” enter “Example” or any value of your choice. For the “Root Category” select example.com from the dropdown.
- Click on the “Save Store” button.

Create Store View
- Click on the “Create Store View” button.
- For the “Store” select the store you created in the last step, in our case Example. For “Name” enter Example View. For “Code” enter example_view. Set “Status” to “Enabled”.
- Click on the “Save Store View” button.

Change Base URL
- Go the “System” tab and select “Configuration”.
- For “Current Configuration Scope” (located near top left) change the dropdown menu from “Default Config” to example.com
- Select “Web” from the left sidebar under the “General” section.
- For both the Unsecure and Secure sections, uncheck the “Use Default” box next to the Base URL; and enter the URL for your own shop example.com. Make sure to include the trailing backslash.
- Click the “Save Config” button.

Modify URL redirecting
- Still under “System -> Configuration” change the “Current Configuration Scope” to “Default Config”.
- Select “Web” from the left sidebar under the General section.
- For “URL Options -> Auto-redirect to Base URL” set to “No”.
- Click the “Save Config” button.

Adding a parked domain to cPanel
- Change the domain’s DNS name servers to your servers. If in doubt, ask your hosting provider for help.
- Log into your cPanel and go to “Domains -> Parked Domains”
- Add the domain example.com and click “Add Domain”

Modifying .htaccess
- Either log into your cPanel and go to “Files -> File Manager” or connect to your site via an FTP program.
- Navigate to /home/USER/public_html/.htacess (where USER is your cPanel username).
- Add to the file the following lines as below. The “Host” is the main part of your domain name. “CODE” is the website code you defined in Magento admin. RUN_TYPE should always be “website”.
SetEnvIf Host .*example.* MAGE_RUN_CODE=example SetEnvIf Host .*example.* MAGE_RUN_TYPE=website
- Save the file and if you using FTP, upload to your site
Done!
If all has gone to plan, then you will now have the same instance of Magento running on two separate domain names.
Setting up SSL Certificates for Checkout
With the set-up as described above, the only option if you need an SSL Certificate for checkout is to go for a Multi-Domain cert. Multi-domain SSL certificates allow for one cert to be applied to separate domain names on 1 IP. In the past these used to be prohibitively expensive; but prices have tumbled dramatically and are now feasible even for smaller shops.
Multi-Domain Certs should not be confused with WildCard SSL Certs. WildCard covers sub-domains (www.mydomain.com, shop.mydomain.com). Multi-Domain Certs cover separate domain names (mydomain.com, myothershop.com). When ordering a Multi-Domain Cert please bear in mind that www.mydomain.com and mydomain.com will be counted as 2 domains.
For the Dedicated IP, please contact your hosting provider. For Multi-Domain Certs, you can for example try Comodo or GoDaddy.
So there you have it – a Magento multi-shop set up with secure checkout on a Shared Hosting account. And for customers of TerraNetwork, if you run into any issues, feel free to drop us a support ticket, we’re here to help!














Simply Awesome.
I’ve been using a SubDomain approach to multiple websites for our setup for a long time. When I had some problems after upgrading to Mag 1.6.1 and shifting servers I searched for solutions I found this. What a neat and tidy way to setup multiple web sites on a server. All my subdomains and individual setups are gone!! THIS IS AWESOME and such a neat setup on the server. Thanks so much. I’m unsure of the implications for SEO yet but I can’t think of any immediate concerns. Time will tell.
hello thank you for the info, i followed it and reached to htaccess and i could not get the domains to work, nothing happened at all,
was wondering if you could reply to me with answer
thank you
Hi Ajay – I’m sorry but we can only provide individual support for clients who are hosted with us (TerraNetwork). If you are hosted with someone else, I’d recommend to first check with your hosting provider to ensure that server settings allow this method.
Thanks lots and I had perfect result as I followed your instruction. I spent few days to looking for solution before.
Now I find your solution and spend 20min to get all done.
Thanks again ^_*
According to CPanel docs, you cannot install a multi domain cert with CPanel. Would love to know how you get around this!
Hi Lee – if you read the last part of our blog, there’s a couple of providers who will issue multi-domain SSL Certs which allow for multiple domains on 1 IP address. It’s perfectly possible and we have live sites using this type of cert on our shared cPanel servers. Once purchased, the install process is the same as for any other Cert.