Fix the TLS handshake that breaks on your website

ERR_SSL_PROTOCOL_ERROR is Chrome's error for a secure connection that broke during the TLS handshake, before any page could load, and Chrome's page for it says the site sent an invalid response. It's the code Chrome falls back on for TLS failures without a more specific one, so on your own site look for port 443 answering in plain HTTP, another program holding that port, or a server or firewall that ends the handshake with an alert.

What breaks the handshake

  • Port 443 answers in plain HTTP

    A web server, container or proxy listening on 443 without TLS turned on replies to Chrome's opening TLS message with an ordinary HTTP response. Chrome can't parse that as TLS and gives up. A link or redirect to https:// on a port that only serves HTTP fails the same way.

  • Another program holds port 443

    When something other than your web server listens on 443, such as an SSH or VPN service, the first bytes Chrome gets back aren't TLS at all, and the handshake stops there.

  • The server ends it with an alert

    TLS servers abort a handshake by sending an alert. An internal_error alert means the server hit a problem of its own, unrelated to the browser, so the server's error log from that moment holds the reason.

  • A firewall sends access denied

    The access_denied alert belongs to client certificate checks, but Chromium's code notes that some firewalls send it to block a page. When Chrome never got a certificate request, it shows this error rather than a certificate message.

  • One network breaks it for its users

    A proxy, firewall or antivirus program that inspects HTTPS on an office or school network can break the handshake for the people behind it while other visitors connect normally.

Chromium's openssl_ssl_util.cc maps every TLS failure it has no specific code for to ERR_SSL_PROTOCOL_ERROR, and ssl_client_socket_impl.cc handles the access_denied case. net_error_list.h describes the error only as an SSL protocol error, and localized_error.cc gives it the invalid response message. RFC 8446 defines each alert.

Test the handshake on port 443

# Try a TLS handshake with yoursite.com and print the cipher line and any error
echo | openssl s_client -connect yoursite.com:443 -servername yoursite.com 2>&1 \
  | grep -E 'Cipher is|:error:'

# List the IPv4 and IPv6 addresses yoursite.com points to
dig +short A yoursite.com
dig +short AAAA yoursite.com

# Repeat the handshake against each address, still asking for yoursite.com
echo | openssl s_client -connect 203.0.113.10:443 -servername yoursite.com 2>&1 \
  | grep -E 'Cipher is|:error:'

# Give an IPv6 address as a separate host and port, a form LibreSSL accepts too
echo | openssl s_client -host 2001:db8::10 -port 443 -servername yoursite.com 2>&1 \
  | grep -E 'Cipher is|:error:'

Read what openssl prints

  • When the handshake succeeds, the Cipher is line names the cipher suite the server picked. When it fails, that line reads Cipher is (NONE), and openssl adds one long error line with the reason between its colons, just before the source file name. wrong version number means openssl expected a TLS record and got something else, such as an HTTP response or another program's greeting. LibreSSL, the openssl that ships with macOS, reports that case as alert protocol version with no alert number after it. A line ending in SSL alert number 80 carries the server's internal_error alert, and SSL alert number 49 is access_denied. OpenSSL's s_client manual explains -connect, -host, -port and -servername.

  • The 203.0.113.10 and 2001:db8::10 addresses are placeholders, so use the ones dig printed, and skip any line ending in a dot, which names a CNAME rather than an address. If one address fails while the others work, that server or CDN location is set up differently, and the fix belongs there. If every address connects cleanly but Chrome still shows the error, the break sits between some visitors and your server, usually on their network.

How to fix an SSL protocol error

  1. Find what listens on port 443On the server, check which program holds port 443. If a load balancer or CDN sits in front, it's the first thing Chrome talks to, so start there.
  2. Turn TLS on for that listenerGive the HTTPS listener a certificate and key and enable TLS on it. If a proxy passes encrypted traffic straight through to a backend, the backend's port has to speak TLS too.
  3. Read the log at the failed handshakeWhen the server sends an alert, its error log for that moment records why. Fix what it reports, then reload the server so the change takes effect.
  4. Move other services off port 443Give SSH, a VPN or any other service its own port, so 443 carries nothing but your site's HTTPS.
  5. Retest every addressRun the openssl command against each address dig lists, then load the page in Chrome from a network you haven't tried yet.

Frequently asked questions

Why do I get this error on localhost?

Usually because the address starts with https:// while your development server on that port only speaks HTTP. Chrome sends a TLS greeting, gets a plain HTTP reply and reports a protocol error. Open the same address with http://, or give the development server a certificate if you need HTTPS locally.

How is it different from the cipher mismatch error?

If the server answers Chrome's opening message with a handshake_failure alert, Chrome reports ERR_SSL_VERSION_OR_CIPHER_MISMATCH, because RFC 8446 defines that alert as the server failing to agree on acceptable security settings. Chromium's openssl_ssl_util.cc makes that split and sends most other TLS failures to ERR_SSL_PROTOCOL_ERROR. The cipher mismatch guide is linked below.

Why does it only happen on one network?

Something on that network handles HTTPS before it reaches your server, such as a filtering proxy, or a firewall that blocks some sites by sending an alert. If the handshake works from mobile data or another office, your server is fine, and the network's administrator holds the fix.