CS FundamentalsHardGATE CS · product-company placement

Two HTTPS sites, a.example and b.example, share one IP address and port 443, each with its own certificate. How does the server know which certificate to present?

  1. A. From the Host header of the first HTTP request on the connection
  2. B. From the Server Name Indication the client sends in its TLS ClientHello
  3. C. From the DNS query, which the server sees before the TCP handshake begins
  4. D. From the client's source port, which browsers pick per site being visited

Correct answer: B. From the Server Name Indication the client sends in its TLS ClientHello

The certificate is sent during the TLS handshake, before any HTTP bytes, so the Host header is not available yet. SNI carries the hostname in the ClientHello so the server can choose. The Host header still selects the virtual host for plain HTTP.

More Computer Networks questions

Exams that ask this topic