HTTP, TLS & Web Performance

ERR_CONNECTION_REFUSED, Timed Out and Reset: What Each Means

Tell a refused, timed out and reset connection apart, learn what each says about the network, and follow practical steps to find and fix the cause.

Key takeaways

  • A refused connection usually means the target machine is reachable but nothing is accepting connections on that port.
  • A timeout means no reply arrived, which points to a down host, a firewall dropping packets or a broken route.
  • A reset means a TCP connection was torn down suddenly by a server, firewall, proxy or security program.
  • None of these are HTTP status codes, because they happen before or underneath the web request.
  • Testing from a second network quickly shows whether the problem is on your side or the site's.

These three browser errors describe three different ways a connection can fail. Refused means something answered and said no. Timed out means nothing answered in time. Reset means a connection was being set up or used, and then one side, or something in between, cut it off abruptly.

That distinction is the most useful clue you have. It tells you whether to look for a stopped service, a silent firewall or lost path, or something that is actively interrupting traffic.

A quick refresher on connections

Before your browser can ask for a page, it looks up the site's address and then opens a connection to a port, a numbered doorway on that machine. HTTPS normally uses port 443 and plain HTTP uses port 80. See how ports work for more.

With TCP, opening a connection takes a three-way handshake: your computer sends a SYN, the server answers SYN-ACK, and you reply ACK. Each of the three errors is a different way this exchange, or what follows, goes wrong.

(Some sites also use HTTP/3, which runs over QUIC on UDP. Browsers generally fall back to TCP if that fails, so the errors here still apply.)

Three failures, three signals
Refused A reset arrives in reply to your SYN Fails almost instantly Often no service on that port Timed out No reply to repeated SYNs Fails after a long wait Often drops by firewall or dead path Reset Connection is cut mid-setup or mid-use Timing varies Often a middlebox or server fault Refused A reset arrives in reply to your SYN Fails almost instantly Often no service on that port Timed out No reply to repeated SYNs Fails after a long wait Often drops by firewall or dead path Reset Connection is cut mid-setup or mid-use Timing varies Often a middlebox or server fault

ERR_CONNECTION_REFUSED

Here your SYN reached a machine, and the answer was a TCP reset (RST) rather than an acceptance. The error appears quickly, often within a fraction of a second.

Typical causes:

  • The web server program has crashed or was never started.
  • The service listens on a different port than you're using.
  • The service listens only on the loopback address 127.0.0.1, so other machines can't reach it.
  • A firewall is configured to reject the connection, which sends an explicit refusal.
  • DNS points at the wrong machine, one that has no web server.
  • A proxy configured in your browser or system isn't running.

The loopback case catches many developers. If you start a local server and visit http://localhost:3000 after the process exited, or on the wrong port, refusal is exactly what you get. If you're running the server inside a container or virtual machine, check that the port is published to the host.

ERR_CONNECTION_TIMED_OUT

A timeout means your computer sent a request to connect and heard nothing. It retries several times, waiting longer between attempts, and eventually gives up.

Common causes:

  • The server is powered off or has lost its network connection.
  • A firewall drops the packets without replying.
  • A cloud provider's security rules don't allow inbound traffic on that port.
  • Routing between you and the server is broken.
  • Your own connection is down or badly congested.
  • DNS returns an old address that nothing uses anymore.

One subtle case involves IPv6. If a site publishes an IPv6 address that doesn't work, some programs stall before trying IPv4. Browsers usually race the two, but other tools may not.

Home hosting adds its own causes. If you host a site from home, the router needs a correct port forward, your public address may have changed, and some providers block inbound ports or place customers behind shared addresses.

ERR_CONNECTION_RESET

A reset means that an RST packet ended a connection that your browser thought was in progress. It can arrive during the handshake that sets up encryption, while the request is being sent, or partway through a download.

Possible sources:

  • The server application crashed while handling you, or closed the socket abruptly.
  • A firewall or security appliance decided the traffic broke a rule.
  • Antivirus software that inspects HTTPS interfered.
  • A network filter, such as those on workplace or school networks, blocked the destination.
  • A middlebox expired an idle connection from its memory.
  • Packet size problems on a VPN or tunnel; these more often cause stalls, but can surface as resets or failures.

Chrome has a few related messages too. ERR_CONNECTION_CLOSED means the connection ended without a proper response, and ERR_EMPTY_RESPONSE means the server closed it without sending data. Other browsers word these differently; Firefox, for instance, tends to show a general "connection was reset" or "unable to connect" page.

Reject or drop: why firewalls change the error

A firewall that blocks traffic has two ways to do it, and the choice decides which error you see. A reject rule sends back an explicit answer, either a TCP reset or an ICMP unreachable message, so the visitor fails quickly. A drop rule discards the packet and says nothing, so the visitor waits until the timeout.

Administrators often prefer dropping on the public side because it gives scanners less information and sends no extra traffic. Rejecting is friendlier inside a private network, where a fast, clear failure saves troubleshooting time. Neither choice makes a service secure on its own. What counts is that the port is closed to people who shouldn't reach it.

