
However, when using HTTPS, the TLS handshake happens before the server sees any HTTP headers. To achieve this, the server uses a hostname presented by the client as part of the protocol (for HTTP the name is presented in the host header). Name-based virtual hosting allows multiple DNS hostnames to be hosted by a single server (usually a web server) on the same IP address.

Such "unified communications certificates" must be reissued every time the list of domains changes. It is possible to use subjectAltName to contain multiple domains controlled by one person in a single certificate. A server that is responsible for multiple hostnames is likely to need to present a different certificate for each name (or small group of names). However, it may be hard – or even impossible due to lack of a full list of all names in advance – to obtain a single certificate that covers all names a server will be responsible for. However, some applications allow the user to bypass the warning to proceed with the connection, with the user taking on the responsibility of trusting the certificate and, by extension, the connection. If a match is not found, the user may be warned of the discrepancy and the connection may abort as the mismatch may indicate an attempted man-in-the-middle attack. If a match occurs, the connection proceeds as normal. Once the server sends the certificate, the client examines it and compares the name it was trying to connect to with the name(s) included in the certificate. In more detail, when making a TLS connection, the client requests a digital certificate from the web server. Hence, if one physical server hosts multiple sites, the server has no way to know which certificate to use in the TLS protocol.

Prior to SNI, when making a TLS connection, the client had no way to specify which site it is trying to connect to.
