Business Web Hosting since 2005
New!

Magento Multi-Store on Shared cPanel Hosting with Parked Domains

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

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

  1. Log into your Magento admin
  2. Go to the Catalog tab and select “Manage Categories”
  3. Click on the “Add Root Category” button on the left
  4. For “Name” enter example.com. Set the dropdown for “Is Active” to “Yes”.
  5. Click “Save Category” button.

Create Website

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

Create Store

  1. Click on the “Create Store” button.
  2. 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.
  3. Click on the “Save Store” button.

Create Store View

  1. Click on the “Create Store View” button.
  2. 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”.
  3. Click on the “Save Store View” button.

Change Base URL

  1. Go the “System” tab and select “Configuration”.
  2. For “Current Configuration Scope” (located near top left) change the dropdown menu from “Default Config” to example.com
  3. Select “Web” from the left sidebar under the “General” section.
  4. 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.
  5. Click the “Save Config” button.

Modify URL redirecting

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

Adding a parked domain to cPanel

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

Modifying .htaccess

  1. Either log into your cPanel and go to “Files -> File Manager” or connect to your site via an FTP program.
  2. Navigate to /home/USER/public_html/.htacess (where USER is your cPanel username).
  3. 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 
    
  4. 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!

,

9 Responses to Magento Multi-Store on Shared cPanel Hosting with Parked Domains

  1. Mark December 7, 2011 at 7:57 am #

    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.

  2. AJay January 9, 2012 at 1:32 pm #

    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

  3. Edith January 9, 2012 at 4:15 pm #

    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.

  4. Julia March 15, 2012 at 11:00 pm #

    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 ^_*

  5. Lee September 19, 2012 at 3:21 pm #

    According to CPanel docs, you cannot install a multi domain cert with CPanel. Would love to know how you get around this!

  6. Edith September 19, 2012 at 3:43 pm #

    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.

Trackbacks/Pingbacks

  1. Magento | Business information - May 29, 2012

    [...] May 28, 2012 admin E-Commerce, 0 I am trying to set up 2 sites under 1 magento installation. I used the following guide and creating 2 root categories: http://www.terranetwork.net/blog/201…arked-domains/ [...]

  2. Magento Hosting - Please advise on what i may need - 2 sites, on 1 Magento install - August 28, 2012

    [...] Array You can run Magento multi-store on shared cPanel hosting as explained here: Magento Multi-Store on Shared cPanel Hosting with Parked Domains | TerraNetwork [@moderator: hope it's okay to include this link?] Magento can be run on shared hosting, as long [...]

  3. Magento Hosting REQUIRED - 2 sites , 1 magento install - 3 to 400 visitors per day - August 28, 2012

    [...] (-13) Array You can run Magento multi-store on shared cPanel hosting as explained here: Magento Multi-Store on Shared cPanel Hosting with Parked Domains | TerraNetwork For Magento optimised hosting we offer Semi Dedicated Plans which give you a powerful server set [...]

Leave a Reply

Facebook

LinkedId

Google Plus

Follow Me on Pinterest
  • Simple mini black icons which includes 12 icons within the set in total. The icons would be perfect to be used within mobile interface design.

    Pinned: 15 Mar 2013
  • Egg-shaped social icons. All icons in PNG format and in 4 different sizes (512x512px, 256x256px, 128x128px, 64x64px)

    Pinned: 15 Mar 2013
  • Crisp is a brand new free social media icon set produced exclusively for the readers of Visual Swirl. It consists of 25 professionally designed round icons for social media sites. Also included are a few miscellaneous icons (mail, rss, and apple) that can be used to complete a sharing section on your blog or website. The package contains icons in PNG format in 3 convenient sizes: 128x128px, 64x64px, and 32x32px.

    Pinned: 15 Mar 2013
  • Up for grabs is a beautiful set of social icons. This free download includes a PSD file will fully editable shape layers, plus 56 icon variations in PNG format.

    Pinned: 15 Mar 2013
  • This is a set of 64 balloon icons which covers most of the popular social network and sharing tools icons. The set is free for both personal and commercial use.

    Pinned: 15 Mar 2013
  • This freebie is simply a variation of the Google+ icon, I’ve created the icon set available to be used within commercial and non commercial design projects. The icon set comes in three different sizes 32px x 256px ,128px x 128px, and 64px x 64px.

    Pinned: 15 Mar 2013
  • Free Hand-drawn social media icons set contains pretty much every icon you will ever need while covering social media. This icons set includes 30 hand-drawn social media website icons which are Rss, Facebook, Twitter, Myspace, LinkedIn, Behance, Flicker, Dribbble, Youtube, Tumbler, Yahoo, Google, Reddit, Digg, StumbleUpon and many more in 3 different sizes (64x64px, 48x48px, 32x32px).

    Pinned: 15 Mar 2013
  • This free icon set, by WordPressThemeShock, consists of 10 icons for social media sites, as well as common content-sharing icons like an RSS feed icon and an email icon. Each icon comes with its own editable source file (in .AI format) so that you can easily modify the icons as you see fit. The theme of this icon set freebie is centered on 3D and wooden textures.

    Pinned: 15 Mar 2013
  • Blueprint Social is a set of 16 free icons for major social network in a blueprint style which matches our other free icon set Blueprint Adobe. In this version it features Facebook, Twitter, Google, Delicious, Flickr, StumbleUpon, Design float, WordPress, RSS, Furl, Mixx, Blogger, DeviantArt, Linkedin, Vimeo.

    Pinned: 15 Mar 2013
  • A simple red subtle grunge social media icon set. The icons can be used within commercial and non commercial design projects.

    Pinned: 15 Mar 2013