RackUp IT - View Cloud Hosting Plans

Get started now or speak directly with our engineering team for specialized assistance.

Logo
DevelopmentWEB & APPCalculatorTOOLServicesProductBlogOur TeamCareers
View Plans
Home>Blog>ERR_CONNECTION_REFUSED: What It Means and How to Fix It
DevOps & Tutorials

ERR_CONNECTION_REFUSED: What It Means and How to Fix It

Alex Vance
Alex Vance
Published Nov 18, 2026•✓ Verified Expert Reviewed•4 min read
ERR_CONNECTION_REFUSED: causes and fixes

Key Takeaways

  • ✓The browser reached the address and the connection was rejected.
  • ✓Test on another network to see whether the cause is yours or the server's.
  • ✓On localhost it nearly always means nothing is listening on that port.
  • ✓On your own server: check the web server, listening ports, firewall and DNS.

Table of Contents

  • •ERR_CONNECTION_REFUSED: What It Means and How to Fix It
  • •ERR_CONNECTION_REFUSED: What It Means and How to Fix It
  • •What the Error Looks Like
  • •First, Find Out Where the Problem Is
  • •If the Problem Is on Your Side
  • •Localhost Refused to Connect
  • •If It Is Your Website or Server
  • •ERR_CONNECTION_REFUSED vs Similar Errors
  • •Frequently Asked Questions

ERR_CONNECTION_REFUSED: What It Means and How to Fix It

ERR_CONNECTION_REFUSED is a Chrome error (Edge and other Chromium browsers show it too) that appears with the message "This site can't be reached" and "refused to connect". It means your browser found the server's address and tried to connect, and the connection was rejected: nothing is accepting connections on that address and port, or a firewall turned the request away.

ERR_CONNECTION_REFUSED: What It Means and How to Fix It

The cause can be on your device, on your network or on the server. The quickest way to tell is to open the site on another device and another network. This guide covers all three cases, plus the common localhost refused to connect case for developers.

What the Error Looks Like

  • Chrome and Edge: This site can't be reached. example.com refused to connect. ERR_CONNECTION_REFUSED

  • Firefox: Unable to connect

  • Safari: Safari can't connect to the server

  • Command line: curl: (7) Failed to connect ... Connection refused

First, Find Out Where the Problem Is

TestResultMeaning
Open the site on mobile dataIt loadsThe problem is your device or your network
Open the site on mobile dataSame errorThe problem is the website's server
Open other websites on the same deviceThey fail tooYour connection, proxy, VPN or security software

If the Problem Is on Your Side

  1. Reload and check the address. A wrong port in the URL, such as :8080, gives this error at once.

  2. Restart your router and reconnect.

  3. Turn off your VPN or proxy. On Windows, open Settings, Network and Internet, Proxy, and switch off any manual proxy you did not set.

  4. Clear the browser cache or try a private window. If the private window works, turn off extensions one at a time.

  5. Flush the DNS cache. On Windows run ipconfig /flushdns. On macOS run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. An old cached address can point at a server that no longer hosts the site.

  6. Pause your antivirus or firewall briefly to test, then turn it back on and add an exception if that was the cause.

  7. Change DNS servers to a public resolver such as 1.1.1.1 or 8.8.8.8 if your provider's DNS returns a stale address.

Localhost Refused to Connect

On localhost or 127.0.0.1, this error almost always means no program is listening on the port you opened.

  1. Check that your server is running. Look at the terminal where you started it; it may have crashed on startup.

  2. Check the port. The app prints the port it listens on. Opening localhost:3000 when it listens on 5173 gives this error.

  3. List what is listening. On Linux and macOS: lsof -i :3000. On Windows: netstat -ano | findstr :3000.

  4. Check the bind address. An app inside Docker, WSL or a virtual machine has to listen on 0.0.0.0, and the port has to be published, or the host can't reach it. See docker logs to read the container's startup output.

  5. Use http, not https, unless your local server has a certificate set up.

If It Is Your Website or Server

When everyone gets the error, the server is refusing connections on port 80 or 443. Connect over SSH and check these in order:

  1. Is the web server running? systemctl status nginx or systemctl status apache2. If it failed to start, test the config with sudo nginx -t; see common Nginx errors for startup failures.

  2. Is it listening on the right ports? sudo ss -tlnp lists listening ports. You should see 80 and 443 on 0.0.0.0 or [::], not only on 127.0.0.1.

  3. Is the firewall open? On Ubuntu, sudo ufw status should allow 80 and 443. Cloud providers also have their own firewall or security group in the control panel. Our guide to opening ports on a VPS covers both layers.

  4. Does DNS point at the right server? dig +short yourdomain.com should return your server's current IP address. After a migration, an old record sends visitors to a server that no longer answers.

  5. Is HTTPS set up? If the site loads on http:// and is refused on https://, nothing listens on port 443. Install a certificate and add the HTTPS server block.

