Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

How the SSL/TLS handshake works, and how to fix it when it fails

Every HTTPS page starts with a TLS handshake that agrees on keys and checks the server's certificate. This guide walks through TLS 1.3 and 1.2 message by message and shows how to test and fix failures.

Short answer: An SSL handshake, today a TLS handshake, is the exchange that sets up an HTTPS connection. The client sends a ClientHello with its versions, ciphers and key share; the server replies, proves its identity with a certificate, and both sides derive session keys and swap Finished messages. A full TLS 1.3 handshake needs one round trip, TLS 1.2 two.

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

  1. Is the certificate in date? Check the expiry and the device clock.
  2. Does the certificate name match the exact hostname, including www?
  3. Is the server sending the full chain, including the intermediate certificate?
  4. Does the server accept TLS 1.2 or 1.3, with a cipher the client also supports?
  5. Is the client sending SNI, and does the server have a certificate for that name?
  6. Is the domain actually resolving to the server you think it is?
  7. Test from outside with openssl s_client and curl -v before 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.

HTTPHTTPS
Default port80443
EncryptionNoneTLS encrypts requests and responses
Server identityNot checkedProved by a certificate
TamperingUndetectedDetected and rejected
Browser display"Not secure" warningPadlock 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.

  1. ClientHello. The client lists the TLS versions and cipher suites it supports, a random value, the hostname it wants (the server_name or SNI extension), and a key_share: its half of an elliptic-curve Diffie-Hellman exchange for the groups it guesses the server will accept.
  2. 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.
  3. 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.
  4. 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

CauseWhat you seeFix
Expired certificateNET::ERR_CERT_DATE_INVALID, "certificate has expired"Renew it and check that automatic renewal runs
Hostname mismatchERR_CERT_COMMON_NAME_INVALIDIssue a certificate that covers every name, including www
Missing intermediateWorks in one browser, fails in curl or on mobileServe the full chain file, not the leaf certificate alone
Protocol or cipher mismatchERR_SSL_VERSION_OR_CIPHER_MISMATCH, handshake failure alertEnable TLS 1.2 and 1.3 with modern ciphers on both sides
SNI problemsWrong site's certificate is returnedMake sure the client sends SNI and the server has a block for that name
Clock skewValid 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 )

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

What is an SSL handshake?

It is the opening exchange of an HTTPS connection. The browser and server agree on a TLS version and cipher, the server proves its identity with a certificate signed by a trusted CA, and both derive shared session keys. Once each side has sent and checked a Finished message, encrypted page data starts to flow.

What is TLS?

TLS, or Transport Layer Security, is the protocol that encrypts and authenticates connections between programs such as a browser and a web server. It replaced SSL. TLS 1.3 and TLS 1.2 are the versions in use today, while TLS 1.0 and 1.1 were formally deprecated in 2021 and should be switched off.

SSL vs TLS: what is the difference?

TLS is the successor to SSL. Every SSL version is broken and retired, so modern servers and browsers only speak TLS. The name SSL survives in everyday use, as in SSL certificate, but the same certificate works with any TLS version. When a panel says SSL, it means TLS in practice.

What is the difference between HTTP and HTTPS?

HTTP sends requests and pages as plain text, usually on port 80, so anyone on the network path can read or change them. HTTPS wraps the same HTTP inside a TLS connection on port 443. That encrypts the traffic, detects tampering and uses a certificate to prove you have reached the real server.

Why does the SSL handshake fail?

The common causes are an expired certificate, a certificate that does not cover the hostname, a missing intermediate certificate, no shared TLS version or cipher, a missing or wrong SNI name, and a device clock set to the wrong date. Run openssl s_client with -servername, or curl -v, to see which check fails.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.