How To Resolve The ERR_CONNECTION_REFUSED Error
Oh no. You’re trying to load a page on your website, but all you get is an ERR_CONNECTION_REFUSED error message.
In many cases, this is caused by a gremlin on your device. Bad browser extensions, misbehaving proxies, and poor internet connections are all possible causes. But if you find the error popping up on someone else’s computer, or connected to a different Wi-Fi network, you might need to take action to fix your site.
If you’re not familiar with the ERR_CONNECTION_REFUSED error, knowing where to begin can be tricky. How do you even diagnose the problem? Well, this guide is a good place to start.
Keep reading to discover why this error happens, and how you can fix it.
What Is An ERR_CONNECTION_REFUSED Error?
ERR_CONNECTION_REFUSED is an error that can occur when you try to connect to a web server or other network service. It indicates that the server actively refused your connection attempt. This is usually because the server isn’t accepting incoming requests.
Technically, it’s worth noting that ERR_CONNECTION_REFUSED errors happen at the network connection level. That is, before any HTTP request is sent. That’s why you don’t see an HTTP status code ( like a 404 or 500).
The ERR_CONNECTION_REFUSED error is also different from getting no response at all. A refused connection means something is listening but rejected it. No response indicates that the server isn’t even listening.
What Causes ERR_CONNECTION_REFUSED Errors?
So, why is the server being so antisocial? Well, there could be several possible reasons:
- The web server hasn’t got the proper software installed.
- The incorrect server has been requested, or a DNS issue.
- The server software has crashed, or there is server downtime due to maintenance.
- The listening process has been stopped intentionally.
- A firewall or some other software is blocking the port for incoming requests.
- A faulty internet connection, or incorrect internet settings.
In other words, the troubleshooting process revolves around figuring out why the server is refusing requests. It could either be a problem on the client side (i.e., visitor devices) or on the server side.
What Does An ERR_CONNECTION_REFUSED Error Look Like?
Bear in mind that ERR_CONNECTION_REFUSED errors appear differently depending on which platform and browser you’re using.
On Google Chrome, you will see an error page that reads, “This site can’t be reached.”
Mozilla Firefox users who encounter an ERR_CONNECTION_REFUSED error will see a message that says, “Unable to connect Error.”
Meanwhile, those of us who use Microsoft Edge will get a different page, with the message, “Hmmm…can’t reach this page.”
How To Fix An ERR_CONNECTION_REFUSED Error
Now we know the issue we need to solve, it’s time to start making some investigations.
Whoa there, Sherlock! Before you start digging around on your server, it’s important to run a quick test. Are you seeing the error only when visiting your website, or does it appear on multiple sites?
If the problem is universal, you have a client-side error. Scroll down to the section on troubleshooting tips for visitors.
But if the ERR_CONNECTION_REFUSED message only appears for your website, you will need to take action to get your site working again.
Don’t worry, this shouldn’t take long. Here’s your checklist:
Disable Active Plugins
Content Management System (CMS)
A Content Management System (CMS) is a software or application that provides a user-friendly interface for you to design, create, manage, and publish content.Read More
In WordPress, you can disable plugins quickly from your dashboard:
- Go to Plugins > Installed Plugins.
- For each active plugin, click Deactivate.
- Check if the site works normally now, without plugins.
If the errors disappear, try reactivating your plugins one by one. Test the site after you enable each plugin.
If the error message crops up again, the plugin you last activated is the one to blame. If an update is available, make sure to install the current version.
Otherwise, it might be time to find an alternative.
Change Your Theme
Much like plugins and extensions, themes can be the cause of ERR_CONNECTION_REFUSED errors. This is most likely to happen if you’re using an outdated third-party theme.
To test whether a theme is causing your headaches, switch to an official theme made by the developer of your chosen CMS. In WordPress, this would mean switching to the Twenty Twenty-Three theme via your dashboard:
- Go to Appearance > Themes.
- Click Activate on Twenty Twenty-Three, or the latest default theme.
- Check if ERR_CONNECTION_REFUSED has resolved after making the switch.
If you no longer see an error, your custom theme probably needs an update or reset. Reach out to the developer of your theme for fixes, or consider changing to a different theme.
Increase Your PHP max_execution_time
Some connection errors happen because a script on your website is taking too long to execute. One way to address this is by increasing the max_execution_time in your PHP settings.
PHP (Hypertext Preprocessor) is an open-source scripting language. It’s widely used in web development and can be embedded in HTML. Several popular Content Management Systems (CMS), such as WordPress, are built with PHP.Read More
To test whether this is the cause of your problems, try doubling it from 30 seconds to 60 seconds:
- Add this line to your wp-config.php file: ini_set( ‘max_execution_time’, 60 );
- Save changes and test if timeout errors reduce.
If you don’t have access to PHP configs, reach out to your web host for assistance with increasing timeouts.
Get In Touch With Your Host
If you’ve tried all the troubleshooting tips mentioned above and are still seeing ERR_CONNECTION_REFUSED, it’s a good idea to get in touch with your web host’s support team.
They have better access to key information, meaning they can investigate the problem at a deeper level.
Send them details about the error and when it seems to happen. Your host can then check server logs, load, configurations, and resource usage to pinpoint the cause.
Folks who host their website with DreamHost get 24/7 access to our excellent support team via live chat. They can diagnose any strange errors that pop up, and get your site back up and running smoothly.
How To Fix ERR_CONNECTION_REFUSED Errors As A Visitor
As you try to track down the cause of your ERR_CONNECTION_REFUSED woes, it’s worth bearing in mind that these errors often come from the client side. In other words, something that is specific to your device or network.
If you’re seeing errors popping up all over the place, try following these troubleshooting steps:
Clear Out Your Browser
As you explore the web, your browser saves files locally for quick access. These files can get corrupted, leading to connectivity issues like refused connections.
The process for clearing out your cache and cookies usually involves visiting your browser settings menu. On the desktop version of Chrome, the process looks like this:
- To the right of the address bar, click the three dots in the menu bar.
- Select Settings from the drop-down menu.
- Navigate to Privacy and Security > Clear Browsing Data.
- Select Cached images and files and Cookies and other site data, before clicking Clear.
Then, try to reload the webpage to see if the error has cleared.
Check Your Internet Connection
One common cause of the ERR_CONNECTION_REFUSED error is an unreliable internet connection.
If you’re at home, check that the status lights on your router are lit up as usual. Red lights can mean that the internet connection to your home isn’t working properly.
The problem may resolve itself in a few minutes. Otherwise, you might need to get in touch with your ISP (Internet Service Provider).
If you don’t have easy access to the router, you can check your connection by running a speed test. Google has one built in; Just search for “speed test” and follow the instructions provided.
Bear in mind that it’s not always the actual internet connection that is to blame — Sometimes, routers misbehave. To check your Wi-Fi connection:
- On Windows: In the Control Panel, go to Network and Internet > Network and Sharing Center, and select the blue Wi-Fi link.
- On Mac: Hold the option key, and click the Wi-Fi icon on the status bar at the top of your screen. Then, select Wireless Diagnostics from the menu.
Restart Your Device
Sometimes, all you need is a simple restart to clear up connection issues.
Try rebooting your computer, phone, tablet, or even your router if you can easily gain access to the power button or unplug the power supply.
This process flushes the DNS resolver cache, meaning that any invalid DNS address will be washed away. Restarting your devices will also reset certain network settings to the original default settings.
(It’s also possible to flush your DNS cache manually without having to turn off your device).
Dive Into Your DNS Settings
When a simple reboot doesn’t do the trick, it might be because the DNS configuration you are using isn’t working correctly. This can cause errors because your browser doesn’t know where to find the website you want.
To test this possible cause, you will need to switch to an alternate DNS server. You can do this by visiting the internet settings panel on your device and finding the DNS configuration options:
On Windows: Open Start and type “Control panel” in the search bar. Click on the app to open and navigate to Network and Sharing Center. Click on your current network next to “Connections” and then open Properties. Click Use the following DNS server addresses.
Type in one of the public DNS addresses listed below.
On Mac: In System Settings, open Network. Then, click the Advanced… button in the bottom right, and select the DNS tab.
Here, you should see your current DNS server address. This is usually owned by your internet provider. Add or replace this with the IP addresses of public DNS servers. Here are some popular options:
- Google Public DNS: 220.127.116.11 or 18.104.22.168
- Cloudflare DNS: 22.214.171.124 or 126.96.36.199
- OpenDNS Home: 188.8.131.52 or 184.108.40.206
If this fixes your problem, you can either keep your new server IP address or get in touch with your ISP for additional help.
Just remember, your DNS cache could be to blame. This holds temporary entries to speed up the page loading process. However, outdated DNS cache entries can block domains. If in doubt, restart your device or manually clear your DNS cache.
(Temporarily) Disable Your Security Software
Using a firewall and antivirus software is wise if you want to keep your devices secure. Unfortunately, overzealous security tools can sometimes block connections — leading to client-side issues.
To test whether firewall interference or antivirus protection is causing your ERR_CONNECTION_REFUSED errors, try temporarily disabling your security programs and see if it makes a difference.
If you’re using the built-in Defender Firewall on Windows:
- Head to Settings > Privacy & security> Windows Security.
- Click on Firewall & network protection.
- Select: Domain network.
- Under Microsoft Defender Firewall switch the setting to Off.
Don’t leave it off permanently though! If you discover that certain domain names are being blocked, make sure to whitelist them in your chosen app.
Check Proxy Settings
Much like security software, proxies and VPN services can interfere with connections and domain name resolution, leading to ERR_CONNECTION_REFUSED errors.
To check if your proxy server settings are causing issues on Windows:
- Visit the Control Panel.
- Go to Network and Internet > Internet Options > Connections > LAN Settings.
- Deselect two options: Automatically detect settings and Use a proxy server for your LAN.
- Save the changes by clicking Ok.
- Open up System preferences.
- Navigate to Network > Advanced > Proxies.
- Make sure all proxy protocols in the list are unchecked.
- Click Ok to save any changes.
Try loading the site again — if the error goes away, you know the proxy was at fault. Explore your network settings, or ask your network admin to allow access to any mistakenly blocked domains.
Given the privacy implications, removing proxy protection isn’t a long-term solution. However, disabling it temporarily can help you to pin down technical errors.
Disable Browser Extensions
Some ad blockers, tracking protection extensions, or VPN plug-ins added to your browser can inadvertently block access to certain sites and cause ERR_CONNECTION_REFUSED.
We see this most often with Chrome Extensions, mainly because they’re so popular.
To test if Chrome Extension issues are to blame:
- Click the three dots in the top-right corner, just along the search bar.
- Open the Extensions menu by navigating to Tools > Extensions.
- For each extension installed, toggle it to Off to disable it. Alternatively, you can click Remove on suspicious extensions to uninstall completely.
After disabling or removing extensions, try reloading the website displaying the error. If the site now works, turn extensions back on one by one until you identify the problematic plugin.
Make sure to note which extension caused the issue, and rummage through the settings to see whether it is set up to block any domains. Many privacy extensions have options to whitelist certain domains to get around this problem.
Take A Peek At Your .hosts File
If none of the above is making any difference, you might have a case of the .hosts file blues.
Traditionally speaking, this file is pretty helpful. It maps hostnames (like DreamHost.com) to IP addresses (like 192.0.2.235). The problem is some apps use this file to block access to specific domains.
You can find a .hosts file in every operating system:
In Windows open the Start menu and type “Notepad” in the search bar. Right-click the app and click Run as administrator. Once Notepad is open, click File > Open. Then, enter this file name into the text box: C:\Windows\System32\drivers\etc\
For macOS, hop to Finder and navigate to /etc/hosts
For all other operating systems:
- Linux/Unix: Check out /etc/hosts
- Android: Using any file browser app, navigate to /system/etc/hosts
- iOS: Via the Files app, go to /etc/hosts
Open the file and check for any blocked or redirected domains. If you find any, edit the file to remove those entries. Then, see if you still have an error when loading websites.
Reinstall Your Browser
If you’ve tried all other troubleshooting steps and are still seeing ERR_CONNECTION_REFUSED errors, a clean reinstall of your web browser may help resolve any corrupted files or settings causing issues.
Here’s what you need to do:
- Close all windows and quit the browser completely.
- On Windows, go to Start > Settings > Apps > Apps & features. On Mac, head over to Finder > Applications.
- Search for your internet browser, and uninstall the app. Confirm any prompts to fully uninstall.
- Next, restart your computer. This helps to flush any cached files.
- Download the latest version of your chosen browser. Make sure to visit the official source.
- Run through the reinstallation process. Make sure to deselect any options to import previous data.
Once the browser is installed, try loading the problematic sites again. The fresh install should not have any corrupted extensions, caches, or configurations that could cause issues.
If you continue to see connection issues, the problem likely lies elsewhere, such as with your network setup or the website’s server configuration. But reinstalling the browser is worth trying, just to rule out any client-side corruption. Make sure to back up bookmarks and your passwords before uninstalling!
Fix Errors Faster With DreamHost
From clearing caches, and fixing internet-related issues, to tracking down incorrect firewall settings, we’ve walked through a lot of troubleshooting methods in this guide.
In most cases, you won’t need to use every possible solution. Using simple tests, you should be able to figure out the likely problem:
- Do you only get ERR_CONNECTION_REFUSED errors on one website? Chances are, it’s a server-side issue.
- Seeing ERR_CONNECTION_REFUSED errors on multiple sites? It is almost certainly a client-side problem.
While we can’t fix your internet connection or your proxy problems, we can fix your website if it starts showing an error.
All of our hosting packages come with 24/7 live support, and our expert staff can handle any technical query you have.
Sounds good? Sign up for hosting today to give it a try for yourself.
Get Content Delivered Straight to Your Inbox
Subscribe to our blog and receive great content just like this delivered straight to your inbox.