How to Fix ERR_CONNECTION_REFUSED in Chrome

By

Updated

ERR_CONNECTION_REFUSED means the server answered Chrome and said no. That is different from a timeout, where nothing answers at all. Because the server actively refused the connection, the cause is usually a specific one: the site or local server is down, the wrong port, or a firewall or security tool blocking it. The fastest first step is to decide whether you hit this on a normal website or on localhost, because the fixes are different.

Connection Refused Error in Chrome

Applies to

  • Devices: Windows, Mac, Chromebook, Android, and iPhone.
  • Browser: Google Chrome. Not version-specific.
  • Account: none needed. This is a connection error, not a sign-in error.

What does ERR_CONNECTION_REFUSED mean?

When Chrome tries to open a page, it knocks on a specific address and port. ERR_CONNECTION_REFUSED means something at that address heard the knock and refused to open the door. The refusal is fast, not a slow timeout. That tells you the network path is fine and the problem is at the destination or in a rule that blocks that exact address. So the guessy “clear everything” advice is often the wrong place to start.

First, split the problem: live website or localhost?

This one question decides which half of the guide you need.

  • A normal website (like a news site or a store). Go to the live website section below.
  • localhost or 127.0.0.1 (your own development server). Go to the localhost section below.

For a live website, also run the phone test: open the same page on your phone using mobile data with Wi-Fi off. If it fails there too, the site is down, and there is nothing to fix on your side. If it loads on your phone, the block is on your computer or network.

Fix ERR_CONNECTION_REFUSED on a live website

There are three real causes here. Match the signal, then fix that branch.

The site is down (fails on your phone too)

If the page also refuses on mobile data and on other devices, the server is refusing everyone. That is the site’s problem, not yours. Check it with an “is it down right now” service and try again later. This is the honest answer: you cannot fix a server that is refusing connections from its own end.

A security tool is blocking it (works on your phone)

If the site loads on your phone but Chrome refuses on your computer, a firewall, antivirus, VPN, or proxy is likely blocking that address.

  1. Turn off your VPN and reload.
  2. Check proxy settings. Open Chrome Settings, go to System, click Open your computer’s proxy settings, and turn off any manual proxy you did not set on purpose.

Warning: the next step turns off protection on your device. Do it only for a quick test and turn it back on right after.

  1. Briefly disable your antivirus or firewall, reload, and see if the page opens. If it does, turn protection back on and add the site to that tool’s allow list instead of leaving it off.

Chrome itself is the problem (works in another browser)

If Edge or Firefox opens the page but Chrome refuses, clean up Chrome.

  1. Delete browsing data. Go to Settings, Privacy and security, Delete browsing data, choose Cached images and files and Cookies and other site data, then click Delete data. If your menu says Clear browsing data instead, that is the same screen under its older name.
  2. Test in Incognito. Press Ctrl+Shift+N (Cmd+Shift+N on Mac). If it works there, an extension is the cause, so turn extensions off one by one.
  3. Flush the DNS cache. On Windows, open Command Prompt and run ipconfig /flushdns. A stale record can point Chrome at an address that refuses.

Fix ERR_CONNECTION_REFUSED on localhost

Developers see this constantly, and it almost always means one of four things. Check them in order.

  1. The server is not running. This is the top cause. Look at your terminal and confirm the dev server actually started and did not crash. If it is not listening, nothing can connect.
  2. Wrong port. The address in Chrome must match the port your server prints on startup. If the server says port 3000 and you opened 8080, you will get refused. Fix the port in the URL.
  3. Chrome is forcing HTTPS on a plain HTTP server. If your server only speaks HTTP but Chrome upgraded the address to HTTPS, the connection is refused. Type the address with http:// in full, or clear the saved rule.

Warning: the next step edits Chrome’s security policy for a domain. Only delete the entry for your own local domain, not for real sites.

  1. Clear the HSTS entry. Go to chrome://net-internals/#hsts, scroll to Delete domain security policies, type localhost (or your local domain), and click Delete. Then reopen the page with HTTP. Note that this page has no search function and the delete box sits below two larger query boxes, so scroll rather than using the first field you see.
  2. Check the bind address and firewall. A server bound to 127.0.0.1 will refuse a request to your machine’s network IP, and a local firewall can block the port. Bind to 0.0.0.0 for local network testing, and allow the port in your firewall.

What does not fix ERR_CONNECTION_REFUSED

A refusal is a fast, deliberate no from the far end. That single fact rules out most of the advice you will find for this error, because those fixes repair the path to the server, and the path already worked.

  • Restarting your router. The classic first move for a timeout, and close to useless here. Your traffic reached the destination and was rejected there. A router restart cannot change the destination’s answer.
  • Changing DNS servers. DNS resolved correctly, or there would have been nothing at that address to refuse you. A genuine DNS failure shows DNS_PROBE_FINISHED_NXDOMAIN instead, and that is a different guide.
  • Clearing the cache, when every browser fails. Cache and cookies only matter in the Chrome-only branch, where another browser opens the page fine. If Edge and Firefox refuse it too, Chrome’s stored data was never involved.
  • Reinstalling Chrome. This almost never helps, and on localhost it is a particular waste of time, because the usual culprits (a stopped server, a wrong port, a cached HSTS rule) live outside the browser install entirely.
  • Waiting it out, on localhost. A live site that refuses connections may come back on its own. Your own dev server will not. If it is not running, it stays not running until you start it.

The most common wasted hour on this error is a developer clearing browser data repeatedly while the dev server sits crashed in a terminal window behind the browser. Check the terminal first.

How it compares to other Chrome connection errors

The exact code tells you how far Chrome got, which points at the cause.

Error What it means Where it usually points
ERR_CONNECTION_REFUSED The server actively said no Server down, wrong port, or a firewall block
ERR_CONNECTION_TIMED_OUT No reply at all within the time limit Your network, a firewall, or an overloaded site
ERR_CONNECTION_RESET Connection opened, then dropped partway Firewall, antivirus, or an unstable network
ERR_INTERNET_DISCONNECTED Chrome sees no network at all Wi-Fi or adapter, before any site is tried
DNS_PROBE_FINISHED_NXDOMAIN The name could not be turned into an address DNS, or a typo in the address

The important takeaway: a refusal is a fast, deliberate no. Start with the port and the server instead of your network.

FAQ

What is the difference between refused and timed out?

Refused means the server answered and rejected the connection right away. Timed out means nothing answered at all. Refused points at a port, a server, or a block. Timed out points at your network or a down site.

Why do I get ERR_CONNECTION_REFUSED on localhost but the site works online?

Because localhost is your own computer. If your dev server is not running, is on a different port, or only speaks HTTP while Chrome forces HTTPS, your machine refuses the connection even though the wider internet is fine.

Does it help to clear the cache?

Only when the page works in another browser but Chrome refuses it. If every browser and your phone refuse the same site, the server is down and clearing your cache changes nothing.

Could my antivirus cause this?

Yes. Firewalls and antivirus tools can refuse connections to specific addresses or ports. Disable the tool briefly to test, and if that is the cause, add an allow rule rather than leaving protection off.

Bottom line

ERR_CONNECTION_REFUSED is a deliberate no from the far end, so skip the broad network resets and go straight to the likely cause. On a live site, use the phone test to tell a down server from a local block. On localhost, check that the server is running, on the right port, and not being forced to HTTPS.

Related


Discover more from Chrome Story

Subscribe to get the latest posts sent to your email.

About the author

How we report · Send a correction