How should I host multiple websites on a dedicated server?
A dedicated server can host multiple websites when capacity and isolation are designed for their combined workload. Web-server virtual hosts route names to the right site, but they do not by themselves isolate application permissions. Plan routing, runtime identities and resource use together.
Before you start
- An inventory of domains, application runtimes, customer ownership and expected peak traffic.
Instructions
1. Define each site’s boundary
Assign the domain names, document root, application account, database credentials and runtime configuration. Avoid giving unrelated sites one unrestricted filesystem identity. For PHP applications, use appropriately separated pools or another supported isolation mechanism where required, with limits suited to each workload.
2. Plan name and TLS routing
Configure the correct server names, default-host behaviour and certificate coverage using the chosen web server’s supported configuration. Test each hostname against the intended endpoint, including unknown-host behaviour. Keep administrative panels and private application ports restricted to the required access path.
3. Validate shared capacity and changes
Measure combined CPU, memory, storage and connection use during realistic peaks. Include scheduled jobs and database load. Test web-server configuration before any approved reload and check all affected sites afterward, since a shared service can apply changes for more than one website at once. Keep recovery and deployment scope identifiable per application.
Check the result
- Every hostname reaches the intended site and certificate, with no unintended cross-site file access.
- Combined peak demand fits the server and its runtime limits.
Troubleshooting
- One site displays another site’s content
- Check the requested hostname, virtual-host matching order, default host and proxy routing. Do not change unrelated document-root permissions to repair a routing mismatch.
Official references
Use the documentation for your installed version when a flag, service name or platform feature differs.
