ERR_CONNECTION_REFUSED: the server refused to connect

Nothing is listening on that port, or a firewall rejects you.

Is a website down for everyone or just you?

What the error means

ERR_CONNECTION_REFUSED ("example.com refused to connect") means your browser reached a machine at that address, but nothing accepted the connection on that port: the server answered "no" straight away. Unlike a timeout, something is there; it just is not listening, or a firewall actively rejects you.

Is it the site or you?

Check the site with the tool above. If it is up for us, the refusal is specific to you: your network, a VPN or proxy, a firewall or antivirus, or the site blocking your IP. If it is down for us too, the problem is the server.

If it only happens to you

  1. Try another network (mobile data) and another browser.
  2. Turn off VPNs, proxies and the browser's proxy settings.
  3. Flush the DNS cache: an old address may point to a server that no longer runs the site.
  4. For localhost or a local address: the program you are trying to reach is not running, or listens on another port.

If it is your server

  1. Make sure the web server is running and listens on 80 and 443 (ss -tlnp on Linux).
  2. Check the server firewall and the cloud provider's security group allow those ports.
  3. Check that DNS points to the right server with the DNS lookup.
  4. To test a port on your own connection (a game server, a camera), use the open port checker.

Related errors

Last updated: