SSL Handshake Failed
DownBad reached your server, but couldn’t set up a secure connection with it, so it couldn’t check your site. Browsers usually fail the same way. This page finds out why, fixes the server’s settings, and closes the incident.
What you’re seeing
Section titled “What you’re seeing”Before a browser, or DownBad, loads a page whose address starts with
https://, it and the server agree on how to encrypt the connection. That
exchange is the TLS handshake (TLS, Transport Layer Security, is the
encryption behind https://, and SSL, Secure Sockets Layer, is its old name).
They have to share a TLS version (an edition of the rules, such as TLS 1.2)
and a cipher (a method of encrypting) that both accept. When they can’t,
the connection stops before the server’s certificate, the file that proves
the site is who it claims to be, is read.
An SSL monitor is DownBad’s check of a site’s certificate, and a URL monitor checks that a web page loads (a URL is a web address). An incident is open for one of them, and it shows one of these reasons.
On an SSL monitor, with the failure type handshake:
SSL connection failed: Operation failed after 4 attempts. Last error: A02B8799FFFF0000:error:0A000410:SSL routines:ssl3_read_bytes:ssl/tls alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:918:SSL alert number 40. An SSL monitor tries again while its time allows, and the number of attempts can differ.Server presented no certificate. The handshake finished, but the server sent no certificate, which a server set up for a website doesn’t do. Collect what Still stuck lists and send it to us.
On an SSL monitor, with the failure type unknown, the reason starts the same
way, SSL connection failed:, with different words near its end, such as:
SSL connection failed: Operation failed after 4 attempts. Last error: A05B6B87FFFF0000:error:0A00010B:SSL routines:tls_validate_record_header:wrong version number:../deps/openssl/openssl/ssl/record/methods/tlsany_meth.c:77:
On a URL monitor, with the failure type unknown:
write EPROTO A05B6B87FFFF0000:error:0A00010B:SSL routines:tls_validate_record_header:wrong version number:../deps/openssl/openssl/ssl/record/methods/tlsany_meth.c:77:, with different words near its end for other causes.
Over TLS 1.3, when the server asks for a certificate from DownBad itself, the
reason reads differently. On a URL monitor, with the failure type unknown, it has no
write EPROTO in front:
A0AB34A2FFFF0000:error:0A00045C:SSL routines:ssl3_read_bytes:tlsv13 alert certificate required:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:918:SSL alert number 116
On an SSL monitor, with the failure type cert invalid, it starts
SSL certificate error:, though the certificate it means is the one DownBad
doesn’t have, not your site’s:
SSL certificate error: Operation failed after 4 attempts. Last error: A0AB34A2FFFF0000:error:0A00045C:SSL routines:ssl3_read_bytes:tlsv13 alert certificate required:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:918:SSL alert number 116
The long reason is the error from OpenSSL, the encryption library DownBad’s checks use, about a port, the numbered door a server offers a service behind (secure web pages use 443). Most of it is a code and a file name. The words just before the file name say what went wrong, and each points to a cause on this page:
| Words in the reason | What they mean | Cause |
|---|---|---|
wrong version number | The port didn’t answer in TLS at all | The port isn’t serving TLS |
unsupported protocol or alert protocol version | The server offers only TLS versions older than 1.2 | The server offers only old TLS versions |
alert handshake failure | Usually, the server found no cipher it shares with DownBad | The server and DownBad share no cipher |
dh key too small, modulus too small or unknown security bits | The server’s key for agreeing on encryption is too short | The server and DownBad share no cipher |
certificate required | The server wants a client certificate (one sent by the visitor’s own computer), which DownBad doesn’t have | The server asks for a client certificate |
DownBad accepts TLS 1.2 and TLS 1.3, the versions current browsers use. It refuses older ciphers such as RC4 and 3DES, and a Diffie-Hellman key (a value some servers use to agree on encryption) shorter than 2048 bits.
If DownBad couldn’t connect at all, the incident says so differently: see Connection Refused or Connection Timed Out.
Is it you or us?
Section titled “Is it you or us?”It is your server’s settings, or those of a service in front of your site. DownBad checks with the same TLS versions current browsers use, so a browser usually fails in the same way.
To see it without a terminal (the window where you type commands), open
the address in Google Chrome: the URL monitor’s address, or https://
followed by the SSL monitor’s Domain, with : and the port after it if
its Port isn’t 443. Chrome shows a page that says one of these, with your site’s name in place of
example.com. The first two appear under the heading This site can’t
provide a secure connection:
- example.com sent an invalid response. The port isn’t serving TLS.
- example.com uses an unsupported protocol. The server offers only old TLS versions, or shares no cipher with Chrome.
- example.com didn’t accept your login certificate, or one may not have been provided. The server asks for a client certificate.
Chrome’s settings are close to DownBad’s but not the same, so a page that loads in Chrome can still fail DownBad’s check. The command in Check it yourself uses OpenSSL, as DownBad’s checks do, and step 2 there says which versions of it refused the same servers that DownBad refused.
Before it opens an incident, DownBad usually checks again from up to three other places in the United States. Those places count most failures on this page too, so the incident opens when at least half of the places that answered failed. The exception is when their own check passes, as it can for a client certificate on an SSL monitor or a short Diffie-Hellman key. That failure doesn’t open an incident by itself, and when an incident shows one, an earlier failure opened it, and this is the newest check that failed.
Check it yourself
Section titled “Check it yourself”These steps try the handshake the way DownBad does, and show what goes wrong.
1. Find the address and port. For an SSL monitor, they are its Domain
and its Port. For a URL monitor, the address is the name in its URL,
and the port is the number after the name and a :, or 443 when there is none.
2. Try the handshake. Run this command in a terminal: Terminal on a Mac,
PowerShell on Windows. It only reads, and changes nothing. It uses
OpenSSL, the library DownBad’s checks use, and the outputs below come from its
version 3. Every version of OpenSSL 3 we tried refused the RC4 and 3DES
ciphers that DownBad refuses. The one the macOS command runs, OpenSSL 3.6 from
Homebrew (a popular tool for installing software on a Mac), and the one in
Ubuntu 24.04 (a common kind of Linux, in its 2024 release) also refused
every server we tried that offers only an old TLS version or a short
Diffie-Hellman key, as DownBad does. Others, such as the one in Debian 12
(another common kind of Linux, in its 2023 release), connected to some of
those servers: step 3 says what to do then. Put your address in place of
both example.coms, and your port in place of 443.
/opt/homebrew/opt/openssl@3/bin/openssl s_client -connect example.com:443 -servername example.com -brief </dev/nullmacOS’s own openssl is LibreSSL, a different library, which still
connects to some servers that DownBad refuses, so this command uses OpenSSL
3 from Homebrew, at the place
Homebrew’s install guide gives for a
Mac with an Apple chip. On a Mac with an Intel chip, Homebrew uses
/usr/local in place of /opt/homebrew, so the command starts
/usr/local/opt/openssl@3/bin/openssl instead. Homebrew’s
page for it is
openssl@3, which is the one to install: this command runs that edition.
Without Homebrew, use Chrome, as above.
Connecting to 172.66.147.243CONNECTION ESTABLISHEDProtocol version: TLSv1.3Ciphersuite: TLS_AES_256_GCM_SHA384Peer certificate: CN=example.comHash used: SHA256Signature type: ecdsa_secp256r1_sha256Verification: OKNegotiated TLS1.3 group: X25519MLKEM768DONEConnecting to 172.66.147.243803F4BF001000000:error:0A00010B:SSL routines:tls_validate_record_header:wrong version number:ssl/record/methods/tlsany_meth.c:78:803F4BF001000000:error:0A000197:SSL routines:SSL_shutdown:shutdown while in init:ssl/ssl_lib.c:2804:openssl s_client -connect example.com:443 -servername example.com -brief </dev/nullIf openssl isn’t installed, install the openssl package with your
system’s package manager, the tool that installs software. That needs
sudo, the command that runs another one with an administrator’s rights.
The outputs here come from OpenSSL 3, and some older systems still have
version 1.
CONNECTION ESTABLISHEDProtocol version: TLSv1.3Ciphersuite: TLS_AES_256_GCM_SHA384Peer certificate: CN = example.comHash used: SHA256Signature type: ECDSAVerification: OKServer Temp Key: X25519, 253 bitsDONE20102983FFFF0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:354:"Q" | & "C:\Program Files\Git\usr\bin\openssl.exe" s_client -connect example.com:443 -servername example.com -briefWindows doesn’t include openssl, but Git for Windows
installs a copy, and this command runs it. Without Git for Windows, use
Chrome, as above. The output shown here is OpenSSL 3’s, from OpenSSL 3.6
on another computer.
Connecting to 172.66.147.243CONNECTION ESTABLISHEDProtocol version: TLSv1.3Ciphersuite: TLS_AES_256_GCM_SHA384Peer certificate: CN=example.comHash used: SHA256Signature type: ecdsa_secp256r1_sha256Verification: OKNegotiated TLS1.3 group: X25519MLKEM768DONEConnecting to 172.66.147.243803F4BF001000000:error:0A00010B:SSL routines:tls_validate_record_header:wrong version number:ssl/record/methods/tlsany_meth.c:78:803F4BF001000000:error:0A000197:SSL routines:SSL_shutdown:shutdown while in init:ssl/ssl_lib.c:2804:3. Read the result. CONNECTION ESTABLISHED, then DONE, means the
handshake worked, and Protocol version says which TLS version it used. A line
that starts Requested Signature Algorithms means the server asked for a
client certificate, even when the output ends with DONE: see
the client certificate cause.
Otherwise, the error usually names the problem with the same words as the
incident’s reason, in the table in What you’re seeing.
Some systems word one differently: Debian 12’s OpenSSL says
legacy sigalg disallowed or unsupported for some servers that offer only old
TLS versions. Some versions of OpenSSL, such as Debian 12’s, connect to some
servers that DownBad refuses. If the command connects but the incident’s
reason has one of the words in that table, follow the cause the words point
to. These are the other errors, from the same command on Linux,
against test servers set up to fail this way:
20B0BDAAFFFF0000:error:0A000102:SSL routines:ssl_choose_client_version:unsupported protocol:../ssl/statem/statem_lib.c:1981:2040AEBCFFFF0000:error:0A000410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../ssl/record/rec_layer_s3.c:1599:SSL alert number 402040A7A0FFFF0000:error:0A00018A:SSL routines:tls_process_ske_dhe:dh key too small:../ssl/statem/statem_clnt.c:2092:When the handshake gets that far, a server that asks for a client certificate
shows the line Requested Signature Algorithms, as this test server, which
uses TLS 1.2 and lets a visitor without one finish the handshake, does:
CONNECTION ESTABLISHEDProtocol version: TLSv1.2Ciphersuite: ECDHE-RSA-AES128-GCM-SHA256Requested Signature Algorithms: RSA+SHA512:DSA+SHA512:ECDSA+SHA512:RSA+SHA384:DSA+SHA384:ECDSA+SHA384:RSA+SHA256:DSA+SHA256:ECDSA+SHA256:RSA+SHA224:DSA+SHA224:ECDSA+SHA224:RSA+SHA1:DSA+SHA1:ECDSA+SHA1Peer certificate: CN = *.badssl.comHash used: SHA512Signature type: RSAVerification: OKSupported Elliptic Curve Point Formats: uncompressed:ansiX962_compressed_prime:ansiX962_compressed_char2Server Temp Key: ECDH, prime256v1, 256 bitsDONEOver TLS 1.3 the command often ends with DONE even when the server then
refuses, because the command stops before the server’s refusal arrives, while
DownBad’s check waits for it. Over TLS 1.2, a server that requires a client
certificate can end the handshake before that line, with only
alert handshake failure, the same words as a missing cipher. Chrome tells the
two apart: see Is it you or us?
Fix it
Section titled “Fix it”The causes below run from most to least likely, so start with the one the words in your reason point to.
The port isn’t serving TLS
Section titled “The port isn’t serving TLS”This is the cause when the reason or the command says wrong version number,
or Chrome says the site sent an invalid response. Something answered on the
port, but not in TLS: usually a server that sends plain web pages there.
-
Check the port the monitor uses. Open the monitor’s page, press Edit on its Configuration card, and read the SSL monitor’s Port, or the number after the name and a
:in the URL monitor’s URL. Port 80 serves plain web pages, and secure ones use 443. If the monitor names the wrong port, correct it and press Save Monitor. -
If the port is right, turn TLS on for it. On nginx (a common web server), the site’s
serverblock needslisten 443 ssl;and lines for its certificate,ssl_certificateandssl_certificate_key, as nginx’s guide to setting up secure sites shows. On Apache (another common web server), the site’s<VirtualHost *:443>block (the part of Apache’s settings for one secure site) needsSSLEngine onand its certificate files, as Apache’s SSL how-to shows. Certbot, the usual tool for getting free certificates from Let’s Encrypt, a certificate authority (a company that issues certificates), writes these lines when it installs a certificate, as its instructions show. -
Reload the web server, which makes it read its settings again while it finishes the requests it is already answering. nginx’s guide explains its reload, and Apache’s guide its graceful restart (Apache’s name for a reload).
-
Wait a few seconds, because a request sent straight after a reload can still get the old answer. Then run step 2 of Check it yourself again. It should say
CONNECTION ESTABLISHED. Then follow Confirm DownBad sees the fix.
The server offers only old TLS versions
Section titled “The server offers only old TLS versions”This is the cause when the reason or the command says unsupported protocol
or alert protocol version.
Chrome says the site uses an unsupported protocol both for this cause and
for the next one. The server offers
only TLS 1.0 or 1.1, which
RFC 8996, the standard that retired
them, says not to use. DownBad needs TLS 1.2 or 1.3.
-
Turn on TLS 1.2 and 1.3 in the server’s settings. On nginx, that is its
ssl_protocolsline,ssl_protocols TLSv1.2 TLSv1.3;, which nginx’s guide gives as its default. On Apache, it is theSSLProtocolline, as Apache’s guide explains. On a Windows server, which IIS (Microsoft’s web server) runs on, TLS versions are set in the registry (Windows’ store of system settings), as Microsoft’s TLS settings guide explains. -
The TLSRef Configurator, which Mozilla’s SSL Configuration Generator now points to, writes these settings for nginx, Apache and many other servers.
-
Software too old to offer TLS 1.2 needs updating before any of this works.
-
Reload the web server, as nginx’s guide and Apache’s guide explain. On a Windows server, restart the computer instead: Microsoft’s TLS settings guide says a service that is already running can need a restart before it uses the new TLS versions. Wait a few seconds, then run step 2 of Check it yourself again. It should say
CONNECTION ESTABLISHEDwithTLSv1.2orTLSv1.3. Then follow Confirm DownBad sees the fix.
The server and DownBad share no cipher
Section titled “The server and DownBad share no cipher”This is the cause when the reason or the command says alert handshake failure
and Chrome says the site uses an unsupported protocol, or when either says
dh key too small, modulus too small or unknown security bits. The server offers only ciphers
DownBad refuses, such as RC4 or 3DES, or a Diffie-Hellman key shorter than 2048
bits. If Chrome instead says the site didn’t accept your login
certificate, see
the client certificate cause.
-
Let the server offer current ciphers. On nginx, that is its
ssl_ciphersline: removing your own returns nginx to its default,HIGH:!aNULL:!MD5, as nginx’s guide shows. On Apache, it is theSSLCipherSuiteline, as Apache’s guide explains. On a Windows server, it is the cipher suite order, the list of ciphers the server offers, in the order it prefers them, as Microsoft’s guide explains. The TLSRef Configurator writes a working list for nginx, Apache and many other servers. -
If the words were
dh key too small,modulus too smallorunknown security bits, give the server Diffie-Hellman settings of at least 2048 bits: nginx’sssl_dhparam, as nginx’s guide shows, or, on Apache, parameters added to the end of the site’s first certificate file, as Apache’s guide to SSLCertificateFile explains. -
Reload the web server, as nginx’s guide and Apache’s guide explain. On a Windows server, restart the computer instead, because Microsoft’s guide says a new cipher suite order takes effect on the next boot. Wait a few seconds, then run step 2 of Check it yourself again. It should say
CONNECTION ESTABLISHED. Then follow Confirm DownBad sees the fix.
The server asks for a client certificate
Section titled “The server asks for a client certificate”This is the cause when the reason says certificate required, the command in
Check it yourself shows a Requested Signature Algorithms
line, or Chrome says the site didn’t accept your login certificate. A client
certificate is one the visitor’s own computer sends to prove who it is, which
some sites require so that only certain computers can use them. DownBad never
sends one, so a server that requires one turns DownBad away.
Not every server fails the handshake for this. nginx, with
ssl_verify_client on, finishes the handshake and answers with an error page,
400 No required SSL certificate was sent. A URL monitor then reports
Expected status codes 200 but got 400, which
Website Returns an Error Status Code
covers, and an SSL monitor passes.
-
If the site is meant for anyone, turn the requirement off: on Apache, set
SSLVerifyClienttonone, as Apache’s guide explains, and on nginx, setssl_verify_clienttooff, as nginx’s guide explains. Then reload the web server, as nginx’s guide and Apache’s guide explain. -
If the site is meant to require client certificates, DownBad can’t check it the way your visitors use it. Watch that the server is up with a Port monitor instead, which only checks that something accepts connections on the port: create one with the same Hostname and Port Number 443. Deleting this monitor removes this incident.
-
If you turned the requirement off, wait a few seconds, then run step 2 of Check it yourself again. It should say
CONNECTION ESTABLISHED, thenDONE, with noRequested Signature Algorithmsline. Then follow Confirm DownBad sees the fix.
Confirm DownBad sees the fix
Section titled “Confirm DownBad sees the fix”-
Fix the cause first. A check that still fails while you work only adds to the time the incident takes to close.
-
Open the incident and press Test Now. DownBad checks again within a few seconds instead of waiting for the next scheduled check.
-
Wait a minute, then reload the incident page, which doesn’t update by itself. The incident closes by itself once enough checks in a row pass. You can’t close an incident by hand.
How many passing checks it takes. While an incident is open, DownBad checks less often after repeated failures. This is called back-off. Each failed check adds one step of back-off, up to 14. Each passing check takes one step away and asks for the next check straight away. When no steps are left, one more passing check closes the incident. So after a steady outage it takes one more passing check than there were failed checks while the incident was open, counting the one that opened it, and never more than 15.
These are the defaults. The monitor’s notification profile can change them for each monitor type under Backoff Config, and its settings are the ones that count: Recovery is how many passing checks in a row, with no back-off left, close the incident (2 by default, counting the check that takes the last step away), and Start after, Rate and Max interval decide when back-off starts and how far it goes. If the profile changes them, the step counts above and the waits below change with them.
How long that takes. After you press Test Now, those passing checks run back to back, a few seconds apart, so the incident usually closes within a minute. It takes longer when checks are slow to finish, such as a page that takes several seconds to load.
If you don’t press Test Now, the first passing check waits for the next scheduled one. With the default settings, from the third failed check on, DownBad waits 5 more minutes for each failure, up to an hour more than the monitor’s usual interval:
| Monitor checks every | After 1 or 2 failed checks | After 3 | After 6 | After 14 or more |
|---|---|---|---|---|
| 1 minute | 1 minute | 6 minutes | 21 minutes | 61 minutes |
| 5 minutes | 5 minutes | 10 minutes | 25 minutes | 65 minutes |
| 1 hour | 1 hour | 1 hour 5 minutes | 1 hour 20 minutes | 2 hours |
| 1 day | 1 day | 1 day 5 minutes | 1 day 20 minutes | 1 day 1 hour |
Still stuck
Section titled “Still stuck”Before you ask for help, collect:
- the link to the incident, and the reason it shows, word for word
- the output of the command in Check it yourself, and when you ran it, with your time zone
- what Chrome showed for the address
- what serves your site, such as nginx, Apache, IIS, a hosting platform (a service that runs your site for you) or a CDN (a service such as Cloudflare that sits in front of your site), and anything you changed recently
Then send all of it to us through Contact Us.