This also means you can't read intent from the error alone. A refusal may come from the server itself, from a firewall in front of it, or from a device on your own network that blocks the destination. A timeout may be a deliberate block, a dead machine or a single bad link somewhere between you. Comparing results from two networks, and checking the server's logs if you have them, turns the clue into an answer.

Cloud platforms add one more layer. Security groups and network access rules typically drop disallowed traffic, so a newly launched server that times out on port 443 very often just needs an inbound rule.

Narrow it down in five minutes

Where is the fault?
Do all websites fail? YES Fix your own connection: router, Wi-Fi, VPN or proxy first. 1 NO Does the site work on another network? YES Something on your network or device is blocking or breaking it. 2 NO Does it work on another device on your network? YES Check this device's browser, extensions, proxy and security software. 3 NO Does it fail everywhere? YES The problem is at the site; check its status page and wait. 4 NO Mixed results Compare the addresses DNS returns and note which networks fail. Do all websites fail? 1 IF YES Fix your own connection: router, Wi-Fi, VPN or proxy first. NO Does the site work on another network? 2 IF YES Something on your network or device is blocking or breaking it. NO Does it work on another device on your network? 3 IF YES Check this device's browser, extensions, proxy and security software. NO Does it fail everywhere? 4 IF YES The problem is at the site; check its status page and wait. NO Mixed results Compare the addresses DNS returns and note which networks fail.

If the site is fine elsewhere, try these on your side:

  1. Restart the router and the device.
  2. Turn off any VPN and check your system proxy settings for entries you didn't add.
  3. Try a private browser window, which disables many extensions.
  4. Flush the DNS cache in case the address is stale.
  5. Check whether security software recently updated; pause its web inspection only briefly, as a test, and turn it back on.

On a managed work or school network, a block may be deliberate. Ask the administrator.

Test from the command line

Command-line tools remove the browser from the picture. First confirm which address the name resolves to:

nslookup example.com

On Windows PowerShell, test whether a TCP port accepts connections:

Test-NetConnection example.com -Port 443

On Linux or macOS:

nc -vz example.com 443
curl -v --connect-timeout 10 https://example.com/

Read the output for the same three patterns. curl prints "Connection refused" for a refusal, a timeout message after the limit you set, or "Connection reset by peer" for a reset. Verbose mode also shows how far it got: name lookup, TCP connect, TLS setup or HTTP response. More techniques are in testing a port from the command line.

Don't rely on ping alone. Many hosts ignore ping while serving web traffic perfectly, so a failed ping proves little.

If the server is yours

Run through the path from the application outward.

Check each layer from the inside out
Process Is the web server running without errors? Listening socket Right port and address, not only loopback Host firewall Allows the port from the networks you expect Cloud or router rules Security group or port forward in place DNS records Names point at the current address Process Is the web server running without errors? Listening socket Right port and address, not only loopback Host firewall Allows the port from the networks you expect Cloud or router rules Security group or port forward in place DNS records Names point at the current address

To see what is listening on Linux:

sudo ss -ltnp

On Windows:

Get-NetTCPConnection -State Listen | Sort-Object LocalPort

A line showing 127.0.0.1:8080 means only local connections work. 0.0.0.0:8080 or [::]:8080 means the service accepts connections on all interfaces of that address family, assuming firewalls allow them.

If connecting works from the server itself but not from outside, suspect a firewall or cloud rules. For timeouts, a packet capture on the server answers a decisive question: do the SYN packets arrive at all? If they don't, the block is upstream. If they arrive and no reply leaves, look at the host.

For resets, correlate timestamps with application and proxy logs. Resets on long, idle connections often mean timeouts differ between layers, and keepalive settings can fix that. Resets during large uploads may come from a request size or duration limit.

Only probe systems you own or are authorized to test.

Preventing repeat failures

Once a fault is fixed, make it harder to return. Set your server software to start automatically after a reboot and to restart if it crashes. On Linux with systemd, sudo systemctl enable your-service covers the first, and the service's restart policy covers the second.

Watch the service from outside your own network, because a check that runs on the server can't notice a closed firewall or a broken DNS record. Keep a short note of which ports should be open and why, and review it after changes to routers or cloud rules. If your home or office address changes from time to time, use a dynamic DNS service or arrange a fixed address so the name keeps pointing at the right place.

Common questions

Why is there no status code?

Status codes arrive inside an HTTP response. These errors mean no usable response came back, so the browser reports what happened at the connection level. If you see a numbered error instead, such as 502, a server did answer; see gateway errors.

Does "refused" mean the site blocked me?

It can, if a firewall is set to reject your address, but a stopped service is a far more common explanation. Testing from another network separates the two.

Why does the error come and go?

Intermittent failures often point to one bad server among several behind a name, an unstable Wi-Fi link, or an overloaded firewall. Note the time and the resolved address on each failure so a pattern can emerge.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in HTTP, TLS & Web Performance →

Latest news on this topic