What Does ERR_CONNECTION_REFUSED Mean?
ERR_CONNECTION_REFUSED means your browser found the server's IP address and knocked on its door, but the server said "no" straight away: nothing was listening on that port, or a firewall rejected the request. Chrome shows it as "This site can't be reached. example.com refused to connect." Firefox says "Unable to connect" and Edge says "Hmm, we can't reach this page".
- Refused is not the same as timed out: a refused connection gets an instant "no". A timed-out connection gets no answer at all (see our ERR_CONNECTION_TIMED_OUT guide).
- The most common causes: the web server or app is stopped, the site is on a different port, a firewall blocks your IP, a proxy or VPN on your device is broken, or the domain points to the wrong server.
- Who can fix it: a visitor can rule out their own proxy, VPN, firewall and DNS. If the site refuses everyone, only the website owner or the hosting company can fix it.
Is It ERR_CONNECTION_REFUSED or a Different Error?
Browser connection errors look alike but point to different fixes. Use this table to find the right one.
| Error | What it means | Where to look first |
|---|---|---|
| ERR_CONNECTION_REFUSED | The server answered and refused the connection | Web server or app stopped, wrong port, firewall, proxy |
| ERR_CONNECTION_TIMED_OUT | No server answered in time | Network, firewall that drops traffic, server down |
| ERR_NAME_NOT_RESOLVED | The domain name could not be turned into an IP address | DNS, nameservers, expired domain |
| ERR_CONNECTION_RESET | The connection started and was cut off | Network, antivirus, firewall, server limits |
| 502 Bad Gateway | A proxy reached the app behind it and got a bad reply | App or PHP process, resource limits |
How Do I Fix ERR_CONNECTION_REFUSED as a Visitor?
Try these steps in order. Most visitor-side cases are a broken proxy, VPN or firewall setting on the device.
1. Check if the site is down for everyone
Open the same page on mobile data or another phone. If it fails everywhere, the website's server is refusing connections and nothing on your device will fix it. Wait, or tell the site owner.
2. Check the address and the port
Make sure you typed the right address. If the link has a port number after the domain (for example example.com:8080), that port may be closed. Try the plain address with https:// and no port.
3. Turn off proxy and VPN
A broken proxy setting is a very common cause. On Windows open Settings → Network & Internet → Proxy and turn off Use a proxy server. In Chrome you can also check chrome://settings/system. Disconnect any VPN or proxy extension and reload.
4. Pause firewall or antivirus web protection
Security software can block a site and make the browser show a refused connection. Pause its web protection for a minute and reload. If the site opens, add it as an exception instead of leaving protection off.
5. Clear browser cache and flush DNS
Open the page in an Incognito window. If it works there, clear cookies and cached files for that site. If the site moved to a new host recently, run ipconfig /flushdns on Windows, clear the cache at chrome://net-internals/#dns, or switch DNS to 1.1.1.1 or 8.8.8.8 so your device gets the new address.
6. Restart your router
Turn the router off for 30 seconds and back on. This clears its DNS cache and resets stuck connections. If only one Wi-Fi network has the problem, the router or ISP is the cause.
How Do I Fix ERR_CONNECTION_REFUSED on My Own Website (cPanel)?
If visitors report that your site refuses to connect, work through these checks.
1. Check if your IP is blocked by the server firewall
If your site refuses connections for you but works on mobile data, the server firewall may have blocked your office or home IP after too many failed logins (for example wrong FTP, email or cPanel passwords). Find your IP on a site like whatismyip.com and send it to your host to unblock. Then fix the saved wrong password in your FTP or email app so it does not happen again.
2. Check the domain's A records
In cPanel open Zone Editor and make sure the A records for @ and www point to your hosting server's IP (shown in the cPanel sidebar). If the domain points to an old server that no longer runs a website, browsers get a refused connection. Our ERR_NAME_NOT_RESOLVED guide explains nameservers and DNS records step by step.
3. Check SSL and HTTPS
If http:// works but https:// is refused, the site has no working SSL on port 443. In cPanel open SSL/TLS Status and run AutoSSL for the domain. Wait a few minutes and try again.
4. Check Cloudflare settings
If you use Cloudflare, check that the DNS records in Cloudflare point to your hosting IP and that the SSL mode matches your server (use Full when the server has an SSL certificate). If you recently paused Cloudflare or changed nameservers, give DNS a few hours to update.
5. Check resource usage and the error log
When an account hits its limits, some requests fail. In cPanel check Resource Usage (see how to check resource usage in cPanel) and read the error_log file in your site's folder for errors at the time of the problem.
How Do I Fix ERR_CONNECTION_REFUSED on a VPS or Node.js App?
On a VPS a refused connection almost always means no program is listening on the port, or the firewall rejects it.
1. Check that the web server is running
Run sudo systemctl status nginx (or apache2, httpd or lsws). If it is stopped, start it with sudo systemctl start nginx and read the error it shows if it fails to start.
2. Check what is listening on the port
Run sudo ss -tlnp and look for ports 80 and 443 (and your app's port, such as 3000). If nothing is listening on the port you visit, the browser gets a refused connection.
3. Check the firewall
With UFW run sudo ufw status. Ports 80 and 443 must be allowed: sudo ufw allow 80 and sudo ufw allow 443. Also check any firewall in your VPS control panel.
4. Node.js apps
If the app listens only on 127.0.0.1, it can be reached through Nginx but not directly from the internet, which is normal. Make sure Nginx's proxy_pass points to the right port and that the app is running with pm2 status. Our guide on hosting Next.js on a VPS with PM2 and Nginx shows the full setup.
systemctl status, ss -tlnp and ufw status show the cause of a refused connection in a few minutes.When Should I Contact Hosting Support?
Contact your host if the site refuses connections on every network, if cPanel also does not open, or if you think the server firewall blocked your IP. Send the domain name, your public IP address, the time and a screenshot. Alif Host customers can message support on WhatsApp at +92 313 2946143 or open a ticket in the Client Area.


