You can run many websites from one Laravel codebase by matching each request to a site by its domain and limiting every query to that site's data. We explain how we built Promo Hub this way, what it costs in discipline, and when separate installs are the better choice.
Running three websites is a chore. Running thirty or three hundred is a different job: every separate installation needs its own updates, its own fixes, its own deployment and its own person who remembers how it was set up. Sooner or later the sites drift apart, and the cost of a single change grows with every site you add.
We met that problem head on when we built Promo Hub, the platform we run and develop for promotional websites of service businesses. This article explains, in plain terms, how a multi-site platform on Laravel works, what it takes to keep it healthy, and when you should not build one at all.
Can you run many websites from one codebase?
Yes. A multi-tenant application serves every website from one Laravel codebase and one database. Each request is matched to a site by its domain, and every query is limited to that site's data. Each site keeps its own design, languages, content and search files, while fixes, security updates and new features ship once for all of them.
Why one codebase beats many separate installations
The usual starting point is a copy of the same CMS per site. That works until the first security update has to go out to forty installs, or until a form fix made on one site never reaches the others. A multi-site platform turns that around: the code is shared, and only the parts that should differ are stored per site.
| Question | Separate installations | One multi-site platform |
|---|---|---|
| Applying a security fix | Repeated on every site | Deployed once |
| Launching a new site | Install, configure, copy settings by hand | Scaffold or clone a site, domain setup runs on its own |
| Design per site | Full freedom, no shared parts | Own views and assets on shared components |
| Reporting across sites | Collected manually | One database, one panel |
| Risk of one bug | Stays on one site | Affects every site, so tests matter more |
| Cost to build | Low at the start | Higher at the start, lower per site later |
The last two rows are the honest part. Shared code means a shared mistake, and the first version of a platform costs more than a single site. The trade pays off when the number of sites is large and keeps growing. This is the kind of system we design as part of our custom web application development, and the reasons we choose the framework are covered in why Laravel suits business web applications.
How a multi-tenant Laravel application knows which site it is serving
Every request carries a host name. In Promo Hub, a middleware reads that host, finds the matching site record and stores it for the rest of the request. If no site matches, the visitor gets a "not found" response instead of someone else's content. The same step redirects to the site's canonical domain and applies the site's languages and settings.
Keeping each site's data apart
The second half is making sure a query can never leak data between sites. Laravel's global scopes do this well: every model that belongs to a site gets an automatic site_id condition. The snippet below is a simplified illustration of the idea, not code copied from the platform.
class BelongsToCurrentSite implements Scope
{
public function apply(Builder $builder, Model $model): void
{
if (app()->bound('currentSite')) {
$builder->where($model->getTable().'.site_id', app('currentSite')->id);
}
}
}
Developers then write ordinary queries, and the filter is added for them. Forgetting it is no longer a risk on every screen, only in the few places that deliberately work across sites, such as the operator's reports.
What each site keeps for itself
Shared code does not mean identical sites. In Promo Hub each site has its own views, front-end assets, translations and media, and the codebase contains per-site folders for more than 170 sites. Each site also serves its own robots.txt, sitemap.xml and llms.txt from its own domain, so search engines and AI crawlers see a complete, separate website. Content comes in three types: pages, blog posts and location pages. Enquiries are recorded by source, whether a form, a phone call or WhatsApp.

From a domain name to a live HTTPS site without manual steps
On a platform with many sites, launching one should not depend on someone remembering a checklist. Promo Hub treats provisioning as a state machine: each domain moves through named states, every step is a queued job, and a failure stops in a visible state instead of leaving a half-configured site. The steps are:
- Check whether the domain is available or already registered elsewhere.
- Register it when needed.
- Create the DNS zone.
- Point the domain's name servers at that zone.
- Wait for the name-server change to propagate, checking again on a schedule.
- Issue the SSL certificate, then mark the site as provisioned.
Around this sit commands and services to scaffold a new site, create sites in bulk, clone an existing site as a template, and save a site to a full backup archive and restore it from one. Because each of these is code, each has tests, and a new site starts from a known, working state.
Producing content in many languages with AI, within set limits
The interface of Promo Hub is available in 11 languages, and sites can publish content in several of them. Writing everything by hand across many sites would not scale, so the platform uses AI for bulk rewriting and translation of pages, blog posts and FAQs. Each site has its own AI profile with a voice and tone section, so two sites in the same trade do not end up sounding the same.
The team starts every AI batch from the operator panel and can follow its progress there. Comments go through AI moderation: clear spam is rejected, clearly fine comments are published, and the ones the model is unsure about wait for a person to decide.
Why similarity checks matter for search
Running many sites only makes sense when every site has its own real, useful content. Many domains filled with thin or near-copied pages are a risk under Google's spam policies, and they help nobody who lands on them. That is why Promo Hub has similarity audits that compare texts word by word and can also compare them by meaning, so repeated pages can be found and rewritten. The platform is a way to run many good sites efficiently, not a way to manipulate rankings. We cover the wider rules in our technical SEO checklist for a new website and in SEO for multilingual websites with hreflang.
What the operator sees and what a site owner sees
A platform has two kinds of users, and mixing them up causes trouble. Promo Hub has two separate Filament panels. The operator panel manages everything across the network: sites, posts, tags, FAQs, leads, comments, content archetypes, AI prompt settings and similarity audits. The site panel gives the owner of one site a smaller set: their own posts, FAQs, tags, leads and comments, and nothing that belongs to another site.
The split keeps powerful tools away from people who do not need them, and it keeps the site owner's screen simple. Shared protections against abuse cover every site, so one owner does not have to configure them.
What a multi-site platform costs in engineering discipline
When one bug can reach every site, the safety net has to be stronger than on a single website. These are the habits that make it work in Promo Hub:
- Tests. The repository contains more than 1,600 automated tests, covering tenant resolution, provisioning, cloning, backup archives, AI jobs and the panels.
- Queues. Provisioning, translation and AI work run as background jobs, monitored with Laravel Horizon, so a slow external service never blocks a page.
- Idempotency. An AI job checks whether its item is already done before it calls the AI service, so a retry costs nothing.
- Correct counters. Batch progress counters are updated inside database row locks, so parallel workers cannot overwrite each other's numbers.
- Cost limits. A circuit breaker counts how many jobs a batch has run and stops it when that count goes far past what the batch size allows, so a runaway loop cannot keep spending money.
- Builds. Each site has its own front-end bundle, built with Vite and Tailwind CSS, and a build script compiles them in parallel.
None of this is visible to a visitor. All of it is what lets one small team change a platform with many sites without fear.
When you should not build a multi-site platform
Most organisations do not need one. Before you commission it, answer these questions:
- Will you run more than a handful of sites, and will that number grow? With three sites, three ordinary installations are cheaper and simpler.
- Do the sites share most of their structure? If each one is a unique project, there is little to share.
- Do you need only a page builder for an agency? An existing multisite CMS or website builder will serve you better than custom code.
- Can every site have genuinely useful, distinct content? If not, more domains add risk, not value.
- Will someone own the platform after launch, with tests and monitoring? A shared codebase without that care becomes a shared liability.
If you answered yes to the first, second, fourth and fifth, a platform is worth a serious look.
What to do next
If you are weighing a platform like this, start by listing your sites, what they share and what must differ. That list decides the data model, the panels and the cost far more than any technology choice. You can see how we describe the result on the Promo Hub platform case study and on the Promo Hub service website.
Search visibility should be planned with the architecture, not added later, which is where our SEO services come in. To see how we plan and build systems like this, read about our web application development. When you are ready, write to us about your project and a person will reply.