How-to guide

    Multiple Magento Stores, One Server, One Admin

    How Multi-Store Really Works, and Which Old Rules to Ignore

    By Simon Bumford, Founder of EveryHost9 min read

    TL;DR

    One Magento 2 installation can run many storefronts on many domains, all managed from one admin panel, on one server. The hierarchy goes Global, then Website, then Store, then Store View: separate websites give separate customers and pricing, store views handle languages and currencies. The web server routes each domain to the right site with two environment variables, MAGE_RUN_TYPE and MAGE_RUN_CODE. The old rule that every SSL store needs its own dedicated IP is obsolete: SNI serves a separate free Let's Encrypt certificate per domain from one IP. What still matters is sizing, because every extra store adds catalogue, cache and traffic to the same hardware.

    Website, store, store view: what the levels actually mean

    Magento 2 was built multi-store from the start, and the feature hangs off a four-level hierarchy: Global, then Website, then Store, then Store View. Everything in configuration belongs to one of those scopes, and choosing the right level for each storefront is most of the design work.

    At the top, Global covers the whole installation: one catalogue of products, one admin panel, one set of admin users. Below that, a Website is the strongest separation Magento offers without a second installation: each website has its own customer accounts, its own prices, its own payment and shipping configuration and its own orders. That is the level you use for genuinely different businesses: a retail brand and a trade counter, or two brands owned by the same company. Beneath each website sit Stores, which mostly govern category structure, and beneath those, Store Views, which are the presentation layer: typically one view per language or currency, so a single website can serve an English view and a French view of the same shop.

    The practical rule of thumb: different customers or different prices means separate websites; the same shop in another language or currency means another store view. B2B plus B2C splits and multi-brand retailers, the two classic multi-store cases, are both website-level jobs.

    One serverone IP, one Magento installSNI: one certificate per domainbrand-a.co.ukwebsite: retail, own certificatebrand-b.co.ukwebsite: second brand, own certificatetrade.brand-a.co.ukwebsite: B2B pricing, own certificateOne admin panelcatalogue, orders, all stores
    One server and one Magento installation serving three domains, each with its own SNI certificate, all run from a single admin.

    One codebase, one admin, many domains

    The payoff of the hierarchy is operational. One codebase means one set of extensions to licence and one upgrade to test, instead of repeating the work per store. One admin panel means your team manages every product, price list and order queue in one place, with each website mapped to its own domain, or to a path on a shared domain if you prefer. A product photographed and described once can be sold on three storefronts the same afternoon.

    Each website sets its own base URLs in configuration, so brand-a.co.uk and brand-b.co.uk both point at the same server and the same installation, yet customers see two completely distinct shops with their own themes, prices and checkouts. Orders arrive tagged with the website they came from, so reporting per brand stays clean.

    How one server routes each domain to the right store

    When a request arrives, something has to tell Magento which storefront to render. That job belongs to the web server, and it is done with two environment variables: MAGE_RUN_TYPE, which says whether the code refers to a website or a store, and MAGE_RUN_CODE, which names it. With nginx the standard approach is a map block keyed on the incoming hostname:

    map $http_host $MAGE_RUN_CODE {
        brand-a.co.uk        brand_a;
        brand-b.co.uk        brand_b;
        trade.brand-a.co.uk  trade;
    }
    
    # inside the PHP location block:
    fastcgi_param MAGE_RUN_TYPE website;
    fastcgi_param MAGE_RUN_CODE $MAGE_RUN_CODE;

    The map matches the Host header of each request to the website code you defined in the Magento admin, and the two fastcgi_param lines hand the result to PHP. Magento boots, sees the code, and serves that website's theme, catalogue rules and prices. Add a fourth brand later and the change is one line in the map, a new website in the admin, and its base URLs, no new server and no new installation.

    The same mechanism works with a value of store instead of website when you want to route directly to a specific store view, for example a dedicated domain per language. Either way the routing lives in one readable block in the vhost, which is exactly where you want it when something needs debugging at 5pm on a Friday.

    The dedicated IP per SSL store rule is obsolete

    Older multi-store guides, including the one this article replaces, insisted that every SSL-secured store needed its own dedicated IP address, and priced multi-store hosting accordingly. That advice is out of date and has been for years. It dates from pre-SNI shared hosting, when a server could only present one SSL certificate per IP address, because the certificate had to be chosen before the browser said which site it wanted.

    SNI, Server Name Indication, fixed that: the browser announces the hostname at the start of the TLS handshake, and the server picks the matching certificate. It has been standard across every mainstream browser, crawler and payment provider for years. One server on one IP address now serves a separate, dedicated certificate for each domain it hosts, and Let's Encrypt issues those certificates per domain at no cost, with automatic renewal. Three storefronts, three padlocks, one IP, zero certificate spend.

    So if a host quotes you for extra dedicated IPs "because each SSL store needs one", you are reading a pricing sheet from a previous decade. There are still niche reasons to want an extra IP, a separate mail sending reputation for instance, but SSL for multiple stores is not one of them.

    The constraints that do still matter

    Dropping the fake constraint makes room to respect the real ones. The first is sizing. Every website on the installation shares one database, one set of indexers, one cache pool and one search engine, so the server must be specified for the combined catalogue and the combined traffic. Two stores of 20,000 products each behave like one store of 40,000 products at index and cache level, and a promotion that spikes one brand competes for the same CPU as the checkout on the other. Reindexing, cache warming and search all scale with the total, not the average.

    The second is sessions. Separate checkouts per domain work perfectly, but a shared basket across different top-level domains is not possible with standard sessions, because cookies are bound to a domain and the browser will not present brand-a.co.uk's session cookie to brand-b.co.uk. Subdomains of one parent domain can share a session; distinct brands on distinct domains get distinct baskets, which in practice is what their customers expect.

    Neither constraint argues against multi-store. They argue for treating it as one bigger store when you buy hardware: the classic B2B plus B2C split and the multi-brand retailer both thrive on a single installation when the box underneath is sized for the sum.

    The hosting side: one tenant, sized for the sum

    Multi-store multiplies load on the same hardware, which is exactly the situation where single-tenant hosting earns its keep. On a shared platform, your three storefronts compete with strangers for the same CPU; on dedicated Magento hosting the whole server answers to your installation alone, and the peaks of one brand only ever contend with the quiet hours of another brand you also own.

    On EveryHost plans the stack is built to your store's required versions and specified against the combined catalogue and traffic across every storefront, not a per-site average. Multiple stores on one server is supported on every dedicated plan: separate vhosts per domain, per-store SSL certificates issued and renewed automatically, and one admin panel over the lot. If you are working out what the combined load needs, the Magento server calculator sizes a server from your total catalogue and traffic figures, and our Magento 2 hosting UK plans cover the routing setup, the certificates and the go-live. For the broader picture of what we host and how, see our Magento hosting overview, or talk the plan through with an engineer first.

    Frequently Asked Questions

    Frequently Asked Questions

    No. Magento Open Source is free, and one installation serves as many websites, stores and store views as you configure. There is no per-store licence, no per-domain fee and no artificial cap in the software. Your real costs are the server capacity to run the combined catalogue and traffic, and the development time to set the sites up. Adobe Commerce, the paid edition, is licensed on revenue rather than store count, so even there additional websites on one installation do not mean additional licences.

    Yes, and it costs nothing extra. SNI (Server Name Indication) lets one server on one IP address present a different certificate for each domain name, and every browser and crawler in current use supports it. Let's Encrypt issues certificates per domain free of charge and renews them automatically. So three storefronts on one server means three certificates on one IP, each padlock showing the right domain. The old advice that every SSL store needs its own dedicated IP dates from before SNI was universal and no longer applies.

    Yes, that is one of the main reasons to run them on one installation. All websites share one catalogue and one inventory pool by default, so a product's stock level is tracked once no matter how many storefronts sell it. At the same time, product availability, pricing and even tax rules can differ per website: a product can be live on your retail site at one price and on your trade site at another, or hidden from one site entirely. If you use Magento's Multi-Source Inventory you can also assign different warehouses to different websites.

    Only within limits. Baskets and login sessions ride on browser cookies, and cookies are bound to a domain. Stores that live on subdomains of one parent domain (uk.example.com and trade.example.com) can be configured to share the session cookie, so a basket can follow the customer. Stores on entirely different top-level domains (brand-a.co.uk and brand-b.co.uk) cannot share a basket with standard sessions and cookies, because the browser will not send one site's cookie to the other. Plan for separate checkouts per domain, which is what customers of distinct brands expect anyway.

    Size on the combined load, not the per-store load. Every website on the installation draws on the same MySQL database, the same indexers, the same cache pool and the same search engine, so the server needs to be specified for total catalogue size and total peak traffic across all storefronts. A box that runs one store comfortably can tip over when a second store doubles the cache working set and the crawl traffic. Our Magento server calculator at everyhost.co.uk/magento-server-calculator sizes a server from your combined catalogue and traffic figures, and it is the same method our engineers use when specifying multi-store hardware.

    Split into separate installations when the businesses genuinely need isolation: different ownership or legal entities, different release cycles and development teams, wildly different extension sets, or a requirement that a failure on one site can never touch the other. One installation means one upgrade affects every storefront at once, which is efficient when the sites belong together and risky when they do not. If the stores share a catalogue, a team and a back office, one installation on properly sized hardware is simpler and cheaper to run.

    Sources and further reading

    • Adobe Experience League, Websites, stores and store views (Magento 2 admin guide)
    • Adobe Experience League, Multiple websites or stores with nginx (MAGE_RUN_TYPE and MAGE_RUN_CODE)
    • IETF RFC 6066, Transport Layer Security extensions: Server Name Indication
    • Let's Encrypt documentation, free per-domain certificates and automatic renewal

    Planning a second storefront on the same server?

    Our UK engineers size the server for your combined catalogue and traffic, set up the vhosts, routing and per-store SSL, and hand you one admin over every brand. Supported on every dedicated plan.