Why Hosts file is not working?

There could be many reasons for which the Hosts file is not working on your Windows computer. You might be using the wrong format in your Hosts file. Apart from that, permission issues of the Hosts file are also one of the causes. If you have configured Proxy on your Windows 11/10 computer, it might be bypassing the Hosts file. We have explained the solutions to deal with this problem below in this article.

Hosts File not working in Windows 11/10

Before you try the solutions mentioned below, make sure that you are using the correct format in the Hosts file to redirect websites in your web browser. The Hosts file will not work if you have added the websites in the wrong format. The correct format is as follows: There is a space between the IP address and the domain name. You can also separate the IP address and the domain name with Tab if separating them with space is not working. Also, the same IP address should not be on different lines. If you want to add multiple entries for the same IP address, you can add all these entries in the same line by separating them with space. If you have used the right format but still the Hosts file is not working, try the solutions mentioned below: Let’s see all these fixes in detail.

1] Flush your DNS cache

The changes made to the Hosts file should take effect immediately. But this is not happening. Hence, flushing the DNS cache can fix the problem. To do so, you have to execute the following command in an elevated Command prompt.

2] Reset NetBios cache

If flushing the DNS cache did not fix your problem, resetting the NetBios cache may help. Open the Command Prompt as an administrator, type the following command, and hit Enter. Now, check if the issue persists.

3] Check the encoding format of the Hosts file

The Hosts file should have any one of the following encoding formats:

ANSIUTF-8

Check what the encoding format of your Hosts file has. To do so, right-click on the Hosts file and select “Open with > Notepad.” If the Notepad option is not there, open Notepad and then press the Ctrl + O keys. Now, select the Hosts file to open it. Go to “File > Save As.” Notepad will show you the same encoding format used for the Hosts file. Alternatively, you can also use Firefox to view the encoding format of the Hosts file. The steps to do so are as follows:

If the encoding format is other than those mentioned above, you can change it by using Notepad. Open the file in Notepad and go to “File > Save As.” Select UTF-8 or ANSI encoding format in the drop-down. Write its name under inverted commas, as “hosts” and click Save. You will get a confirmation message to replace the existing file. Click Yes. If this does not work, create a new Hosts file. We have explained this method later in this article.

4] Check for permission issues

The problem might be occurring due to permission issues. The Hosts file should have both Read and Read & execute permissions. To check this, follow the steps listed below:

5] Reset the Hosts file

If the issue still persists, reset the Hosts file back to default. Resetting the Hosts file to default can fix the connectivity issues.

6] Disable Proxy

If Proxy is enabled on your computer, it might be bypassing the Hosts file due to which the Hosts file is not working. The solution is to disable the Proxy. Open your Windows 11/10 Settings and turn off both Automatic proxy setup and Manual proxy setup settings.

7] Create a new Hosts file

Create a new Hosts file and replace the existing one with that. Before you create a new Hosts file, we suggest you perform the following steps and see if the issue is fixed. The above steps solved the problem of some users. Maybe these steps solve your problem too. If this does not help, create a new Hosts file. To do so, go through the following steps:

8] Flush Socket Pools in Chrome

The connectivity issues in Chrome can also be resolved by flushing the Socket Pools. If clearing the DNS cache on your Windows device does not fix the problem, you can also try flushing the Socket Pools in Chrome. To do so, open Chrome, then open a new tab. Now, copy the following address, paste it into the address bar of Chrome, and hit Enter. Click on the Flush socket pools button.

9] Disable DoH in Firefox

DoH stands for DNS over HTTPS. It is a protocol that passes the DNS queries through an HTTPS encrypted session. If privacy is your main concern, you can enable this setting in Firefox. When you type the address of a particular website, your web browser sends a request over the internet to look up the IP address of that website. If this connection is not encrypted, the web address can easily be seen by third parties. If DoH is enabled, the request is sent to the DoH-compatible DNS server by using the encrypted HTTPS connection.

The DoH can be slower than traditional DNS queries. If DoH is enabled in Firefox, you might be experiencing the issue due to it. You can check this by disabling it. The steps for the same are as follows: Read: SysMate Hosts File Walker lets you manage Windows Hosts file easily.

How do I open Hosts file in Windows 11?

You can open Hosts file in Windows 11 by using text editor software. Notepad has a default text editor software in Windows. You can use it or you can install Notepad++ for the same. To open a Hosts file in Notepad, first, open Notepad as an administrator, press the Ctrl + O keys, and select the Hosts file to open it. Hope this helps. Read next: SwitchHosts is a Hosts file switcher for changing Windows Hosts file easily.

Hosts File not working in Windows 11 10 - 37Hosts File not working in Windows 11 10 - 87