err_connection_refused.

The ERR_CONNECTION_REFUSED error prevents you from accessing a website, which can be a real pain. So, you might be wondering what it is and how to fix it. 🤔

Essentially, you get this error when your browser can’t connect to the website in question. The good news is that there are a few simple strategies you can try in order to fix it. For example, you can clear your browser cache, disable your firewall, or restart your router.

In this post, we’ll dive a little deeper 🤿 into the ERR_CONNECTION_REFUSED error and what it means. Then, we’ll show you six methods that can help you resolve it.

Let’s get started!

What is the ERR_CONNECTION_REFUSED error?

Before we dive into how to fix the ERR_CONNECTION_REFUSED error, it’s useful to know what exactly it is.

First of all, this is a message that you can see in your browser, or when you’re viewing a webpage’s code using an Inspect tool. Simply put, it is meant to inform you that your browser is having trouble connecting to the website’s server. As a result, you won’t be able to access that website.

It’s important to note that this error message will appear slightly differently depending on the web browser that you’re using. In any case, it usually follows something like “This site can’t be reached.”

What causes the ERR_CONNECTION_REFUSED error?

So, what causes the ERR_CONNECTION_REFUSED error?

👉 Fortunately, the answer is usually pretty straightforward. Here are a few common culprits:

While this list isn’t comprehensive, there’s a good chance that one of the above is causing the ERR_CONNECTION_REFUSED error.

How to fix the ERR_CONNECTION_REFUSED error?

Now that you know a bit more about the ERR_CONNECTION_REFUSED error and what causes it, we’re going to show you some simple ways you can fix it! If you try one of these tactics and it doesn’t work, just move on to the next method on the list.

  1. Clear your browser cache
  2. Disable your firewall
  3. Restart your router
  4. Flush your DNS
  5. Change your DNS server address
  6. Reset your TCP/IP settings

1. Clear your browser cache

If a corrupt or outdated cache is causing the ERR_CONNECTION_REFUSED error, the easiest way to remedy this is by clearing your browser cache. The exact steps to do this will depend on your browser, but the process is typically pretty similar.

In Google Chrome, simply click the three vertical dots in the upper right-hand corner of your screen. Then, go to More Tools > Clear Browsing Data:

Google Chrome Tools.

Then, you’ll need to make your selections. At a minimum, make sure to check the box next to Cached images and files. You might also want to clear your cookies:

Clear browsing data in Chrome can resolve the ERR_CONNECTION_REFUSED error.

Make sure to choose an appropriate Time range as well. To be safe, you may want to simply go with “All time”.

⚠️ Note: Please keep in mind that clearing cache will log you out of websites because your saved login details might get erased. It might also make websites load slower initially, as your browser needs to redownload all information.

Selecting a time range for clearing browser data in Chrome.

Once you’ve made your selections, just click on Clear data. For detailed instructions on how to complete this process in other web browsers, check out our comprehensive guide on clearing browser caches.

When you’re ready, return to the page that was giving you the ERR_CONNECTION_REFUSED error message and see if it’s now working. If you’re still getting the error, continue on to the next method!

2. Disable your firewall

Sometimes, your device’s firewall can interfere with your browser’s website connection, triggering the ERR_CONNECTION_REFUSED error message. If you suspect this is the issue, you can disable your firewall in your system settings.

Again, this process will depend on the device you’re using. To do this on a macOS, navigate to System Preferences > Security & Privacy > Firewall:

Firewall settings on a Mac device.

You’ll need to click on the lock in the bottom left-hand corner and enter your password to make changes.

Next, simply hit Turn Off Firewall and click on the lock again to prevent further changes:

Disabling your firewall can fix the ERR_CONNECTION_REFUSED error.

And that’s it! 😎

3. Restart your router

If you’re still seeing the ERR_CONNECTION_REFUSED error after clearing your browser cache and disabling your firewall, it’s time to restart your router.

As you probably already know, this is super easy. Just unplug your router and wait at least 30 seconds, but even up to two minutes.

Then, plug it back in and press the power button. Wait until it reestablishes a connection and try to access the website in question to see if it’s working.

4. Flush your DNS

Your DNS cache functions similarly to a browser cache, but it stores IP addresses instead of web files. Therefore, it can also become corrupt or outdated and lead to the ERR_CONNECTION_REFUSED error. You can fix this issue by flushing your DNS.

On a macOS, start by opening the Terminal application. Then, run the appropriate command prompt for your version of macOS. For instance, for macOS 12 (Monterey), you’d run the following command:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

On a Windows device, simply open Command Prompt and type in the following command:

ipconfig /flushdns

Then, hit Enter. ⌨️

5. Change your DNS server address

If none of the previous methods resolved the ERR_CONNECTION_REFUSED error, the issue may be your DNS configuration. Fortunately, you can fix this by changing your default DNS server address. You can use a free public DNS server like Google DNS or Cloudflare.

To do this on a macOS, go to System Preferences > Network > Advanced > DNS:

macOS DNS server settings.

After that, click on the + symbol in the bottom left-hand corner of the screen:

Changing your DNS server address in macOS (this can resolve the ERR_CONNECTION_REFUSED error).

Now, enter the new DNS you’d like to use. Click on OK followed by Apply to save your changes.

If you’re using Windows or a different operating system, consult Cloudflare’s setup instructions. You should be able to find your OS in the submenu.

If the website you’re trying to access is still showing the ERR_CONNECTION_REFUSED error after you’ve changed your DNS address, continue on to our final method!

6. Reset your TCP/IP settings

Hopefully one of the previous approaches resolved the ERR_CONNECTION_REFUSED error message. But, if it hasn’t, this could be because your internet connection isn’t configured properly.

To fix this, you can reset your TCP/IP settings. On a macOS, return to your System Preferences.

Then, go to Network > Advanced > TCP/IP:

Resetting the TCP/IP settings on a macOS.

From here, all you need to do is hit the Renew DHCP Lease button. Then, return to the website you were trying to access to see if the ERR_CONNECTION_REFUSED message has disappeared!

Conclusion 🧐

When you’re browsing the web, the ERR_CONNECTION_REFUSED error message can keep you from viewing content. So, it’s useful to know how to fix it!

To recap, there are several ways that you can resolve the ERR_CONNECTION_REFUSED error. To start, you can try clearing your browser cache, disabling your device’s firewall, or restarting your router. If that doesn’t work, you may want to try flushing your DNS, changing your DNS server address, or resetting your TCP/IP settings.

💡 If you found this post helpful, then you might also appreciate our thorough roundup of the most common WordPress errors and how to fix them.

Do you have any questions about how to fix the ERR_CONNECTION_REFUSED error? Let us know in the comments section below!

Yay! 🎉 You made it to the end of the article!

0 Comments
Inline Feedbacks
View all comments

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!