Rank #1 on Google Maps
India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Türkiye Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Somalia English
Canada English
Canada Français
Netherlands Nederlands

How to Host Multiple Websites on a Dedicated Server

Buy domains, business emails, hosting, VPS and more: Get Started

Cheapest Domains in Kenya

Get your .Co.ke or .Com domain now for just 299.00 KES (Back to 1200 in 7 days)

.CO.KE for 299.00 KES | .COM for 999.00 KES

Yes, One Dedicated Server Can Run Several Websites. You just set up a dedicated server for one site, and now a second project needs a home.

Maybe a client asked for a new site, or your own business grew past a single domain. Either way, you are staring at one server, wondering where to start.

The good news: a dedicated server was built for exactly this. You get the full resources of one machine, not a slice shared with strangers.

That capacity comfortably splits across many sites when you set things up the right way.

There are three main paths to get there. A control panel like cPanel and WHM gives you a graphical way to manage every site from one dashboard.

Manual virtual host setup on Apache or Nginx skips the panel and gives full control from the command line. Docker containers isolate each site in its own environment, which suits teams already running containerized apps.

This guide walks through all three. The control panel route gets the most detailed treatment, since most Truehost dedicated server users start there. The manual and container methods follow, with clear notes on who each one fits best.

Three Ways to Host Multiple Websites on One Server

Before touching any config file, it helps to know your options. Each method handles multiple domains on one server differently, and picking the right one saves headaches later.

1) Name-Based Virtual Hosting

how the Apache virtual host selection process into three main steps

Name-based virtual hosting lets one IP address serve several domains at once.

The web server reads the host header sent by the visitor’s browser and routes the request to the right site.

This method needs no extra IP addresses, so it keeps costs down. For most Truehost dedicated server customers, this is the default choice.

2) IP-Based Virtual Hosting

IP-based hosting gives each domain its own dedicated IP address on the server.

Some older SSL setups need this, since they cannot read the host header before choosing a certificate.

A handful of compliance rules also call for separate IPs per site. The downside is cost, since extra IP addresses on a dedicated plan add up quickly.

3) Port-Based Virtual Hosting

Port-based hosting separates sites by TCP port number instead of domain name or IP. Visitors have to type a port number into the browser to reach the site.

That requirement makes it a rare choice for production hosting. Most guides only mention it for completeness.

MethodBest ForExtra CostSetup Difficulty
Name-basedMost sites share one serverLowEasy
IP-basedSites needing dedicated SSL or complianceHigher (extra IPs)Moderate
Port-basedRare, internal, or testing useLowEasy

Before You Start: Prep Steps Most Guides Skip

Two checks save a lot of frustration before you create a single account or write one config line.

I) Confirm DNS Points to Your Server First

Check the domain’s A record before touching WHM or any config file. Run dig +short yourdomain.com from a terminal and compare the result to your server’s public IP.

If the two do not match, fix DNS first, since nothing else will work until they do. Tools like whatsmydns show how propagation looks across different regions.

This step counts double for Truehost’s audience. Readers span Kenya, Nigeria, Pakistan, South Africa, the UAE, and Tanzania, where resolver speeds vary.

II) Open the Right Firewall Ports

Open ports 80 and 443 on your server firewall before adding any site. Tools like CSF, iptables, or your cloud provider’s security group all handle this.

Port 80 needs to stay open even on sites that redirect everything to HTTPS. SSL validation depends on that port, so blocking it breaks certificate issuance later.

Method 1: Setting Up Multiple Websites with cPanel/WHM

cPanel and WHM give you a graphical way to manage every site from one login. Here is how to add a new site the right way.

I) Creating a Separate cPanel Account for Each Website

Log in to WHM and select Create a New Account. Set up a separate cPanel account for each website you add.

This gives every site its own username, isolated file structure, and separate resource limits.

Assign disk space and bandwidth limits that fit the site’s expected traffic. Keeping accounts separate also protects one client’s site if another gets compromised.

II) Pointing Domains to Your Dedicated Server

Point your domain to a web site by pointing to an IP Address, or forward to another site, or point to a temporary page (known as Parking), and more. These records are also known as sub-domains.

Log in to your domain registrar and create an A record for each domain. Point that record to your server’s public IP address.

If you want full DNS control inside WHM, delegate the domain’s nameservers to your server instead. Either path gets visitors to the right place once DNS finishes updating.

III) Issuing SSL Certificates for Each Domain

An SSL certificate allows visitors to communicate with your websites over secure connections—for example, to submit credit card payment information.

WHM’s AutoSSL feature issues free certificates for every domain on the server. Go to SSL/TLS Status in WHM and run AutoSSL for the new domain.

If the site sits behind Cloudflare or another proxy, pause the proxy during the first issuance.

Cloudflare’s proxy can block the HTTP validation request that AutoSSL depends on. Once the certificate is issued, you can turn the proxy back on.

IV) Setting Resource Limits to Stop One Site From Hogging the Server

WHM lets you build custom packages with set CPU, memory, and disk limits.

Apply the same package across similar sites for consistent behavior. Without limits, one busy site can slow down every other site on the server. A few minutes spent here saves hours of troubleshooting later.

V) Setting the Correct PHP Version Per Site

Different sites on the same server often need different PHP versions. Open MultiPHP Manager in WHM and assign a version to each domain.

This keeps an older WordPress install running next to a newer custom application. No single PHP version has to work for every site.

Method 2: Manual Virtual Host Setup Without a Control Panel (Apache/Nginx)

This path skips the graphical panel entirely. It suits developers who prefer the command line and want full control over server config.

