Troubleshooting

How to fix ERR_CONNECTION_REFUSED

ERR_CONNECTION_REFUSED means your browser reached the server address but nothing accepted the connection. Learn how to tell a local problem from a server one and fix it.

BeginnercPanel hosting2 min read

ERR_CONNECTION_REFUSED is a Chrome error meaning your computer sent a connection request to the website's IP address and was actively turned away. Either no service is listening on that port, a firewall rejected you, or your browser is going to the wrong address. Start by working out whether the problem affects only you or everyone.

Before you start

  • Try the site from your phone on mobile data. If it works there, the problem is on your network or computer.
  • Note your public IP with our IP checker; you will need it if your IP is blocked.

Common causes of ERR_CONNECTION_REFUSED

  • Your IP is blocked by the server firewall after failed logins (cPanel, email or FTP).
  • The web server is down or not listening on port 80/443.
  • DNS points to the wrong IP, such as an old server.
  • A local proxy, VPN or antivirus intercepting the connection.
  • The wrong port in the URL, for example :2083 blocked by an office network.

How to fix it as a visitor

  1. Reload and try another browser.
  2. Clear the DNS cache: Windows ipconfig /flushdns, macOS sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
  3. Disable proxy and VPN. In Windows check Settings → Network → Proxy.
  4. Pause antivirus web filtering briefly to test.
  5. Restart your router if many sites fail.

How to fix it as a site owner

  1. Check the DNS. Run nslookup example.com and compare the IP with cPanel → General Information. See domain not resolving.
  2. Check if your IP is blocked. If the site works on mobile data but not your office or home connection, the firewall may have blocked you after failed logins. Follow unblock your IP.
  3. On a VPS, run ss -tlnp | grep -E ':80|:443' to confirm the web server is listening, and check the firewall allows those ports.
  4. Test the port from outside: curl -Iv https://example.com shows "Connection refused" if nothing listens.

Note: Refused is not the same as timed out. Refused means something answered "no"; a timeout (ERR_CONNECTION_TIMED_OUT) means nothing answered at all, often a firewall that drops packets.

What to check afterwards

Load the site from at least two networks and confirm cPanel, webmail and the site all open.

FAQ

Why does the site work on my phone but not my PC?

Usually your home or office IP is blocked, or your PC has a proxy, VPN or DNS cache issue.

Can a wrong hosts file cause this?

Yes. Check C:\Windows\System32\drivers\etc\hosts for an old entry for the domain.

Is ERR_CONNECTION_REFUSED a DNS error?

Not directly; DNS worked, but it may have given an outdated IP.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.