Troubleshooting

ERR_CONNECTION_CLOSED: what it means and how to fix it (visitors and site owners)

ERR_CONNECTION_CLOSED means the server closed the connection during the TLS handshake. Fix it as a visitor, or find the cause with curl and openssl s_client.

Published ~8 min read
On this page

Short answer: ERR_CONNECTION_CLOSED (Chromium net error -100) means the TCP connection opened and the other end then closed it with a normal FIN before any page came back, almost always in the middle of the TLS handshake. If other sites work, the cause is on the server or on the path to it: something on port 443 hangs up instead of finishing HTTPS. This command shows how far the handshake gets:

Linux · macOS · Windows (OpenSSL)
openssl s_client -connect example.com:443 -servername example.com -brief </dev/null
curl -sv -o /dev/null https://example.com/

Chrome words it as This site can't be reached followed by example.com unexpectedly closed the connection. The string and the code come from Chromium's source (components/error_page_strings.grdp and net/base/net_error_list.h, which defines -100 as A connection was closed (corresponding to a TCP FIN)). Edge, Brave, Opera and other Chromium browsers show the same code.

Closed, empty, reset: what the browser actually saw

Chromium turns an end of stream into different codes depending on when it arrives. We read the code paths in Chromium's socket_bio_adapter.cc, http_stream_parser.cc and http_network_transaction.cc (main branch, read 13.11.2026):

When the connection endsChrome showsRead more
FIN during the TLS handshakeERR_CONNECTION_CLOSEDThis page
FIN after the request, nothing received, new connectionERR_EMPTY_RESPONSESame causes as below, one step later
FIN on a reused keep-alive connectionUsually nothing: Chrome resends the request on a new connectionCode: ShouldResendRequest()
FIN in the middle of the response headers over HTTPSERR_RESPONSE_HEADERS_TRUNCATEDBackend or proxy died mid-answer
RST instead of FINERR_CONNECTION_RESETERR_CONNECTION_RESET
A TLS alert instead of a silent closeERR_SSL_PROTOCOL_ERROR or a specific SSL codeERR_SSL_PROTOCOL_ERROR
No answer to the first packet at allERR_CONNECTION_TIMED_OUTERR_CONNECTION_TIMED_OUT

So a close you can see as ERR_CONNECTION_CLOSED is nearly always an HTTPS problem. A plain HTTP site whose server hangs up gives ERR_EMPTY_RESPONSE instead. The overview of all the codes under "This site can't be reached" is in this site can't be reached.

Visitor fixes, in order

First find out whether it is you. Open the same address on a phone over mobile data. If it loads there, the close happens on your device or network:

  • VPN, proxy, antivirus web shield: these sit inside the TLS handshake. Turn each off for one test, and check chrome://settings under System for a proxy you did not set.
  • Network filters: office, school and some national networks read the site name in the TLS ClientHello (SNI) and end the connection for names they block. If the site loads over mobile data but never on that network, that is the likely reason, and only the network's operator can change it.
  • Router and Chrome state: restart the router, then close every Chrome window and try again. The remaining device checks (Winsock reset, DNS cache) are the same as for a reset and are listed in the reset guide.

If the site fails on every network and device, the server side closes the connection, and only the site owner can fix it.

Site owners: reproduce it with curl and openssl

Run both commands from your own computer, then from the server itself. To skip DNS and any CDN and talk to your origin directly, pin the name to its IP address with --resolve; the SNI and Host header stay correct:

any shell
curl -sv -o /dev/null --resolve example.com:443:SERVER_IP https://example.com/
openssl s_client -connect SERVER_IP:443 -servername example.com -brief </dev/null
openssl s_client -connect SERVER_IP:443 -noservername -brief </dev/null

We started a small test server on 127.0.0.1 on this Debian 12 host that accepts a connection, reads what arrives and then closes it, and pointed curl 7.88.1 (OpenSSL 3.0) and openssl s_client at it. This is what a silent close during the handshake looks like, shortened:

Output · Debian 12, curl 7.88.1 and OpenSSL 3.0.22, shortened
$ curl -sv -o /dev/null https://127.0.0.1:47312/; echo "exit=$?"
* Connected to 127.0.0.1 (127.0.0.1) port 47312 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 127.0.0.1:47312
* Closing connection 0
exit=35

$ openssl s_client -connect 127.0.0.1:47312 -servername example.com -brief </dev/null
40E74C3CFF7E0000:error:0A000126:SSL routines:ssl3_read_n:unexpected eof while reading:../ssl/record/rec_layer_s3.c:318:

$ curl -sv -o /dev/null http://127.0.0.1:47312/; echo "exit=$?"
> GET / HTTP/1.1
* Empty reply from server
* Closing connection 0
exit=52

How to read your own result:

  • Client hello sent, then SSL_ERROR_SYSCALL or unexpected eof: the far end hung up during the handshake. This is the Chrome error. Continue with the causes below.
  • Works with -servername but not with -noservername, or the other way round, or only for one name: the terminator decides by SNI. See cause 1.
  • An alert such as tlsv1 unrecognized name or wrong version number: the server answers, just not with a working handshake. That is a TLS configuration problem, covered in SSL handshake failed.
  • Works from the server, fails from outside: something between the internet and your web server closes it: cause 4.

Server-side causes and how to tell them apart

Cause 1: no certificate or route for the requested name (SNI)

A load balancer, TLS proxy or ingress that terminates HTTPS picks a certificate or a backend by the SNI name. Some of them end the handshake without an alert when the name is unknown: Envoy, for example, documents that a connection matching none of its filter chains is closed when no default filter chain is set. Typical after a domain was added to DNS but not to the proxy, after a certificate was removed, or when www was forgotten. Compare -servername example.com with -servername www.example.com in the commands above; if one works and one closes, add the missing name to the proxy's certificate and host rules.

nginx behaves more loudly. Since 1.19.4 it has ssl_reject_handshake on; for a catch-all server; in nginx's source that answers with a fatal unrecognized_name alert, which Chrome shows as ERR_SSL_UNRECOGNIZED_NAME_ALERT (-159), not as closed. And a listen 443 ssl default server with no ssl_certificate makes nginx -t fail with no "ssl_certificate" is defined for the "listen ... ssl" directive, so it never reaches visitors.

Cause 2: a TCP proxy or port forward with no backend

A proxy that passes TCP through without decrypting it (the nginx stream module, HAProxy in mode tcp, a NAT port forward to a service that is down) accepts the visitor's connection first and only then connects onwards. If the backend is down, it has nothing to send and closes the visitor's side; if the ClientHello is already waiting unread at that moment, the kernel may send a reset instead (see the note above). For the nginx stream proxy, the error log shows a line ending in failed (111: Connection refused) while connecting to upstream, starting with connect() failed or connect() to ADDRESS failed depending on when the refusal arrives. Check the backend directly on the proxy host:

on the proxy host
ss -ltnp | grep -E ':(443|8443)\b'
curl -sv -o /dev/null --resolve example.com:8443:127.0.0.1 https://example.com:8443/

Cause 3: the server process dies mid-handshake

When a worker crashes, the kernel closes its sockets. nginx logs worker process 12345 exited on signal 11 in its error log; Apache logs AH00052: child pid 12345 exit signal Segmentation fault (11). Compare the time stamps with your last package update (a module or OpenSSL upgrade without a full restart is one candidate) and restart the service cleanly.

Debian · Ubuntu
sudo grep -E 'exited on signal|exit signal' /var/log/nginx/error.log /var/log/apache2/error.log
sudo journalctl -u nginx -u apache2 --since "1 hour ago"

Cause 4: a firewall, IPS or DDoS filter in front

If the handshake completes from the server itself but closes from outside, something on the path ends it: a provider's DDoS filter, an intrusion prevention rule that matches the SNI or the ClientHello, a geo or rate limit that hangs up instead of dropping. Capture on the server while you test from outside. If the server sees the SYN and the ClientHello and sends a full ServerHello but the client still gets a close, the close was added on the way. The capture method (including the TTL comparison) is in the reset guide; filter on FIN instead of RST:

on the server
sudo tcpdump -ni any 'tcp port 443 and host VISITOR_IP and tcp[tcpflags] & tcp-fin != 0'

Cause 5: the port speaks something that is not HTTPS

Point a browser at https://host:PORT where a database, a game server or a custom TCP service listens, and that service reads the ClientHello as garbage. If it answers with anything that is not TLS (a plain HTTP server sends an HTTP error page, for example), Chrome reports ERR_SSL_PROTOCOL_ERROR, its fallback code for TLS errors without a more specific mapping; a service that just hangs up gives ERR_CONNECTION_CLOSED, exactly like our test server above. ss -ltnp on the server names the process behind the port.

nginx return 444 and the empty-response cousin

nginx documents return 444; as a non-standard code that closes the connection without sending a response header. It is popular in catch-all servers and bot rules. Over HTTPS the handshake has already finished when it runs, so visitors get ERR_EMPTY_RESPONSE, not ERR_CONNECTION_CLOSED. If people report an empty response for your real domain, search your config for 444 first:

Debian · Ubuntu
sudo nginx -T 2>/dev/null | grep -nE 'return +444|server_name|listen'

On a VPS or dedicated server you control every layer, so you can run all of these checks yourself: the --resolve test from outside, the same test on 127.0.0.1, and a capture on the network interface. The layer where the result changes is the layer that closes the connection.

Frequently asked

What does ERR_CONNECTION_CLOSED mean?

The browser opened a TCP connection to the site and the other end then closed it with a normal FIN before any page arrived. In Chromium this is net error -100, and it almost always happens during the TLS handshake of an HTTPS site. Chrome shows it as This site can't be reached, followed by the host name and unexpectedly closed the connection.

How do I fix ERR_CONNECTION_CLOSED in Chrome?

Load the site on another network, for example a phone on mobile data. If it works there, turn off VPN, proxy and antivirus web scanning one at a time and restart the router, because something on your side ends the handshake. If it fails everywhere, the server or a proxy in front of it closes the connection and only the site owner can fix it.

What is the difference between ERR_CONNECTION_CLOSED and ERR_EMPTY_RESPONSE?

Both mean the server closed the connection without sending anything useful, but at different moments. ERR_CONNECTION_CLOSED comes from a close during the TLS handshake; ERR_EMPTY_RESPONSE comes from a close after the request was sent on a new connection, for example by nginx return 444 or a server process that crashed while handling the request. The first points at the TLS layer, the second at the web server or application.

How can a site owner find what closes the connection?

Run curl -sv with --resolve example.com:443:SERVER_IP and openssl s_client -connect SERVER_IP:443 -servername example.com from outside, then the same against 127.0.0.1 on the server. If the handshake fails from outside but works locally, a firewall or filter on the path closes it; if it fails locally too, check the TLS terminator, its backend and the error logs for crashed workers.

Related articles

All troubleshooting