I) Creating Document Root Directories for Each Site

Create a folder for each website’s files on your server. On Apache systems, this usually lives under /var/www/html/yourdomain.com.

On Nginx, the default folder sits at /usr/share/nginx/html, though many admins move it to /var/www/ instead.

Set ownership with a command like chown -R www-data:www-data on the new folder.

II) Writing the Virtual Host or Server Block Config

Apache uses a VirtualHost block inside a file under /etc/apache2/sites-available/.

Nginx uses a server block inside a file under /etc/nginx/sites-available/.

Each block needs the domain name, the document root, and the log file paths. Keep one file per domain, since this makes troubleshooting far easier later.

III) Enabling the Site and Reloading the Web Server

Writing the config file is not enough on its own. On Apache, run a2ensite followed by the file name to enable the new site.

Skipping this step is the top reason a new site fails to load. Before reloading, check the config with apachectl -S on Apache or nginx -t on Nginx.

This catches typos before they take every site on the server down. Once the check passes, reload the web server to apply the change.

Method 3: Using Docker to Isolate Multiple Websites on One Server

Docker takes a different approach entirely. Each website runs inside its own container, separate from every other site on the server.

Why Containers Beat Shared File Systems for Multi-Site Isolation

Each container packages its own code, dependencies, and runtime version. A change to one site’s environment cannot affect any other container.

This isolation makes Docker a strong fit for teams running many different applications on shared hardware.

Setting Up a Reverse Proxy (Nginx Proxy Manager or Traefik)

Replaced Nginx Proxy Manager with Traefik

A reverse proxy like Nginx Proxy Manager or Traefik routes incoming traffic to the right container.

Visitors hit the server on one IP, and the proxy reads the requested domain. It then forwards the request to the matching container automatically.

This setup fits teams already comfortable running containerized apps day to day. Casual multi-site hosting usually does not need this extra layer.

How Many Websites Can Your Dedicated Server Actually Handle?

The honest answer depends on your server’s specs and the type of sites you run. CPU cores, RAM, and storage all set the real limit, not some fixed number. Static sites use very little in the way of resources.

WordPress sites need more RAM, especially with several active plugins. E-commerce sites with databases and heavy traffic need the most resources of the three.

As a rough guide, a mid-tier dedicated plan can comfortably run 15 to 20 moderate-traffic WordPress sites. That number drops if any single site sees heavy spikes or runs a large database.

Watch for warning signs that a server is overloaded. Slow load times across every site on the server point to a resource problem. High load averages in WHM or top point in the same direction.

Memory swapping happens when the server borrows disk space to act as RAM. That signals it is time to upgrade or trim the number of sites.

Common Mistakes When Running Multiple Sites on One Server

A few mistakes show up again and again on shared dedicated servers.

  • Skipping resource limits lets one site consume shared RAM or CPU without warning.
  • Reusing the same cPanel account for unrelated client sites opens a real security gap. Each client can see the other’s files this way.
  • Forgetting to set the right PHP version per site breaks older applications that need an outdated version.
  • Skipping individual backups per domain means one bad update can wipe out months of work with no way back.

Troubleshooting: Fixing the Most Common Multi-Site Setup Problems

Even a careful setup runs into problems sometimes. Here is how to fix the ones that come up most often.

1) A New Site Shows the Default Server Page or Someone Else’s Site

This almost always means the virtual host block was never enabled, or the ServerName does not match the requested domain.

Run apachectl -S on Apache or nginx -T on Nginx to list every active virtual host.

Check that the new domain appears in that list with the right document root. If it is missing, go back and confirm the site was actually enabled.

2) SSL Certificate Won’t Issue for a New Domain

Three causes explain most SSL failures on a new domain. DNS might not point to the server yet, so double-check the A record first.

The firewall might block port 80, which HTTP validation needs to complete.

A proxy like Cloudflare might also intercept the validation request before it reaches your server. On cPanel servers, check /var/log/cpanel/autossl.log for the exact rejection reason.

3) One Website Is Slowing Down All the Others

This almost always traces back to missing resource limits on the busy site’s account or container. Check server load averages and per-account resource use inside WHM.

If one account shows unusually high CPU or memory use, apply a package with tighter limits. This stops one site’s traffic spike from dragging down every other site.

4) A Domain Won’t Resolve to the Server At All

Run dig +short yourdomain.com and compare the result to your server’s actual public IP. A mismatch means the A record still needs updating at the registrar.

If you just changed nameservers, give it up to 48 hours to finish propagating. Patience here saves a lot of wasted troubleshooting on a domain that simply has not caught up yet.

FAQs

Can I host multiple websites without a control panel?

Is it better to use one cPanel account or separate accounts per site?

Is hosting multiple sites on one dedicated server secure?

Can I use Docker to host multiple websites on a dedicated server?

What happens if one website uses too many server resources?

Get Your Dedicated Server Ready for Multiple Websites

Running several sites on one dedicated server comes down to two things. Pick the right method and set real limits from day one.

A control panel suits most readers. Manual virtual hosts suit developers who want full control. Docker suits teams already running containers.

Before adding a second or third site, check your current plan. Confirm it has the CPU, RAM, and storage to support the load.

Truehost’s dedicated server plans come in several specs built for exactly this kind of growth.

Compare the options and pick a plan sized for the number of sites you actually plan to run.

Truehost website builder home cta

Elias N
Author

Elias N

SEO Expert Nairobi, KEN

SEO nerd by trade. Obsessing over keywords, content, and why Google does what it does.

View All Posts