Share this article

Improve this guide

Host files aren’t working? Check out these procedures

5 min. read

Updated onOctober 4, 2023

updated onOctober 4, 2023

Share this article

Improve this guide

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

Chances are you are trying to bind certain name strings to specificIP addressesto override other name resolution methods. However, thebrowsercannot find the host file or the recently made changes simply refuse to take effect. How do you get the hosts files to work properly again?

All changes tohostsshould take effect immediately. You shouldn’t think of rebooting your browser, your PC or performing any extra steps. However, unexpected issues do arise from time to time.

So, if you’re not entirely sure how you can solve this problem, we’re going to help you out. Just as always, there are several ways to tackle the issue effectively. Let’s get started.

What can I do when Hosts files aren’t working?

What can I do when Hosts files aren’t working?

1. Basic troubleshooting steps

2. Drop the old data and ping localhost

If the changes are done correctly, you should see the results immediately. In spite of that, do keep in mind that Windows caches name resolution data. Therefore, the old records may still be used for a while.

Your next step should be to fire up acommand promptand type:ipconfig /flushdnsto drop the old data. Try toping localhostand see if it uses the correct IP (it should match what you put in the hosts file).

If it does, your hosts file is fine and the issue is elsewhere. If not, then you know for sure that the file is bad. Pay attention to where it goes. It might try ipv6, so thehostsfile itself is broken. Remove everything from it and leave only your entry.

If you’re having trouble accessing Command Prompt as an admin, then you better take a closer look atthis guide.

You can’t flush the DNS resolver cache? Check out this guide and learn how to do it.

3. Recreate the file with default permissions

If Windows continues to ignore the host file, recreate it with default permissions.

4. Add exceptions to proxy/disable the automatic configuration script

If you have a proxy configured, the automaticproxy serverconfiguration scripts can override the hosts file. One solution here is to configure it not to do this.

If you’d want, you can also disable the automatic configuration script. Just make sure to uncheckUse automatic configuration script.

Proxy server issues are pretty annoying. Make them a thing of the past with the help of this guide.

5. Check DNS address

You could also try doing a few changes in theDNSaddress department. They aren’t a must but may help if something is badly configured.

6. Create a new hosts file

Are you still experiencing the same problem? In that case, another effective solution is to create a newhostsfile. Start from scratch, then add entries.

It comes a time when you try to migrate your website from one host to another. You clearly want to make sure the website is working properly before changing the domain’s settings, yet thosehostsfiles don’t work.

Although there is no quick fix to this problem, you can try out the above suggestions. Moreover, you can share your views, feedback, and other queries related to hosts files in the comments area below.

READ NEXT:

More about the topics:files

Radu Tyrsina

Radu Tyrsina has been a Windows fan ever since he got his first PC, a Pentium III (a monster at that time).

For most of the kids of his age, the Internet was an amazing way to play and communicate with others, but he was deeply impressed by the flow of information and how easily you can find anything on the web.

Prior to founding Windows Report, this particular curiosity about digital content enabled him to grow a number of sites that helped hundreds of millions reach faster the answer they’re looking for.

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Radu Tyrsina