How to Fix ERR_CONNECTION_REFUSED in Chrome
Tell a local server problem from a public site problem, then apply the matching fix.
Updated
TL;DR
ERR_CONNECTION_REFUSED is Chrome reporting that the computer at that address turned its connection down, usually because no server listens on that port. For localhost, start your dev server and open the exact URL it prints; for a public site, check the address and your security software first.
What the error looks like in Chrome and its tools
Chrome names the computer that refused; tools built on Chrome report the same net:: code.
| Where | What you see |
|---|---|
| Chrome, local dev server | This site can't be reached. localhost refused to connect. ERR_CONNECTION_REFUSED |
| Chrome, address typed as an IP | This site can't be reached. 127.0.0.1 refused to connect. ERR_CONNECTION_REFUSED |
| Chrome, public site | This site can't be reached. www.example.com refused to connect. ERR_CONNECTION_REFUSED |
| Chrome DevTools, Network panel Status column | (failed) net::ERR_CONNECTION_REFUSED |
| Chrome console log, failed fetch() | Failed to load resource: net::ERR_CONNECTION_REFUSED |
| Puppeteer page.goto() | net::ERR_CONNECTION_REFUSED at http://localhost:3000 |
| Playwright page.goto() | page.goto: net::ERR_CONNECTION_REFUSED at http://localhost:3000/ |
Why this happens
Chrome reached the computer, but no program there accepts connections on that port.
When nothing is bound to that port, the operating system replies to Chrome's opening TCP packet with a reset, so the connection ends before any page is requested.
Diagnose your ERR_CONNECTION_REFUSED first
The first three checks need only Chrome and a phone; the last two use DevTools and a terminal.
Read the host before "refused to connect"; localhost or 127.0.0.1 there means your own computer turned Chrome away.
Compare the address bar with the link you opened; if it switched to https:// or another port, Chrome was redirected to a closed port.
Open the site on a phone using mobile data; if it loads, this computer or network blocks it; if not, the site's server is down.
Open DevTools, Network tab, and reload; if only API rows show (failed) net::ERR_CONNECTION_REFUSED, the page server works and its backend port is closed.
Run curl -v with the same URL; if every address it tries ends in Connection refused, the server side is closed, not Chrome.
Solutions ranked by effectiveness
Start with the server when the address is local; the second fix covers public sites, the third forced HTTPS jumps.
- Most common fix
Start the server, then reload its URL
Applies to local dev setups. The server may have stopped on an error, or moved to the next free port.
Restart the stopped process, fixing the error in its log first.
Copy the URL it prints at startup, port included, into the address bar.
If the page loads without data, start the API server it calls as well.
Click Reload on the error page once the server reports it is ready.
- Check next
Check your side when a public site refuses
Applies when the error names a public site. A wrong address, a hosts-file entry or security software can turn Chrome away.
Check the address for typos and for a :port number the site never uses.
Delete any hosts-file line that points the site's name at 127.0.0.1 or 0.0.0.0.
In your firewall or antivirus, remove any rule that blocks Chrome or this site.
If the site fails on mobile data too, wait or contact its owner.
- For developers
Undo the jump to HTTPS or port 443
Applies when the address bar shows https:// or a new port after the error. A redirect or HTTPS-only rule sent Chrome to a port where nothing listens.
Turn off HTTPS redirects in your app's development settings, then reload.
Serve HTTPS on .dev and .app hosts, which Chrome always switches to https://.
Remove a remembered HSTS host via Delete domain security policies at chrome://net-internals/#hsts.
Stop the ERR_CONNECTION_REFUSED from coming back
Habits that keep your server's port open and point Chrome and test runners at it.
Give local projects names like shop.localhost: Chrome resolves them to loopback, and its HTTPS-only preload list has no .localhost entry.
In Playwright Test, set webServer.url, so tests start only after the app answers at that address.
On Linux servers, set Restart=on-failure in the web server's systemd unit, so systemd starts it again after a crash.
Related errors
Learn more
FAQ
Skip hosts your browser doesn't need
Add them to Geonode's Block list, and the proxy never fetches them.


