If You Are a Visitor
- Update the browser: an outdated browser may lack the ciphers a modern server requires.
- Try another browser or network: antivirus software or a network filter that inspects HTTPS can cause the error. If it works elsewhere, the cause is on your side.
- Check the address: a subdomain typed wrong, or an old link to a name the site no longer serves, can reach a host without a certificate for it.
If the site fails everywhere, only its owner can fix it.
If You Own the Site: Test the Handshake
openssl s_client -connect example.com:443 -servername example.com -tls1_2 </dev/null
openssl s_client -connect example.com:443 -servername example.com -tls1_3 </dev/null
Run both. If both end in a handshake failure or a protocol version alert, the server accepts neither of the versions current browsers use. If one works, read the agreed protocol and cipher in its output. To list everything the server offers, the nmap script ssl-enum-ciphers helps:
nmap --script ssl-enum-ciphers -p 443 example.com
It lists the accepted cipher suites per protocol version with a letter grade for each; install the nmap package first. Run these from outside the server so you test what visitors reach. More options are in openssl s_client.
Cause 1: Only Old TLS Versions Enabled
Browsers have removed TLS 1.0 and 1.1. A server configured for those alone fails. In Nginx, set the protocols in the http block or the server block:
ssl_protocols TLSv1.2 TLSv1.3;
In Apache, in the SSL configuration:
SSLProtocol -all +TLSv1.2 +TLSv1.3
TLS 1.3 needs OpenSSL 1.1.1 or later on the server, which every current distribution has; see how to check the OpenSSL version.
Cause 2: A Cipher List That Is Too Narrow
A hand-written ssl_ciphers or SSLCipherSuite line copied from an old guide may list only ciphers that browsers no longer offer, or only RSA ciphers for a server with an ECDSA certificate. Remove the custom line to use the defaults of your distribution, or replace it with a current list such as the intermediate profile from Mozilla's SSL Configuration Generator. Search all included files, because a second line elsewhere can override the first:
sudo grep -rn "ssl_ciphers\|ssl_protocols" /etc/nginx/
Cause 3: No Usable Certificate for the Name
When the requested name reaches a server block or virtual host on port 443 without a valid certificate and key, the handshake can fail with this error. Check which block answers for the name and that it has ssl_certificate and ssl_certificate_key lines pointing to existing files. A key that does not match its certificate stops Nginx from loading the configuration, which sudo nginx -t reports.
Cause 4: A CDN Edge Certificate
When a CDN proxies the site, the browser talks TLS with the CDN, not with your server. The error appears when the edge has no active certificate for the name:
- A new domain or subdomain: the edge certificate is still being issued. Wait, or check its status in the CDN dashboard.
- A deeper subdomain: a default edge certificate, such as Cloudflare's Universal SSL, covers
example.comand one level of subdomains only, nota.b.example.com. - An expired custom certificate: a certificate you uploaded to the CDN yourself has run out. Upload a new one.
Problems between the CDN and your server show up as other errors; see Cloudflare error 525 and Cloudflare error 526. If the browser instead says the site can't provide a secure connection, follow that guide.
Apply and Confirm the Fix
- Test the configuration:
sudo nginx -torsudo apachectl configtest. - Reload:
sudo systemctl reload nginx,apache2, orhttpd. - Repeat both openssl tests; at least TLS 1.2 must succeed, and TLS 1.3 should.
- Open the site in a private browser window, for every name and over IPv6 if you have an AAAA record.
Background on versions and the handshake is in what is SSL/TLS.