Interview Prep/Networking/TLS, HTTP & Application Layer

How do you serve multiple HTTPS domains on one IP?

IntermediateScenarioTLS, HTTP & Application Layer
Answer

Situation read → SNI allows the client to say which hostname it wants during the handshake.

What I'd do →

  1. Configure one server block per domain with its own certificate in Nginx server_name
  2. On an ALB attach multiple certificates to the listener, and it picks by SNI
  3. Test with openssl s_client -connect IP:443 -servername a.example.com and again with another name
  4. Use wildcard or SAN certificates to reduce certificate count

Why → SNI is sent in the ClientHello, before encryption begins.

Interview tip → Mention that very old clients without SNI get the default certificate.

All Networking questions Roadmap: Networking for DevOps

More on TLS, HTTP & Application Layer