Skip to main content

New series: how one WordPress checkbox cost a site 7 months of Google traffic, and the full rescue in 21 lessons. Read the series

Glossary term

TLS handshake

Updated Nov 18, 2026

In short

The opening exchange between a browser and a server in which they agree on encryption settings, verify the server's identity and create the keys that protect the connection before any page data is sent.

The TLS handshake is the short conversation a browser and a server have before they exchange any real content over HTTPS. Transport Layer Security (TLS) is the protocol that encrypts the connection, and the handshake is how both sides get ready to use it.

During the handshake, the browser and server agree on which version of TLS and which encryption methods to use. The server proves its identity by presenting a certificate, which the browser checks against the certificate authorities it trusts. The two sides then work out shared secret keys, which are used to encrypt everything that follows. Only after this finishes does the browser send its actual request, such as asking for a page.

It matters for performance because the handshake takes network round trips, and each round trip costs time, especially on slow or distant connections. Newer versions of TLS need fewer round trips than older ones, and a browser that has connected to the same server recently can often resume a session more quickly. The cost is paid once per new connection, so a page that pulls fonts, scripts or images from many different domains pays it for each one.

A common confusion is mixing it up with the DNS lookup, which comes earlier and only finds the server's address. Another is assuming a certificate problem is a code bug: if the certificate is expired or does not match the domain, the handshake fails and the visitor sees a security warning instead of your page.

An example: a page loads a font from another domain. Before the first byte of the font arrives, the browser must look up the domain, open a connection and complete the TLS handshake. Hints such as dns-prefetch let the browser start part of that work early.