TYPO3 Multi-Domain Setup: One Installation, Many Sites

Run multiple websites from a single TYPO3 installation. Follow an HTTP request from DNS and Apache virtual hosts through to TYPO3 site configuration.

Overview

  • DNS resolves domains to IP addresses and forms the global routing foundation for multi-domain setups.
  • Apache Virtual Hosts route incoming traffic to the correct TYPO3 site based on the Host header.
  • TYPO3 Site Management handles any number of domains via a single installation with its own configuration per site.
  • An HTTP request travels through the browser, DNS, Apache and TYPO3 — this article walks through every step of the journey.

Introduction  

You are facing a challenge familiar to many companies: managing several digital presences from one place — the main website, product pages, event microsites and more. The good news is that with TYPO3 this is not only possible but remarkably efficient.

A TYPO3 multi-domain setup means one installation, unlimited possibilities. You cut hosting costs, reduce maintenance and keep full control over your digital infrastructure.

In this guide, we follow an HTTP request on its journey through the system, from the moment you type a URL to the final content delivery. You will come away understanding not just how the configuration works, but more importantly why.

Table of Contents  


Part 1: The Anatomy of a URL – What Your Browser Actually Sends  

Before we configure any servers, we need to understand the language of the web. Every web request begins with a URL, so let's look at what actually happens in the address bar.

URL Components in Detail  

Let's pull a complex URL apart:

URL Anatomy: What is processed where?

Important to understand

