Skip to content
Browser messages3 min read

ERR_CONNECTION_REFUSED: the server refused the connection

ERR_CONNECTION_REFUSED

Short answer

ERR_CONNECTION_REFUSED means your browser reached the server's address, but the server rejected the connection on the requested port, either because nothing is listening there or because a firewall refused it. Start by checking the URL, port and proxy settings; site owners should then check DNS records and server status.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Common causes
  2. How to fix it
  3. Prevention
  4. On ArabyHost

Chrome shows this under “This site can’t be reached” with a line saying the domain refused to connect. A refusal is an actual reply from the other side: your request reached the IP address, but no service is listening on the requested port (443 for HTTPS, 80 for HTTP), or a firewall answered with an explicit reject.

Common causes

  • A wrong URL or port: http://example.com:8080 or localhost:3000 when nothing runs on that port.
  • A proxy or VPN on your device forwarding the connection somewhere that doesn’t work.
  • An A record pointing to an old IP, such as the previous server after a migration.
  • The web service is stopped or restarting on the server.
  • The server firewall rejects your IP after repeated failed logins to cPanel, FTP or email.
  • Security software or a firewall on your device blocking the site.

How to fix it

If you’re a visitor

  1. Check the URL: remove any stray port such as :8080 and try https:// instead of http://.
  2. Turn off the proxy: on Windows under Settings » Network & Internet » Proxy; on macOS under System Settings » Network » Details » Proxies. Chrome uses the system setting.
  3. Disable your VPN and any proxy extensions for a moment.
  4. Flush DNS: run ipconfig /flushdns on Windows, then reopen the browser.
  5. Try another network, such as mobile data. If the site loads there, the issue is your network, or your IP is blocked by the site.

If you own the site

  1. Check DNS. Look up the A record with the DNS lookup tool and compare it with the IP shown in your hosting panel. After a move the old record can linger for hours because of DNS propagation.

  2. Test the port directly:

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

    On Windows PowerShell: Test-NetConnection example.com -Port 443. If you see Connection refused from every network, the problem is the server or the address the domain points to.

  3. If only you are affected, your IP may have been blocked after repeated wrong passwords, often a mail or FTP client still saving an old one. Find your public IP and send it to support, then fix the saved password so the block doesn’t return.

  4. In local development, make sure the server is running (npm run dev, php artisan serve) on the same port you’re opening. If you see ECONNREFUSED inside a Node app, read Node.js ECONNREFUSED.

  5. Behind Cloudflare, a refusal from your origin shows up for visitors as Cloudflare error 521 instead of this message.

Prevention

  • When you change a password, update it in every app that stores it, so failed attempts don’t get your IP blocked.
  • Before a migration, lower the TTL on your records and update the A record as soon as the new server is ready.
  • Don’t publish an app that has to be opened on a custom port; attach it to a domain or subdomain.

On ArabyHost

Imunify360 protects accounts against intrusion attempts and may temporarily block an IP that keeps failing to log in; if that happens, send your IP to Arabic-speaking support via the contact page. On AI/Developer plans, Node.js and Python apps run through Phusion Passenger with the CloudLinux selectors, attached to a domain or subdomain, so you never open a port yourself: reach the app through its domain, not a port number. The steps are in running a Node.js app, and the Araby AI assistant in the panel can read the error log if the app fails to start.

FAQ

What's the difference between ERR_CONNECTION_REFUSED and ERR_CONNECTION_TIMED_OUT?

A refusal is an immediate answer saying the connection isn't accepted; a timeout means no answer came back at all. Refused usually means nothing is listening on that port; timed out usually means a block or an unresponsive server.

Why do I get it on localhost?

Your local app isn't running, or it's listening on a different port from the one you typed. Start the dev server and use the port it prints in the terminal.

The site works for everyone except me. Why?

Most likely a proxy, VPN or security software on your device, or your IP has been blocked by the server's firewall. Try another network; if the site loads there, send your IP to the site owner or support.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.