This blog post is about the ERR_CONNECTION_CLOSED error and the possible solution to fix and avoid it. The “err_connection_closed” message tells that the local computer or mobile phone browser cannot make a connection, and something prevented the website from being inaccessible. The err_connection_closed or “The Site can’t be reached” is a Chrome issue. If the Chrome browser cannot reach the server where the website is hosted, it cannot render it and returns this error message.
In the following paragraphs, we will show you some troubleshooting steps that you can implement to avoid this issue and access the website successfully.
1. Check the Internet Connection
Chrome will throw this error if the Internet connection drops when you access a website. You should check the Internet connection, reset the WiFi router, re-plug the Ethernet cable, or reset the network settings. Resetting the network settings is necessary because some misconfigurations may block connections even if there is an Internet connection. So, to reset the network settings, follow the steps below.
In Windows, open the CMD as an administrator and run the following command:
netsh int ip reset
Using the macOS terminal, execute the following commands one by one:
sudo ifconfig en0 down
sudo ifconfig en0 up
ifconfig -a
For the Linux terminal, execute the following commands one by one:
sudo iptables -F INPUT
sudo iptables -F OUTPUT
sudo iptables -P INPUT ACCEPT
sudo iptables -P OUTPUT ACCEPT
sudo systemctl restart systemd-networkd
2. Clear the Web Browser Cache
Sometimes, Chrome, by default, has issues with the cache. It caches the website’s content, and even if there is no issue with the connection, it will still give you the cached state from the previous search. When the err_connection_closed is still on the screen, clearing the web browser cache, cookies, and history and trying to reaccess the website is recommended. To do this, follow the steps below:
1. Open Chrome.
2. On your browser toolbar by clicking on the three vertical dots. From there, you can either click Delete Browsing Data or press Ctrl+Shift+Del. If you’re using an older version of Chrome, you may have to click More Tools and then Clear Browsing Data.
3. In the “Clear browsing data” box, click the checkboxes for Cookies and other site data and Cached images and files.
4. Use the menu at the top to select the data you want to delete. Choose the beginning of time to delete everything.
5. Click Clear browsing data.
3. Check the VPN Configuration
If you are not using a VPN, you should try to configure one because your Internet Service Provider (ISP) may have blocked connections to those websites. Using a VPN will encrypt your connection to that website and avoid those blocking rules your ISP has.
The results can be the opposite if you are already using a VPN. The VPN could be blocking access to that website. Therefore, disabling the VPN may solve the issue. Alternatively, you can try to use another VPN instead of the one blocking connections.
4. Check the Firewall
Sometimes, the computer’s antivirus software can prevent access to the website. This is due to the firewall attempting to keep the computer safe, which blocks the connections to suspicious websites. Often, this can give you false positive results and block harmless sites. You can try temporarily disabling the firewall or antivirus software to see if that will solve the issue with the connection. If you can access the website after the disabling, you should check the firewall’s configuration or replace the antivirus software. You can install antivirus by mistake as part of a package while installing other software. This typically happens when you can agree to install the antivirus without noticing it.
To disable the firewall on Windows, open your Control Panel and go to System and Security > Windows Defender Firewall > Turn Windows Defender Firewall on or off.
Disabling the firewall on macOS by opening the Security & Privacy section in your System Preferences settings.
To disable the firewall on Linux, execute the following command in your terminal:
sudo systemctl stop firewalld
5. Flush DNS Cache
When accessing the website, the computer stores the IP addresses of a server in a local DNS cache. If some DNS changes were made to the domain name, the data stored locally is not the correct one and may lead to the err_connection_closed error. So, we need to flush the local DNS cache, which will lead to a new connection to the correct IP, which will be stored in the cache as the correct one.
To flush the DNS cache in Windows, open the CMD as an administrator and run the following command:
ipconfig /flushdns
Flushing the DNS cache in macOS requires opening the terminal and running the following command:
sudo dscacheutil -flushcache sudo killall -HUP mDNSResponder
To flush the DNS cache in Linux, open the terminal and run the following command:
sudo resolvectl flush-caches
We explained that Chrome stores the IP addresses in a local cache. Sometimes, that data may be incorrect, so you are forced to flush the DNS cache. To avoid this, you can configure your computer to use different DNS, such as the free 1.1.1.1 DNS service from Cloudflare. More about this can be found on the official Cloudflare documentation page, depending on which OS you are using.
6. Disable Proxy Server
Using a proxy server can also cause the err_connection_closed message in your browser. So, it is worth trying to disable the proxy server.
In Windows, you can follow the instructions below:
- In the Control Panel, search for “Internet options”.
- Click on the Internet Options result to open a pop-up with your network settings.
- Go to the Connections tab in the Internet Properties pop-up.
- Click on LAN settings.
- Uncheck the boxes for “Automatically detect settings” and “Use a proxy server for your LAN”.
To disable the proxy in macOS, follow the instructions below:
- Click the Apple icon, then select the System Preferences option.
- Under Internet & Wireless, choose Network.
- Click the Configure… button when the Network screen appears.
- Click Proxies. Ensure all the boxes under Select a proxy server to configure: are unchecked.
- Click Apply Now.
Disabling the proxy in Linux requires executing one of the following commands in your terminal:
unset http_proxy OR http_proxy=""
7. Check Chrome Settings and Extensions
If you are using some Chrome Extensions, like AdBlockers or similar, that can cause an interruption in the connection, it is recommended that you temporarily deactivate them.
To manage your Chrome extensions, you can visit Settings > Extensions, or you can enter the following address in your Chrome browser bar: chrome://extensions/
Next, check the Chrome settings to see if there are updates. You can access the following URL in Chrome:
chrome://settings/help
To check if there are some potential issues with Chrome and to reset Chrome to default settings, you can visit the following URL:
chrome://settings/privacy
The last thing you can do is reinstall Chrome from scratch.
Congratulations!
That’s it! You have learned some basic steps to fix the err_connection_closed error message in Chrome.
If you’re still having trouble, contact our Linux system admins to fix this. You only need to submit a per-incident server support request, and we’ll handle it.
If you liked this post about what is the ERR_CONNECTION_CLOSED error and how to fix it, please share it with your friends or leave a comment below. Thanks.