The fragment (#absatz3) never leaves your browser. The browser sends all other components as an HTTP request to the server. The server only sees: GET /folder1/folder2/datei.html HTTP/1.1 with the Host header myserver.at.

The Request Journey at a Glance  

Before we dive into the details, here is the overall process at a glance:

The complete request lifecycle

Let's examine each phase in detail.


Part 2: DNS – The Global Address Book of the Internet  

DNS (Domain Name System) is the foundation of all web communication. Browsers only understand IP addresses, so DNS translates human-readable domain names into machine-readable IPs.

A-Record vs CNAME Record: The Crucial Choice  

Multi-domain setups rely on two DNS record types, and the choice between them has a major impact on performance and functionality:

FeatureA-RecordCNAME-Record
Points toIP address (123.45.67.89)Another domain name
DNS-Lookups1x (optimal)2x+ (slower)
Performance★★★★★ Best★★★☆☆ Delayed
For primary domain
Combinable with MX records
Recommended for multi-domain
Avoiding CNAME Errors

Critical: a primary domain (e.g. firma-a.de) must not have a CNAME if you need MX records for email. The DNS standards forbid this combination, and your email delivery would fail completely!

DNS Configuration: Practical Implementation  

For our multi-domain setup with firma-a.de and projekt-b.com, you need the following DNS records:

Optimal configuration for multi-domain:

Advantages:
Minimal DNS lookup time (single query)
Compatible with MX/TXT/SPF records
No DNS chain dependencies
Best performance

Performance Tip

Set the TTL (Time to Live) to 3600 seconds (1 hour) on production systems. Ahead of a planned change, drop it to 300 seconds (5 minutes) 24 hours in advance so the update propagates faster.

Understanding DNS Propagation  

DNS changes are not visible worldwide straight away. Here is what happens:

DNS Record Change

You update an A-record with your DNS provider. The authoritative nameserver picks up the change immediately.

ISP Cache Refresh

DNS resolvers of Internet Service Providers update their caches based on TTL values.

Global Propagation

Most DNS servers worldwide now hold the new record, though some regional differences may remain.

Complete Propagation

All DNS servers have updated records. Old caches have expired.
Testing Propagation

Use tools such as DNS Checker, Google Admin Toolbox Dig or the dig command-line tool to check global DNS propagation:

Web-based tools:

Google Admin Toolbox Dig Interface

The Google Admin Toolbox Dig runs DNS lookups directly in the browser, which is ideal for a quick check when you have no terminal to hand.


CLI-Tool:


Part 3: Apache Virtual Host – The Intelligent Traffic Director  

DNS has handed over the IP address, and now Apache receives the HTTP request. Its job is to route requests for hundreds of potential domains to the right directories.

Virtual Hosts: One Server, Many Websites  

Think of Apache as the reception desk of an office building. The IP address is the street address, and the Host header in every HTTP request is like the company name on the envelope. Apache checks its configuration and sends the request to the right 'office' (DocumentRoot).

Apache request routing via Host header

Name-Based Virtual Hosts: The Configuration  

Name-based virtual hosts let you run multiple websites on a single IP address, distinguished only by the domain name in the HTTP header.

File: /etc/apache2/sites-available/typo3-multisite.conf

The three most important directives explained:

ServerName: the primary domain for this virtual host

  • Defines the primary domain that Apache ties to this virtual host
  • Acts as a fallback when no exact domain match is found
  • Example: ServerName www.firma-a.de
  • Apache also uses it for redirects and self-referential URLs
  • If a request arrives with no Host header or an invalid one, the first virtual host with a matching ServerName takes over

ServerAlias: additional domain names for the same website

  • Lets several alternative domains point at the same virtual host
  • Perfect for www variants or multiple domain names for one website
  • Example: ServerAlias firma-a.de www.projekt-b.com projekt-b.com
  • Domains are separated by spaces
  • Apache checks ServerName first, then ServerAlias, and the first match wins
  • Wildcards are allowed: ServerAlias *.firma-a.de (for all subdomains)

DocumentRoot: the file-system path to the website files

  • The absolute path on the server where the website files live
  • Example: DocumentRoot /var/www/typo3
  • Apache serves every matching request from this directory
  • It looks for the requested file relative to this path
  • For TYPO3, this is where the index.php that handles all requests sits
  • Important: this must be an existing directory that Apache can read

How it works in practice:

  1. The browser sends a request to www.projekt-b.com
  2. Apache receives it and reads the Host: www.projekt-b.com header
  3. Apache searches every virtual host for a ServerName or ServerAlias of www.projekt-b.com
  4. Match found! → Apache uses the configured DocumentRoot /var/www/typo3
  5. All further file access happens relative to /var/www/typo3
Common Error: AllowOverride None

If AllowOverride None is set, Apache ignores TYPO3's .htaccess. Symptom: 404 errors on every page except the homepage. Solution: set AllowOverride All.

Multi-Domain with Separate DocumentRoots  

Sometimes you want a separate TYPO3 installation per domain. Here is the more advanced configuration:

When to use separate DocumentRoots?
  • Single installation: Shared hosting, shared extensions, central maintenance
  • Separate installations: Completely isolated projects, different TYPO3 versions, separate teams

Part 4: TYPO3 Site Management – The Content Engine  

Apache has forwarded the request, and now TYPO3 takes over. The CMS has one decision to make: which website should it serve for this domain?

The Foundation: The TYPO3 Page Tree  

TYPO3 keeps all content in a hierarchical page tree. Every independent website needs its own root page.

TYPO3 Multi-Site Page Tree Structure

Site Management Module: Modern Configuration  

Since TYPO3 v9, the Site Management module has replaced the old, complex TypoScript configuration. It defines entry points: the link between a domain and a root page.

Create Root Pages

Create a root page in the page tree for each website. Under "Page properties → Behaviour", tick "Use as Root Page".

Open Site Management

Go to "Sites → Setup". The module lists every root page that does not yet have a site configuration.

Create Site Configuration

Click "Add new site configuration" on the first root page and assign a unique site identifier (e.g. "company_a").

Define Entry Point

The crucial step: enter the full domain under "Entry Point" — https://www.firma-a.de/ — this is what ties it all together!

Configure Languages

Add at least one language (e.g. German with locale "de_DE.UTF-8") and set its entry point to "/".

Repeat for Additional Sites

Repeat steps 3 to 5 for every additional domain and root page, each with its own entry point.

The config.yaml in Detail  

TYPO3 stores every site configuration as a YAML file. Here is the structure for our Company A site:

Key Concepts:
rootPageId: The Page UID of the root page
base: the entry point — TYPO3 matches incoming HTTP requests against this value
languages: Multi-language support
errorHandling: Custom error pages
routes: Static routes (robots.txt, sitemap.xml)

Version Control for Site Configs

The config.yaml files should be version-controlled (Git). This allows you to:

  • Track changes
  • Perform rollbacks
  • Synchronise configs across environments (Dev → Staging → Prod)
  • Conduct code reviews for infrastructure changes

TYPO3 Request Matching: The Algorithm  

Here is how TYPO3 decides which site is responsible for a given request:

TYPO3 Site Resolution Flow

Important: TYPO3 checks both base and baseVariants, and the first matching configuration wins. If more than one matches, the alphabetically first config.yaml takes precedence.


Part 5: The Complete Request Journey – End-to-End  

Let's trace a complete request for www.projekt-b.com through every layer:

End-to-End Request Journey for www.projekt-b.com

Request Details: The HTTP Headers  

What does the browser actually send? Let's look at the real HTTP headers:

HTTP request from the browser:

Important for routing:
Host: www.projekt-b.com — Apache and TYPO3 use this header for domain matching
Accept-Language: the browser's language preference (TYPO3 can respond to it)
Accept-Encoding: lets the server compress the response (gzip)

Troubleshooting: Common Errors  

Most Common Error: Forgetting the Trailing Slash

The base value in the TYPO3 config.yaml must end with /:

base: 'https://www.firma-a.de/'
base: 'https://www.firma-a.de'

Without the trailing slash, domain matching simply will not work!


Conclusion: Your Digital Infrastructure – Scalable and Future-Proof  

You have now seen the full architecture of a TYPO3 multi-domain setup. From the DNS layer and Apache virtual host through to the TYPO3 site configuration, you understand how the individual pieces fit together.

What You Have Achieved  

Performance

Optimal DNS configuration using A-records for minimal latency. No CNAME chains, just direct IP routing, so your sites load quickly worldwide.

Cost Efficiency

A single TYPO3 installation for any number of domains. Lower hosting costs, shared extension management and central maintenance and updates.

Maintainability

Central management of every website. One update, one backup, one monitoring setup. Your DevOps team will thank you.

Security

SSL/TLS configuration for every domain, with HSTS, security headers and modern TLS ciphers. Your visitors stay protected.

Scalability

Unlimited expansion: add new domains in minutes, with no more drawn-out migration projects. Your infrastructure grows with your business.

Flexibility

Per-site configuration: its own languages, templates and extensions, all controlled from one central installation.

The Three Layers at a Glance  

The three architectural layers interacting

Your Next Steps  

Configure DNS

Create A-records for every domain with a TTL of 3600 seconds, then allow 24 to 48 hours for full propagation.

Set up Apache Virtual Host

Create the virtual host configuration with ServerName and ServerAlias, enable SSL with Let's Encrypt, and test with curl.

Configure TYPO3 Sites

Create root pages in the page tree, configure the entry points in Site Management, and test each domain in the browser.

Monitoring & Optimisation

Set up uptime monitoring, configure log rotation, and tune Apache performance (mod_cache, HTTP/2).

Best Practices for Production Operation  

Production Checklist

DNS:

  • A-records for all domains and www subdomains
  • TTL to 3600 seconds (1 hour)
  • CAA records for SSL providers (Let's Encrypt)
  • SPF/DKIM/DMARC for email domains

Apache:

  • SSL/TLS with automatic renewal (certbot)
  • HTTP/2 enabled (a2enmod http2)
  • Gzip/Brotli compression (a2enmod deflate)
  • Security headers (HSTS, X-Frame-Options, CSP)
  • Log rotation configured

TYPO3:

  • Site configs version-controlled (Git)
  • Separate config.yaml per site
  • baseVariants for staging/dev
  • Error handling with custom pages
  • robots.txt & sitemap.xml per site
  • Multi-language configured

Monitoring:

  • Uptime checks for all domains (e.g., UptimeRobot)
  • SSL certificate expiry alerts
  • DNS monitoring (e.g., DNSPerf)
  • Apache logs aggregated (e.g., ELK Stack)
  • Centralised TYPO3 error logging

Support & Further Resources  

Official Documentation:

Tools:

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.