ssl-guides 2026-12-02 ⏱ 4 min read

Secure Multiple Websites on One Server

Secure Multiple Websites on One Server

Running several websites on one server is common, and HTTPS handles it well. The server needs a separate configuration block for each site, a certificate that covers each site's names and a way to renew them all. A single IP address is enough, thanks to Server Name Indication (SNI).

Multiple websites on one server: the approaches

ApproachHow it worksGood forDownside
One certificate per siteEach domain has its own certificateUnrelated sites, different ownersMore certificates to track
One multi-name (SAN) certificateOne certificate lists many namesA few related sitesOne failure affects all names
Wildcard certificateCovers *.example.comMany subdomains of one domainNeeds DNS-01, not for different domains
Reverse proxy with automatic certificatesThe proxy issues certificates itselfContainer setupsDepends on that proxy

For unrelated sites, one certificate each is the cleanest. A problem on one domain cannot block the others, and private keys stay separate. See free SSL for multiple domains for the multi-name option.

Step 1: Point DNS at the server

Each domain and www name needs an A record, and an AAAA record if the server has IPv6. Check them before requesting certificates, since a wrong record is the leading cause of failed validation.

Multiple websites on one server, step 2: virtual hosts

Create one server block per site in Nginx. SNI picks the right block by name:

server {
    listen 443 ssl;
    server_name site-a.example www.site-a.example;
    root /var/www/site-a;
    ssl_certificate
        /etc/letsencrypt/live/site-a.example/fullchain.pem;
    ssl_certificate_key
        /etc/letsencrypt/live/site-a.example/privkey.pem;
}

Copy the block for each further site and change the names and paths. Add a port 80 block per site that redirects to HTTPS while still allowing the challenge path.

Step 3: Issue the certificates

sudo certbot --nginx -d site-a.example -d www.site-a.example
sudo certbot --nginx -d site-b.example -d www.site-b.example
sudo certbot certificates

The last command lists every certificate, its names and its expiry, which gives you a handy inventory.

Step 4: Set a default server

Requests with an unknown name still get a certificate. Make that a deliberate choice by adding a default server that rejects the connection or serves a neutral page, so visitors to the bare IP do not see one of your real sites. Learn how SNI chooses in the guide Fix SSL on Nginx Proxy Manager and Caddy if a proxy sits in front.

Step 5: Renewal and reload

One client covers all sites. Certbot renews each certificate on its own schedule, and one deploy hook reloads Nginx after any renewal:

sudo certbot renew --deploy-hook "systemctl reload nginx"
sudo certbot renew --dry-run

See how to automate SSL renewal with Certbot for setting the timer.

Security and isolation

  • Keep private keys readable only by root and the service that needs them.
  • Do not share one key across unrelated sites.
  • Limit the server to modern TLS versions and use the same hardened settings for each site in an included file.
  • Run web applications under separate users where you can, so one compromised site does not expose the others.

See how to protect SSL private keys for storage advice.

Troubleshooting

SymptomLikely causeFix
Browser shows another site's certificateNo server block for that nameAdd the name to the right block
Renewal fails for only one siteDNS or redirect problem on that domainTest its challenge path and records
New site works over HTTP but not HTTPSCertificate not yet issuedRun Certbot for the new names
Old certificate still servedServer not reloadedReload Nginx or Apache

When to use a wildcard or multi-name certificate

If the sites are all subdomains of one domain, such as app.example.com and docs.example.com, a wildcard certificate reduces the number of certificates to manage. It requires a DNS challenge, and the same key then protects every subdomain, so guard it well. See how to get a free wildcard certificate. For unrelated domains, a wildcard cannot help, and separate certificates are the right choice.

Key takeaways

  • SNI lets many HTTPS sites share one IP address.
  • Give each unrelated site its own certificate and virtual host.
  • Use one ACME client with one reload hook for renewals.
  • Keep an inventory with certbot certificates and monitor expiry from outside.

Related reading: the SAN certificate, monitoring many certificates and free SSL on nginx.

Frequently Asked Questions

Can several sites share one IP address?

Yes. Server Name Indication lets the server pick a certificate from the hostname the client asked for, and every current browser supports it.

One certificate per site, or one for all?

One per name is simplest and keeps private keys apart, so a problem on one domain cannot block the others. A wildcard or multi-name certificate works when the sites are related.

How do I renew them all?

One ACME client with a deploy hook that reloads the web server. Certbot renews every certificate it issued in a single run, then runs the hook once.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ Post-Installation Verification & SEO Checklist

After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:

  • Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
  • Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
  • Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
  • Confirm both root and www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant