Opens in a new tab

ERR_CONNECTION_REFUSED: “refused to connect” and “Connection refused”

The server’s machine answered — and said no. Nothing is accepting connections on that port: the web server is stopped, it listens somewhere else, or a firewall rejects the connection. Because the answer came back, the address itself is reachable; the problem is what (or who) is on it.

This site can’t be reached
example.com refused to connect.
ERR_CONNECTION_REFUSED
How 9 other clients word the same error

Firefox

Unable to connect
Firefox can’t connect to the server at example.com

Firefox, older versions

Firefox can’t establish a connection to the server at example.com.

curl 8.9 and later

curl: (7) Failed to connect to example.com port 443 after 21 ms: Could not connect to server

curl 7.86 to 8.8

curl: (7) Failed to connect to example.com port 443 after 21 ms: Couldn't connect to server

curl before 7.86

curl: (7) Failed to connect to example.com port 443: Connection refused

WordPress and PHP

cURL error 7: Failed to connect to example.com port 443 after 21 ms: Could not connect to server

Node.js

Error: connect ECONNREFUSED 93.184.215.14:443

Python on Windows

[WinError 10061] No connection could be made because the target machine actively refused it

Python on Linux, Java, Go

[Errno 111] Connection refused · java.net.ConnectException: Connection refused · dial tcp 93.184.215.14:443: connect: connection refused
ErrorERR_CONNECTION_REFUSED
Usually fixed byEither side
On the networkThe connection request was answered with a reset (RST): nothing is listening
Chrome’s codeERR_CONNECTION_REFUSED (-102)
curlExit code 7

Check the site from outside

Enter the address: we load it from our network and show the status code, how long it took, and the error if it failed.

What it means

Opening a connection starts with a request (a SYN) to the server’s address and port. If nothing is listening there, the machine answers at once with a reset — “connection refused” — and the browser gives up. A server that does not answer at all is a timeout instead, and one behind Cloudflare that refuses Cloudflare shows error 521.

Why it happens

  • The web server (Apache, nginx, LiteSpeed) is stopped or crashed.
  • It listens only on 127.0.0.1, or only on IPv4 while the domain also publishes an IPv6 (AAAA) address.
  • The domain points to a machine that runs no web server — an old server, or the wrong IP.
  • A firewall that rejects connections, on the server or on the visitor’s side.
  • HTTPS on port 443 was never set up, while the site is visited with https://.

How to fix it

  1. Check the site from outside with the check above: refused there too means the server; fine there means your side.
  2. On the server, make sure the web server is running and listening on 80 and 443 on every address the domain publishes.
  3. Check the domain’s A and AAAA records point to this server.
  4. Look for a firewall rule rejecting the port, or the visitor’s address.

If you are visiting the site

  • If the site loads from the check above, the block is near you: a firewall, antivirus, a proxy or VPN setting. Try another network.
  • On a site you run yourself on your computer (localhost), the development server is simply not running.

See it for yourself

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

curl shows which address it tried; nc tests the port alone. “Connection refused” from both means nothing accepts connections there.

Sources

Error text and meaning checked on 25 September 2026 against these official sources:

Know when your site goes down — before your visitors do

Add your site and we check it every few minutes, confirm a failure from another location — Europe, North America or Asia — before calling it down, and email you when it stops answering and when it is back. Free for two sites.

Create a free account