Craft CMS ships with a genuinely powerful multi-site engine baked into a single installation. One codebase, one database, one control panel — but you can serve a primary brand on example.com, a regional store on uk.example.com, and a completely separate domain like example.co.uk, each with its own content, locale, and templates. The catch is that Craft only handles the application layer. The DNS records, subdomain document roots, and SSL certificates all live on the server, so you have to connect both halves correctly or you end up with sites that resolve to the wrong folder or throw certificate warnings. This guide walks through the full path: configuring the sites inside the Craft control panel first, then wiring up subdomains and domains in both DirectAdmin and cPanel.
How Craft Multi-Site Actually Works
Before touching any config, it helps to understand the model. A Craft install has one or more Sites grouped into Site Groups. Every site shares the same set of sections, fields, and entries, but each site can:
- Have its own base URL (a subdomain, a subdirectory, or an entirely different domain).
- Use its own language/locale for content translation.
- Enable or disable individual entries per site, so content is not forced to appear everywhere.
- Load a different template path if you want distinct designs.
Craft Commerce adds Stores on top of this. In Commerce 5, each store is tied to one or more sites, letting you run separate catalogs, currencies, tax zones, and payment gateways per market. So a multi-store build is really a multi-site build with Commerce stores mapped on top.
Key point: all sites run from the same codebase and same database. You are not installing Craft multiple times — you are pointing multiple hostnames at one install and letting Craft decide which site to render based on the request host.
Step 1: Define Your Sites in the Craft Control Panel
Start inside Craft because the base URLs you set here dictate what you configure on the server.
- Log in to your Craft admin at
https://example.com/admin. - Go to Settings → Sites.
- Optionally create a new Site Group (for example, "Europe") if you want to organize related sites.
- Click + New Site and fill in:
- Group — the group you just created.
- Name & Handle — a readable label and a machine handle like
ukStore. - Language — the locale, e.g.
en-GB. - Base URL — this is the important one. Use an environment variable so it stays portable, e.g.
$SITE_URL_UKor a literal likehttps://uk.example.com/.
- Save the site.
Using environment variables is the recommended approach. In your .env file at the project root, add lines that match the hostnames you plan to serve:
PRIMARY_SITE_URL="https://example.com"
SITE_URL_UK="https://uk.example.com"
SITE_URL_COUK="https://example.co.uk"
Then reference $SITE_URL_UK in the Base URL field. This keeps production and staging clean and avoids hardcoding domains into the database.
Step 2: Add Commerce Stores (Optional Multi-Store)
If you are running Craft Commerce and want distinct catalogs or currencies per market:
- Go to Commerce → System Settings → Stores.
- Create a new store and assign it to the relevant site(s).
- Configure per-store currency, tax categories, shipping zones, and payment gateways.
- Assign products and pricing to the correct store so each market sees its own catalog.
Each store now renders through its associated site's base URL, which means the subdomain or domain you set up on the server determines which storefront a visitor lands on.
Step 3: Point Hostnames to Craft on the Server
This is where the control panel work happens. Every Craft site needs its subdomain or domain to resolve and to load the same web root as your primary install (typically public_html/web for Craft, since Craft serves from a web/ directory). Below are the exact paths for both panels.
Creating a Subdomain (e.g. uk.example.com)
DirectAdmin (Evolution Theme):
- Log in to DirectAdmin and open Account Manager → Subdomain Management.
- Enter the subdomain prefix (
uk) and click Create. - By default DirectAdmin creates a new folder like
public_html/uk. You do not want that for a single-install multisite. Go to Account Manager → Domain Setup, open the domain, and set the subdomain's document root to point at your Craftweb/directory (e.g.public_html/web) so it loads the same install.
cPanel (Jupiter Theme):
- Log in to cPanel and open Domains → Domains (or Subdomains on some builds).
- Click Create A New Domain, enter
uk.example.com. - Untick the auto-generated document root and manually set it to your Craft web root, e.g.
/home/user/public_html/web, so the subdomain serves the existing install rather than an empty folder.
Adding a Separate Domain (e.g. example.co.uk)
DirectAdmin:
- Go to Account Manager → Domain Setup → Add New.
- Enter the new domain and, after creation, edit its document root to point at the same
public_html/webfolder used by your primary Craft install.
cPanel:
- Open Domains → Domains → Create A New Domain.
- Add the domain and set its document root to the shared Craft
web/directory.
Because Craft matches the incoming Host header against your configured Base URLs, pointing multiple hostnames at one web root is exactly what you want. On our LiteSpeed Web Server Enterprise stack, this all runs through native LSAPI with no extra vhost tuning needed.
Step 4: Configure DNS and SSL
Subdomains that share your primary domain's DNS zone usually resolve automatically once created in the panel. External domains need their nameservers pointed to us, or at minimum an A record for the hostname.
DirectAdmin — DNS & SSL:
- DNS records: Account Manager → DNS Management. Confirm an A record exists for the subdomain or new domain.
- SSL: Account Manager → SSL Certificates. Choose Free & automatic certificate from ACME provider (Let's Encrypt) and tick every hostname — root,
www, and each subdomain — so the SAN certificate covers all sites.
cPanel — DNS & SSL:
- DNS records: Domains → Zone Editor. Verify the A record for each hostname.
- SSL: Security → SSL/TLS Status. Select the hostnames and click Run AutoSSL to issue coverage for every subdomain and domain.
Since every Craft Base URL uses https://, missing SSL on even one subdomain will break that storefront with mixed-content or certificate errors. Confirm all hostnames show a valid certificate before going live.
Step 5: Verify Routing and Cache Behavior
Once DNS and SSL are in place, load each hostname in a browser. Craft should render the correct site based on the request host. If uk.example.com shows your primary content, double-check that its Base URL exactly matches the hostname (including trailing slash) and that the environment variable resolves correctly.
Because our platform uses native Redis object caching and OPcache on PHP 8.2–8.4, clear Craft's caches after adding sites so stale routing data does not linger:
php craft clear-caches/all
php craft gc
Run these from the project root over SSH. If your storefronts feel sluggish under multi-store load, the underlying disk and PHP config matter just as much as your app settings — our guide on why your Time to First Byte is killing your SEO explains how server response time compounds across a multi-site build.
A multi-store Craft install with several catalogs and locales works comfortably on Shared Hosting for small to mid traffic, but if you are running heavy Commerce workloads with large catalogs, a Cloud VPS with dedicated resources gives you predictable performance and headroom for scaling.
Troubleshooting Common Multisite Issues
- All hostnames show the same site: Base URLs are not distinct or point to the same env var. Check Settings → Sites and your
.env. - 404 or default panel page on a subdomain: The document root was not changed to
public_html/web. Re-edit it in Domain Setup (DirectAdmin) or Domains (cPanel). - Certificate warning on one hostname: AutoSSL/Let's Encrypt did not include it. Re-run SSL issuance covering every hostname.
- Wrong currency or catalog: The Commerce store is mapped to the wrong site. Recheck Commerce → System Settings → Stores.
Frequently Asked Questions
Do I need a separate Craft license for each site?
No. Craft's multi-site feature is included with a standard Pro license — all sites run from one installation on a single license. You only pay extra if you add plugins that license per-site, and Craft Commerce is a separate license from Craft CMS itself.
Should each subdomain get its own document root folder?
No — that is the most common mistake. For a single multi-site install, every hostname's document root must point to the same Craft web/ directory. Separate folders would require separate installs, which defeats the purpose of Craft's shared-content model.
Can I mix subdomains and completely different domains in one install?
Yes. Craft matches on the full request host, so you can freely combine uk.example.com, example.co.uk, and example.com in the same install. Just make sure each has a matching Base URL in Craft, a resolving DNS record, and valid SSL coverage.