---
title: "How to configure multiple Magento storefronts"
source: "https://docs.nexcess.com/hosting/cms/magento/how-to-configure-multiple-magento-storefronts/"
description: "How to configure multiple storefronts for a single Magento 1 website."
vertical: "Hosting"
date: "2019-09-11"
last_modified: "2026-08-20"
---

# How to configure multiple Magento storefronts

![](https://docs.nexcess.com/wp-content/uploads/2026/06/featured-image-default-new-181.jpg)This method works only with Magento 1.x. For Magento 2, see [How to configure Magento 2 storefronts](https://www.nexcess.net/_questions/456441).

A Magento website may consist of one or multiple storefronts. These storefronts manage showcase products, categories, and search functionality. It is possible to configure multiple Magento storefronts for the same website.

Explore the [Magento website](http://magento.com/) for more information.

## 1. Create the storefront

The first step in setting up multi-store functionality is to create the new store or stores in the Magento Admin Panel.

1. Log in to the Magento Admin Panel. If you want your stores to share the same catalog and products, skip to Step G.
2. In the top menu, go to **Catalog > Manage Categories**.
3. Click **Add Root Category**.
4. In the **Name** field, enter your new store name.
5. Under **Is Active**, select **Yes**.
6. Under **Display Settings,** in **Is Anchor**, select **Yes**, and select **Save Category**
7. Go to **System > Manage Stores**.
8. Click **Create Website**.
9. In the **Name** field, enter your new store name. In the **Code** field, enter a unique string without spaces and write this code down for later use. Click **Save Website** when ready.

![Enter store name and other information before saving](https://docs.nexcess.com/wp-content/uploads/2026/06/cd6ace14ea7692106094b4169362c5acd2b8ed4e-589x125-1-1.png)10\. Click **Create Store**.

11\. In the **Website** field, select the website that you just created. In the **Name** field, type a name for your store. In the **Root** Category field, select the root category that you created above, or use the default Root Category if you skipped to Step G earlier. Click **Save Store** when ready.

12\. Click **Create Store View**.

13\. In the **Store** field, select the store you just created. In the **Name** field, give your view a name. This is typically "English." In the **Code** field, enter a unique string to identify the store view. Change the **Status** to **Enabled**. Click **Save Store View** when ready.  
14\. Go to **System > Configuration**.

15\. In the **Current Configuration Scope** drop-down list, select the website that you just created.

![Current Configuration Scope drop-down list](https://docs.nexcess.com/wp-content/uploads/2026/06/d241587107691a6777af713cbeb12f4ce9bcd421-233x343-1-1.png)16\. Select the **Web** menu option, and click to expand the **Unsecure** and **Secure** sections, respectively.

17\. For each section, clear the **Use Default** check box next to the **Base URL** and type the URL for your store, including the trailing slash. Click **Save Config**.

18\. You have successfully set up a Magento store. Repeat the steps above for any additional stores you wish to create.

## 2: Configure server to load the storefront

After store creation, you must configure the server to load the correct store. There are several methods for doing this. The two most popular methods are presented below. The first method is the older of the two and will work for any version of Magento. The second method takes advantage of changes made to the index.php file introduced in version 1.4.0.1.

### Method 1: Using separate directories for each store using secondary domains

1. Verify your chosen domain name points to the server.
2. Follow the instructions provided in [How to create a secondary domain](https://www.nexcess.net/_questions/454871) to create a secondary domain for your new store.
3. Using either FTP or SSH, copy the **.**htaccess and index.php files from your Magento installation to the document root of your new domain.
4. Open the index.php file that you just copied over and edit the last line of the file as follows: **ATTENTION**: Change newstore to the code that you wrote down when you created the new website above.
    
    Mage::run(’newstore’,’website’);
5. Finally, using SSH, create the following symbolic links in the document root of your new domain, and replace the path below with the full path to the document root of your Magento Installation:ln -s /home/example/example.com/html/app/ app ln -s /home/example/example.com/html/includes/ includes ln -s /home/example/example.com/html/js/ js ln -s /home/example/example.com/html/lib/ lib ln -s /home/example/example.com/html/media/ media ln -s /home/example/example.com/html/skin/ skin ln -s /home/example/example.com/html/var/ var ln -s /home/example/example.com/html/404/ 404 # this is only in 1.3x ln -s /home/example/example.com/html/reports/ reports # this is only in 1.3x
6. You have successfully configured your secondary domain to work with Magento. You may now load your new domain in your browser and begin developing your new store.

### Method 2: Using shared directory for all stores using pointer domains

If you are configuring a multi-store on a server running the PHP-FPM service and use the pointer domain method outlined below, you will likely require support from the our support team.

We will adjust the server’s Apache vhost configuration file to properly redirect your site to the correct storefront. We generally refer to this as the "FPM fix," and we suggest contact our support team to request this fix if you are experiencing issues with your Pointer Domain multi-store on a PHP-FPM server.

**ATTENTION:** This method works only for Magento versions 1.4.0.1 and higher.

1. Follow the instructions provided in [How to create a pointer domain](https://www.nexcess.net/_questions/454863) to create a server alias pointer domain for your new store. The pointer domain will be pointing at the primary domain of your Magento installation.
2. Edit the .htaccess file in the document root of your Magento installation and enter the following just above the line **RewriteEngine On:**
3. Replace .\*newstore.\* with the domain name of your new store, keeping the dots and stars.
4. Ensure that MAGE\_RUN\_CODE matches the code you wrote down when you created the new website above. **Newstore** specifies the domain name of your new store, and **websitecode** specifies the store code created in Magento. SetEnvIf Host .\*newstore.\* MAGE\_RUN\_CODE=newstore SetEnvIf Host .\*newstore.\* MAGE\_RUN\_TYPE=website or store
5. You have successfully set up your pointer domain to work with Magento. You may now load your new domain in your browser and begin developing your new store.

## If SetEnvIf fails

On some servers, particularly those running Litespeed Web Server, the SetEnvIf directive does not get recognized in the .htaccess file. If method 2 fails to configure multiple storefronts, try the following:

1. Edit the .htaccess file in the document root of your Magento Installation.
2. Type the following text just below the line #RewriteBase /magento/: 
    - Verify .\*newstore.com matches the domain name of your new store.
    - Verify MAGE\_RUN\_CODEmatches the code you wrote down when you created the new website above.RewriteCond %{HTTP\_HOST} .\*newstore.com \[NC\] RewriteRule .\* – \[E=MAGE\_RUN\_CODE:newstore\] RewriteCond %{HTTP\_HOST} .\*newstore.com \[NC\] RewriteRule .\* – \[E=MAGE\_RUN\_TYPE:website\]

Explore the Magento website for more information or check out our [Magento hosting](/hosting/cms/magento/) options.