ERR_CONNECTION_REFUSED vs Similar Errors

ErrorMeaning
ERR_CONNECTION_REFUSEDThe server's address answered and rejected the connection
ERR_CONNECTION_TIMED_OUTNo answer at all; often a firewall silently dropping the request or a server that is off
ERR_CONNECTION_RESETThe connection started and was cut off partway
DNS_PROBE_FINISHED_NXDOMAINThe domain name could not be found, so no connection was tried (see our guide)

Frequently Asked Questions

Is ERR_CONNECTION_REFUSED a problem with my computer or the website?
It can be either. If the site opens on another network or device, the cause is on your side. If it fails everywhere, the website's server is refusing connections.

Why does localhost refuse to connect?
No program is listening on that port. Start your development server, check the port number it prints, and open exactly that address.

Can a firewall cause ERR_CONNECTION_REFUSED?
Yes. A firewall on your device, on your network or on the server can reject the connection. Firewalls that drop requests without replying cause a timeout instead.

How do I fix ERR_CONNECTION_REFUSED on Android?
Switch between Wi-Fi and mobile data, turn off any VPN or private DNS setting, clear Chrome's cache in the app settings, and restart the phone.

← Previous Articledocker compose up --build Explained (With Examples)Next Article →Linode (Akamai) Alternatives in 2026: VPS Hosting Compared
Interactive 60-Second Tool

Unsure Which Cloud Hosting Plan Fits Your Site?

Answer 4 quick diagnostic questions to estimate the server CPU, RAM and storage you need with transparent pricing.

Free Migration 99.9% Uptime Target
Calculate My Hosting Build
Alex Vance
Written ByAlex Vance

Cloud Infrastructure Engineer.

99.9% Uptime Target

RackUp IT - View Cloud Hosting Plans

View Hosting Plans

View Hosting Plans

CONTENTS

  • ERR_CONNECTION_REFUSED: What It Means and How to Fix It
  • ERR_CONNECTION_REFUSED: What It Means and How to Fix It
  • What the Error Looks Like
  • First, Find Out Where the Problem Is
  • If the Problem Is on Your Side
  • Localhost Refused to Connect
  • If It Is Your Website or Server
  • ERR_CONNECTION_REFUSED vs Similar Errors
  • Frequently Asked Questions

Categories

  • VPS Hosting
  • DevOps & Tutorials
  • WordPress Hosting
  • Cloud Hosting
  • Server Stack
  • Networking & Security
  • Web Hosting / Managed Cloud
  • E-Commerce
  • Hosting & SEO
  • Hosting Benchmarks
  • Cloud Backup & DevOps
  • Managed VPS

Recent Posts

  • Vultr Alternatives in 2026: VPS Hosting for Developers Compared
  • Docker Port Mapping Explained: -p, EXPOSE and Compose ports
  • Bluehost Alternatives (2026): WordPress Hosting Without the Renewal Price Jump

Tags

err_connection_refusedchrome errorslocalhosttroubleshooting

Related Posts

Docker port mapping coverDevOps & Tutorials
Nov 26, 2026

Docker Port Mapping Explained: -p, EXPOSE and Compose ports

How Docker port mapping works: the -p syntax, EXPOSE vs publishing, Compose ports, service names on the network, and the UFW security detail most guides skip.

Read Article →
Docker Engine vs Docker Desktop coverDevOps & Tutorials
Nov 24, 2026

Docker Engine vs Docker Desktop: Which One Do You Need?

Docker Engine is the open-source runtime for Linux; Docker Desktop is a desktop app with a VM, GUI and its own licence. Which to use on servers and laptops.

Read Article →
docker compose up --build coverDevOps & Tutorials
Nov 18, 2026

docker compose up --build Explained (With Examples)

docker compose up --build builds images before starting containers. When you need it, when you don't, and the related flags people confuse, with examples.

Read Article →
Logo

Expert Web & App Development, UI/UX Design, Branding, and Consulting to scale your business.

Company

  • About Us
  • Blog
  • Contact
  • Our Team
  • Careers

Services

  • Web Development
  • App Development
  • UI/UX Design
  • Consulting
  • Managed WordPress VPS
  • Website Speed Test

Subscribe to our newsletter

We accept
  • bKash
  • Nagad
  • Rocket
  • Upay
  • CellFin
  • Meghna Pay
  • OK Wallet
  • Tap
  • mCash
  • DBBL Nexus
  • Visa
  • Mastercard
  • American Express
  • Crypto
Pay with Visa, Mastercard, American Express, DBBL Nexus, CellFin, Rocket, bKash, Tap, Meghna Pay, Nagad, mCash, Upay and OK Wallet. Verified by EPS

© 2026 Rackup IT Solution. All rights reserved.

Privacy PolicyTerms of Service