In an online world, any kind of network connection error can be a pain.
At the top of this list lies the “localhost refused to connect” or “RR_Connection_Refused” error—two similar errors with different wording.
The glitch can have different roots, from the website operator to your DNS settings, Windows, and third-party applications.
Whatever the reason, here’s how to get around the situation.
Do The Initial Checks
Before you take any corrective steps, it’s worth testing a few things to ensure it’s really the localhost causing you interruption, not the OS, router, ISP, website, or browser.
These checks can help you narrow down the probable causes, avoiding unnecessary efforts.
1. Check Your Connection
Check your internet on other devices connected to the same router.
Make sure the WiFi icon is still there and that the cables haven’t become loose, worn, or detached.
If it seems that the internet is down on all devices, skip these fixes to tweak your router or call the ISP.
2. Turn Your Router Off And On
If you face the localhost error on all devices and browsers, chances are you can find its cause in your router.
It’s an electronic device, after all, and can sometimes run into logical problems, especially if it’s old.
Locate the power button at the back of your router and switch it off.
Then plunge the power cable and wait around half a minute before you reboot it.
If it doesn’t bring any changes, proceed to the following fixes.
3. Ensure The Website Is Available
Sometimes, the Err_Connection_Refused message comes from a website server, meaning that everyone trying to reach it would face the same problem.
To check, try the URLs of other websites.
You can also try this popular online tool: Down For Everyone Or Just Me.
Enter the faulty site’s URL into its search field and hit the blue button.
It’ll tell you if the site you’ve entered is up or down.
Troubleshooting Your Browser
If you can open websites on another browser, start by troubleshooting your current browser.
(Skip this step if you see the localhost error on all browsers, and only come back to it as your last resort since it’s probably not the root of your problem.)
1. Purge Your Browser Cache
All browsers store your passwords, downloads, website cookies, and addresses to enhance the experience.
However, this accumulated data can sometimes harm your browser over time, blocking some websites or functions.
Maybe some page you’ve opened had viruses and found its way to your browser history.
Maybe the old info of a certain website is now interfering with the new ones.
And maybe, the stored cache is too much for the browser to handle.
Whatever the reason, clearing the cache can breathe new life to your browser and resolve the Err_Connection_Refused error.
1. Open Chrome and click the vertical ellipsis icon at the top-right corner.
2. Hover the mouse on “More tools” and select “Clear browsing data”
3. Expand the box next to “Time range” and choose “All time.”
4. Ensure all these three boxes are marked and blue:
- Browsing history.
- Cookies and other site data.
- Cached images and files.
5. Press the “Clear Data” button.
Note: This is how to clear data on Chrome.
The process may vary a bit if you’re using another browser, but it follows a similar route.
2. Turn Off Google Sync
Some users have reported disabling Google’s synchronization with your browser for odd reasons can rectify the localhost problem.
Just tap on the Google account avatar (shown by your photo or the first symbol of your ID) at the right corner.
Then press “Turn off sync.”
Note: If you can’t find the option, press the three-dots icon and navigate to Settings > You and Google > Turn off sync.
Alternatively, you can insert “chrome://settings/people” into the search bar and hit Enter.
3. Check The Default Search Engine
Inappropriate configuration of your search engine settings can be another cause of localhost glitches.
You can follow our instructions to work around it:
- Click the More or Menu button on your browser to open Settings.
- Navigate to the “Search” category and choose the “Manage search engines” button among the available options.
- On the new screen, look under the “Default search engines” header, and ensure Google is your default search engine.
4. Restore The Default Browser Settings
Chrome misconfigurations are not limited to the cache and records.
Sometimes, your settings can also trigger a snag in your browsing journey.
Restoring Chrome’s factory settings can help in these scenarios.
- Again, tap on the vertical ellipsis icon and open “Settings.”
- Expand the “Advances” to click “Reset and clean up.”
- Click “Restore settings to their original defaults” and confirm your choice.
5. Update Your Browser
All computer programs must run at the latest version to perform at their maximum potential.
Your browser is no exception.
If you forget to upgrade it, it may develop interference with the new configs of a particular website.
Below are the instructions on how to update your Google Chrome:
- Go to your browser’s main menu.
- Expand “Help,” and go to “About Google Chrome.”
- Once the page pops up, Chrome will automatically check for new updates.
- Wait until the throbber stops and says, “Google Chrome is up to date.”
6. Reinstall Your Browser
Sometimes, your browser gets so buggy that an update cannot fix it.
Therefore, you should also try uninstalling and reinstalling the software.
- Go to your Windows Settings and then “Apps.”
- Now scroll down the list to see Google Chrome, click on it, and press “Uninstall.”
- Then, go to the Chrome official Website (or any other browser you want to use) to download the latest version of their browser.
- Extract the downloaded file and run the executable file to install it.
Note: Uninstalling Chrome doesn’t wipe out the files in your Google account.
7. Run Chrome As Administrator
If even reinstalling Chrome fails to do the trick, run Chrome as administrator as your last resort.
All you need do is to right-click the app’s shortcut on the desktop screen and press “Run as Administrator.”
Once you do, your browser keeps running with administrator privileges from that moment onwards.
8. Do A DNS Flush
DNS is a network service that transforms human-readable domain names like xxx.com into machine-readable IP addresses, allowing you to load different pages.
However, it can’t accomplish this task if its settings get corrupted or contain too many records.
Just like a browser can accumulate your browsing history over time, your DNS also stores all the IP addresses and entries of your visited websites in the form of a cache.
You need to erase them now and then to recover your DNS function.
Continue with the following steps:
- Open your Start menu and type “cmd” so you can enter the Command Prompt application.
- Copy and paste the following command in the given field and hit Enter: ipconfig /flushdns
- Exit the command prompt and check if the issue has disappeared.
Note: If your command doesn’t work, you need to open Command Prompt with administrative privileges.
Just search the app in the Start menu and right-click it to select “Run as administrator.”
Note 2: If the command didn’t make any enhancements, repeat step 1 and this time, input these commands respectively in the Command Prompt:
- netsh int ip set dns
- netsh winsock reset
Make sure to hit Enter after each command to execute it.
Also, you don’t need to Exit to apply the next command.
9. Try Another DNS Server
Each ISP provides its own DNS server, and it’s usually the best option to have a smooth web surfing experience.
Sometimes, though, their specified address becomes overloaded, obsolete, or offline, shutting down your localhost.
Therefore, you will have to manually change it to a fast, free, and public DNS service like Google DNS and Cloudflare.
This not only resolves your localhost connection issue, but it will likely bring you higher internet speeds.
Here’s how to change it:
1. Go to the Start menu and open the Control Panel.
2. Navigate to “Network and Internet” and then “Network and Sharing Centre.”
3. In the left panel, click the blue link that reads, “Change adapter settings.”
4. The new window shows your current connections; right-click on your WiFi adapter and choose “Properties.”
5. Scroll down the list to select “Internet Protocol Version 4 (TCP/IPv4)” before you hit the “Properties” button.
6. While on the “General” tab, mark the checkbox that says, “Use the Following DNS Server Addresses.”
7. Now, enter the intended numbers in the first and second row, depending on what server you want to connect to:
- For Google DNS, type “220.127.116.11” in front of “Preferred DNS server” and “18.104.22.168” in “Alternate DNS server.”
- For Cloudflare DNS, insert “22.214.171.124” in “Preferred DNS server” and “126.96.36.199” in “Alternate DNS server.”
8. Press “Ok” to save the changes and retest your browser.
10. Tweak Your Proxy Settings
Many users have proxies in place to remain anonymous on the web, block ads, protect against online thieves, or bypass governmental restrictions.
Although useful, these servers may become obsolete over time or comprise faulty configurations.
When this happens, you cannot view any web pages since all your internet activities must first go through this filtration.
See if disabling your proxy can overcome the localhost issue.
A. Disable Proxies On Browser
- Launch your browser and select the Menu icon at the top-right corner to visit Settings.
- Expand the “Advanced” category from the left pane and then go to System.
- Click “Open your computer’s proxy settings.” (You can also navigate to the computer’s Start menu> Settings > Network & Internet > Proxy to replace steps 1 to 3.)
- Toggle off the button next to “Use a proxy server.”
B. Disable Proxies In Windows
- View your Control Panel by searching its name in the Start menu.
- Select “Internet Options” so it takes you to the Internet Properties window.
- While on the “Connections” tab, press the “LAN Settings” button.
- Clear the checkbox under “Proxy Server” and hit Ok to save the changes.
11. Disable Third-Party Services
A. Browser Add-Ons
Various extensions help you customize your web experience, from adblockers to task managers to CEO enhancers.
The problem is that not all of them are trustworthy because they’re third-party software and may contain worms, bugs, or misconfigurations.
They can also conflict with a certain website or go unusable after a while since their developers don’t update them.
That’s why you need to disable your add-ons to see if they stand guilty for the Err_Connection_Refused error.
- Visit your browser’s primary menu, choose “More Tools,” and then “Extensions.”
- Hit the blue toggle on all your extensions to temporarily disable them.
- Go back to the address bar and check if you can open any web pages.
- If so, revisit the Extensions section and enable them one by one to see which one is the main culprit.
- Once you identify the cause, press the “Remove” button below it to completely remove it from your browser.
Firewalls are defender programs that block potential virtual threats by monitoring your network traffic.
However, their detection protocols aren’t always accurate and may also hinder safe sites because they suspect them.
The following steps help you deactivate these devices:
- Go to the Control Panel and select “Windows Defender Firewall.”
- Tap on the link that reads “Turn off Windows Defender Firewall on or off” from the left column.
- Switch off your firewalls both in the Private and Public network settings.
- Click Ok, so the changes take effect.
Note: If the link is inaccessible or grayed out, maybe the settings are in control of another security program.
In this case, you need to uninstall that app first.
Just like firewalls, antiviruses are a common source of interference with your connection, external sites, and even your apps.
Consider disabling this if you have one:
- Right-click your taskbar (the horizontal ribbon at the bottom of your screen) and open “Task Manager.”
- Click “More details” if it appears in the simplified form.
- While on the “Processes” tab, scroll down the listed running apps to locate your Antivirus program.
- Click it and press the now-available “End Task” button at the bottom-right corner.
- Restart your computer and test a web page.
- If it works now, set out to uninstall the software through the “Apps and Features” section.
- Go to your Windows Settings through the Start menu or using the “Windows logo key + I” shortcut.
- Click “Network & Internet” and choose “VPN” from the left side panel.
- Toggle off your VPN options.
- If your localhost connection error disappears after this, go to the “Apps and Features” setting to permanently uninstall your VPN application.
12. Revert Internet Options To The Factory Settings
Internet Options is a system-built utility that controls your localhost settings.
It’s no surprise that it can rid you of the relative issues.
- Open “Internet Options” through your Control Panel
- When the Internet Properties window emerges, switch to the “Advanced” tab and hit the “Reset” button.
- Wait until the process ends.
13. Use Microsoft Troubleshooter
Microsoft’s fix-it tools help you solve your computer’s software-related bugs at the ease of a button.
Network troubleshooting is one of these tools.
Here’s how to run it:
- Hit the Windows logo key on your keyboard and go to your Windows Settings.
- Click “Update & Security” from the grid list and then “Troubleshoot” from the left bar.
- Press “Internet Connections” and hit this button: Run the troubleshooter.
- Hopefully, this will automatically sort out your localhost error.
14. Go To The Registry Editor
Registry Editor is a GUI that lets users change advanced computer settings by inputting, omitting, or editing registry keys (folders).
When all else fails, it’s the best way to fix your software-related issues.
However, this is a very sensitive tool to alter because a slight mistake can render your PC completely inoperable.
Make sure you follow the instructions exactly and do it at your own peril.
- Press Windows logo key + R to launch the Run dialog box.
- Input this command and hit Enter: regedit
- Navigate this route from the left column: HKEY_CURRENT_USER > Microsoft > Windows > Current Version > Internet Settings. (Click the little arrow next to each folder to expand it and view the sub-categories.)
- Click “Internet Settings,” and the keys show up in the right panel.
- Right-click “ProxyEnable,” change its “Value data” to 0, and hit Ok to save the changes.