Multiple Magento 1.9 Websites/Stores on same domain

Multiple Magento 1.9 Websites/Stores on same domain

August 25, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Multiple Magento 1.9 Websites/Stores on same domain

Multiple Magento 1.9 Websites/Stores on Same Domain: A Comprehensive Guide

As an experienced e-commerce developer, I often receive queries from clients who want to set up separate retail and wholesale stores on the same domain using the URL structure mysite.com/store and mysite.com/wholesale. While Magento provides extensive documentation for managing multiple websites on different domains or subdomains, setting up separate stores on the same domain requires a slightly different approach.

The Basics of Multiple Stores in Magento 1.9

In Magento 1.9, you can create multiple websites and assign them to respective stores. This allows you to manage separate product catalogs, prices, and designs for each storefront. To begin, navigate to the Magento backend and go to System > Manage Stores.

Creating Separate Websites in the Backend To set up your retail and wholesale stores, first create two new websites: Retail and Wholesale. In the “Add New Website” section, enter the relevant details such as name, code (e.g., ‘retail’ or ‘wholesale’), sort order, and root category.

Configuring Base URLs for Each Website Once created, configure the base URL settings for each website under System > Configuration > General > Web > Unsecure and Secure. Ensure you enter the appropriate URLs for mysite.com/store and mysite.com/wholesale.

Assigning Stores to Websites

Next, create two new stores and assign them to their respective websites. In the “Add New Store” section, select the website you created earlier (either Retail or Wholesale), enter the store name, code, sort order, and root category.

Resolving 404 Errors for mysite.com/wholesale If you’re facing a standard server 404 error when accessing mysite.com/wholesale, it’s likely due to the .htaccess file not being properly configured. By default, Magento expects the requested URL to match the base URL of the current store.

To resolve this issue, you can modify the .htaccess file located in your Magento root directory. Open the file and add the following lines before the ”# End Web Server Configuration” comment:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [L]
</IfModule>

<IfModule mod_php5.c>
    php_value auto_prepend_file /var/www/mysite.com/wholesale/includes/config.php
</IfModule>

This configuration tells the web server to pass all non-file and non-directory requests to the Magento index.php file. Additionally, if you’re using PHP 5, the second block sets the auto_prepend_file directive to a custom configuration file (e.g., /var/www/mysite.com/wholesale/includes/config.php).

Creating a Wholesale Folder While not strictly necessary, creating a ‘wholesale’ folder in your root directory can help organize your files and make it easier to manage the separate store. You can create this folder using the following command:

mkdir /var/www/mysite.com/wholesale

Conclusion

Setting up multiple Magento 1.9 websites/stores on the same domain requires a careful configuration of the website and store settings in the backend, along with some modifications to the .htaccess file. By following the steps outlined above, you can create separate retail and wholesale stores using the desired URL structure.

Remember that proper management of your Magento installation is crucial for ensuring optimal performance and security. If you find yourself struggling with the setup process or need further assistance, don’t hesitate to reach out to our team at Laravel Company. We specialize in providing expert Magento development services to help you build successful e-commerce platforms.

Happy coding!

Magento 1 Catalog Admin Configuration

Our network