What is an SSL handshake?
An SSL handshake, now properly called a TLS handshake, is the short exchange a browser and a server carry out before any page data moves over HTTPS. In a few messages the two sides agree which TLS version and cipher to use, the server proves its identity with a certificate, and both derive fresh session keys that nobody watching the network can work out. Only after both sides send a Finished message does encrypted application data flow.
When the handshake works, you see a padlock and never think about it. When it fails, the browser shows errors such as ERR_SSL_PROTOCOL_ERROR or a certificate warning, and the page never loads.
Quick checklist when a handshake fails
- Is the certificate in date? Check the expiry and the device clock.
- Does the certificate name match the exact hostname, including
www? - Is the server sending the full chain, including the intermediate certificate?
- Does the server accept TLS 1.2 or 1.3, with a cipher the client also supports?
- Is the client sending SNI, and does the server have a certificate for that name?
- Is the domain actually resolving to the server you think it is?
- Test from outside with
openssl s_clientandcurl -vbefore changing anything.
SSL vs TLS: which name is correct?
SSL (Secure Sockets Layer) was the original protocol from the 1990s. Its successor was renamed TLS (Transport Layer Security), and every SSL version is now broken and formally retired: SSL 2.0 by RFC 6176 and SSL 3.0 by RFC 7568. TLS 1.0 and 1.1 were deprecated in 2021 by RFC 8996. The versions in use today are TLS 1.2 (RFC 5246) and TLS 1.3 (RFC 8446).
So what is TLS? It is the current protocol that encrypts and authenticates a connection between two programs, most often a browser and a web server. People still say "SSL certificate" and "SSL handshake" out of habit, but what actually runs is TLS. A certificate is not tied to a protocol version, so the same certificate works with TLS 1.2 and 1.3.
What is HTTPS, and the difference between HTTP and HTTPS
HTTP is the protocol your browser uses to request pages. On its own it travels as plain text, usually on port 80, so anyone on the path (a public Wi-Fi network, a compromised router) can read or alter it. HTTPS is the same HTTP carried inside a TLS connection, normally on port 443.
| HTTP | HTTPS | |
|---|---|---|
| Default port | 80 | 443 |
| Encryption | None | TLS encrypts requests and responses |
| Server identity | Not checked | Proved by a certificate |
| Tampering | Undetected | Detected and rejected |
| Browser display | "Not secure" warning | Padlock or neutral icon |
The handshake is the step that turns a plain TCP connection into an HTTPS one.
What a certificate and a CA do
A TLS certificate binds a public key to one or more hostnames. It is signed by a certificate authority (CA) that your browser or operating system already trusts. During the handshake the server sends its certificate, usually followed by one or more intermediate certificates, and the client builds a chain from the server's certificate up to a trusted root.
The client then checks three things: the chain ends at a trusted root, the current date falls inside the validity period, and the hostname it asked for appears in the certificate's Subject Alternative Name list. The server must also prove it holds the private key for that certificate. If any check fails, the handshake stops.
Let's Encrypt, the free CA most hosts use, issues domain-validated (DV) certificates that are valid for 90 days by default. Let's Encrypt has announced that it will cut the default lifetime to 45 days by February 2028, so automatic renewal matters more each year.
The TLS 1.3 handshake, step by step
TLS 1.3 completes a full handshake in one round trip (1-RTT): the client sends one flight, the server answers, and the client can send its request straight after.
- ClientHello. The client lists the TLS versions and cipher suites it supports, a random value, the hostname it wants (the
server_nameor SNI extension), and akey_share: its half of an elliptic-curve Diffie-Hellman exchange for the groups it guesses the server will accept. - ServerHello. The server picks the version and cipher suite and returns its own
key_share. Both sides can now compute the same shared secret. If the client guessed the wrong group, the server sends a HelloRetryRequest instead, and this costs one extra round trip. - EncryptedExtensions, Certificate, CertificateVerify. From here on, every handshake message is encrypted. The server sends its certificate chain and a signature over the handshake so far, proving it holds the private key.
- Finished. The server sends a Finished message, a keyed checksum of the whole handshake. The client verifies the certificate and signature, sends its own Finished, and the HTTP request follows immediately.
TLS 1.3 also removed static RSA and static Diffie-Hellman key exchange, so every full handshake uses ephemeral (EC)DHE keys and has forward secrecy: a private key stolen later cannot decrypt traffic recorded earlier.
Session resumption and the 0-RTT caveat
After a first connection, the server can give the client a pre-shared key (PSK) ticket. On the next visit the client presents it and the handshake skips the certificate step. TLS 1.3 also allows 0-RTT early data, where the client sends its first request with the ClientHello. It is faster, but RFC 8446 states that early data has no protection against replay between connections and is not forward secret. Only allow 0-RTT for requests that are safe to repeat, such as a plain GET, never for a payment or a form submission.
How the TLS 1.2 handshake differs
A full TLS 1.2 handshake takes two round trips. After the ClientHello, the server answers in one flight with ServerHello (the chosen version and cipher), Certificate, ServerKeyExchange (sent for ECDHE and DHE ciphers) and ServerHelloDone, all in the clear; the client replies with ClientKeyExchange, ChangeCipherSpec and Finished; and the server sends its own ChangeCipherSpec and Finished. The certificate travels unencrypted, and older cipher suites without forward secrecy, such as static RSA key exchange, are still possible unless you disable them. Resumption, which cuts the handshake to one round trip, uses session IDs or session tickets, which TLS 1.3 replaced with PSKs.
SSL handshake failed: common causes
| Cause | What you see | Fix |
|---|---|---|
| Expired certificate | NET::ERR_CERT_DATE_INVALID, "certificate has expired" | Renew it and check that automatic renewal runs |
| Hostname mismatch | ERR_CERT_COMMON_NAME_INVALID | Issue a certificate that covers every name, including www |
| Missing intermediate | Works in one browser, fails in curl or on mobile | Serve the full chain file, not the leaf certificate alone |
| Protocol or cipher mismatch | ERR_SSL_VERSION_OR_CIPHER_MISMATCH, handshake failure alert | Enable TLS 1.2 and 1.3 with modern ciphers on both sides |
| SNI problems | Wrong site's certificate is returned | Make sure the client sends SNI and the server has a block for that name |
| Clock skew | Valid certificate shown as expired or "not yet valid" | Correct the device's date, time and time zone |
A plain-HTTP service on port 443, or a firewall or proxy that interferes with TLS, also breaks the handshake. For browser-specific fixes, see ERR_SSL_PROTOCOL_ERROR: causes and fixes and NET::ERR_CERT_DATE_INVALID.
How to test a TLS handshake
Test from a terminal so you see the server's answer without browser caching. With OpenSSL, connect and force TLS 1.3:
openssl s_client -connect example.com:443 -servername example.com -verify_hostname example.com -tls1_3 </dev/null
-servername sets the SNI value; pass it so you test the certificate visitors receive. -verify_hostname makes OpenSSL check the name as well, because without it Verify return code: 0 (ok) only means the chain is trusted, not that the certificate covers your hostname. In the output, look at the certificate chain, Verify return code: 0 (ok), and the negotiated protocol and cipher. Swap -tls1_3 for -tls1_2 to check the older version. Add -showcerts to print every certificate the server sends, which shows a missing intermediate at once. The -tls1_3 option needs OpenSSL 1.1.1 or later. To read the dates and names on the certificate:
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates -ext subjectAltName
With curl, the verbose flag prints the handshake and the certificate check:
curl -v https://example.com/ -o /dev/null
Look for the line naming the TLS version and cipher, then the server certificate's subject, expiry date and issuer. curl verifies the chain by default, so a missing intermediate or a name mismatch appears as an error here even when a desktop browser hides it. If the hostname does not resolve to your server at all, fix DNS first: point a domain to a VPS covers A records and a Certbot certificate.
SSL and TLS on Bigdomainhost
On Web & cPanel hosting and WordPress hosting, a Let's Encrypt certificate is issued automatically for every domain and subdomain on the account and renews without any action from you. As the SSL documentation explains, issuance needs the domain to resolve to the server first, renewal happens 30 days before expiry, and a CAA record that leaves out the issuer blocks it. You can check status under cPanel, SSL/TLS Status. Paid DV, OV, EV and wildcard certificates are available if you need them.
On a KVM VPS you manage the web server yourself, so you install and renew the certificate yourself, for example with Certbot, and choose the TLS versions in your Nginx or Apache configuration. For help, call +91 75994 50220 during IST hours, WhatsApp the same number at any time, or email support@bigdomainhost.com.
Sources (checked )
- IETF RFC Editor: RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3
- IETF RFC Editor: RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2
- IETF RFC Editor: RFC 8996: Deprecating TLS 1.0 and TLS 1.1
- MDN Web Docs: Transport Layer Security (TLS)
- Let's Encrypt: FAQ: certificate lifetime and validation
- Let's Encrypt: Certificate lifetime rationale and plans
- OpenSSL Documentation: openssl-s_client(1)