Magento multiple websites

Magento multiple websites

October 4, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento multiple websites

Setting Up Multiple Magento Websites: A Comprehensive Guide

Creating multiple websites within a single Magento installation is a powerful feature that allows you to manage separate domains, currencies, payment gateways, and more from one admin panel. This capability is particularly useful for handling different brands or regions with distinct e-commerce requirements.

Understanding the Basic Concepts

When setting up multi-site functionality in Magento, it’s crucial to understand the fundamental components:

  1. Website: The top-level entity that represents a group of sites.
  2. Store: A collection of websites, used to manage multiple stores within an organization.
  3. Store View: Defines a language and locale for your store.

Configuring Your First Website

To begin, navigate to the Magento admin panel:

  • Go to System -> Configuration -> General.
  • Expand General -> General Information.
  • Under Website Name, enter your primary website’s name.
  • Click ‘Save Config’.

Now proceed to create your first site:

  1. Create a new website: In the admin panel, go to System -> Configuration -> Advanced.
  2. Find Multisite View and click on it.
  3. Under Websites, click ‘Add New Website’.
  4. Give it a name (e.g., “Secondary Site”) and choose your primary store view.
  5. Click ‘Save’.

Configuring Your Second Website

For the secondary site, follow these steps:

  1. Configure base URLs: Go to System -> Configuration -> General.
  2. Find Web under the General section.
  3. Set both Base URL (Base Link URL) and Secure Base URL (Secure Base Link URL) to the new domain you want for this site.

For example, if your primary site is at ‘www.example.com’ and you want the secondary one at ‘www.secondary.com’, set:

  • Base URL: http://www.secondary.com
  • Secure Base URL: https://www.secondary.com
  1. Configure currency: Go to System -> Configuration -> Currency Setup.
  2. Set the default currency for your new site.
  3. Save the configuration.

Ensuring Your Second Site is Visible

The common issue of being redirected back to the primary site occurs due to Magento’s default behavior. To resolve this:

  1. Check your .htaccess file: Ensure that it contains the following line near the top:
RewriteBase /magento/

If the path doesn’t match the actual URL (e.g., if your stores are located at ‘www.example.com/magento/’), update it accordingly.

  1. Verify the Apache configuration: Make sure that your virtual host file for the secondary domain correctly points to the Magento installation folder.

  2. Clear cache and reindex: After making changes, go to System -> Cache Management, select all cache types, and click ‘Flush Cache’. Then, run php bin/magento indexer:reindex.

Optimizing Performance

As you add more websites, keep in mind the performance implications:

  • Database optimization: Magento stores settings for each site in its database. Ensure your database is properly optimized to handle multiple sites.
  • Caching strategy: Use a robust caching system like Varnish or Redis to improve load times.

Conclusion

Creating multiple websites in Magento opens up powerful e-commerce possibilities. By following this guide, you can effectively manage separate domains, currencies, and payment gateways from one admin panel, streamlining your operations while providing tailored experiences for different customer segments.

Remember, proper configuration of URLs, currency settings, and caching strategies are key to a smooth multi-site implementation. For more advanced setup tips and best practices, consider checking out the in-depth guides available on Laravel Company.

Admin Configuration CLI

Our network