Reference guide · website-errors · Published 2026-08-16 · 3 min read

Connection refused vs connection timed out

Connection refused vs timed out, how each maps to a firewall, dead server or slow app, with the test that separates them.

A connection refused error and a connection timed out error sound similar but report opposite facts about the network. Refused means a host answered and declined to connect. Timed out means no one answered at all. The distinction is the whole diagnosis, because each points to a different layer: a firewall, a dead service, or a congested route.

Refused means a no

A refused verdict (ERR_CONNECTION_REFUSED with a TCP RST) appears when the client reaches the host but nothing is listening on the requested port, or a firewall actively rejects the connection with a RESET. The server is reachable at the network level; it just does not accept the socket.

Common causes:

CauseTypical result
No service on that portPort closed, nothing listens
Service stopped or crashedHost is up, port is dead
Firewall rejects with RSTThe box answers "no"
Wrong port in configA different port is serving

Because the answer comes back fast, a refused error is usually quick to appear, and it points at the application or the port, not the route.

Timeout means silence

A timed out verdict (ERR_TIMED_OUT or ERR_CONNECTION_TIMED_OUT) means the client sent its request and waited with no reply until the attempt gave up. Silence can sit at several hops: the DNS did not answer, the route to the host dropped packets, a firewall dropped the request rather than rejecting it, or the server accepted the connection but never completed the response.

Where refused implies the endpoint exists, a timeout leaves the location of the block open. The connection timed out article walks the route to find it.

The separating test

Use a single probe to state which one you have:

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

Watch the outcome:

To identify the port precisely on Windows, probe it directly:

Test-NetConnection example.com -Port 443

This reports TcpTestSucceeded true (the port is open), false with refused, or hangs on a dropped firewall that silently filters the port.

Turning the verdict into a fix

VerdictFirst commandMost likely fix
RefusedCheck the port and serviceStart the service, bind the port, or open it
Timed out on connectTrace the routeFix DNS, firewall, or routing
Timed out after connectApp and databaseFix the slow query or upstream

A firewall that silently drops packets produces a timeout, while one that answers with RESET produces a refused error, so the same firewall intent shows up in two different browser messages depending on how the filter is set. When a service sits behind a load balancer or CDN, start from the edge: the Cloudflare 522 article shows a timeout at the origin behind a CDN, and the general site not loading guide keeps the whole diagnostic in order.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services