How to Lock, Manage, Edit Hosts File in Windows 10

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

16 Comments

  1. gail

    I need help with browser hijacking

  2. annoyed

    boy, this site sucks — it takes 50-75% cpu. done with MS products?

  3. Pranab Das

    Often windows host files have commented entries, e.g. #127.0.0.1 localhost; still, localhost is resolved by the DNS. Is it not wasting networking resources-i.e. having to check DNS to know I have to use a local port?

  4. Joe

    This line is commented out. There is no need to uncomment it. It is purely for explanatory purposes and you should not really do that

  5. Hestia

    I need to come back every few times because I keep forgetting the file path to the file. >_<

  6. akulkis

    Wrong. Any software writer who tries to connect to “localhost” needs an address. Why pester the DNS server when it’s not needed. Furthermore, by not including localhost in the hosts file, if a program wants to connect to a localhost port, and the computer is NOT hooked up to a working network, then the program won’t work as designed — because now there HAS to be a DNS lookup, which REQUIRES connection to a working network.

    THAT

    IS

    INSANE.

    localhost 127.0.0.1

    belongs in the hosts file, WITHOUT a # comment marker.

  7. Still Out of Service

    Hi,
    I did get the denial to change the host file.
    I was unable to edit the allow list & did not want to dwnld anything to ‘help’.
    I opened msconfig, chose safe boot
    and changed the host file there, no problem

  8. Eden Hazard

    It’s useful, Thank you so much

  9. Tom Swift

    Wrong. Since Windows 7, dnsapi.dll has localhost, local machine, local and loopback embedded in its code. This is why the hosts file provided with Windows7+ has both the v4 and v6 localhost entries commented.

  10. Tom Swift

    Very true. It also ran on 300/110 split-baud modems. Times change and improvements are made.

  11. Mike Lile

    Are you Right Clicking the Notepad app and using ‘Run As Administrator’ to open the HOSTS file after you are done with ur msconfig edit?

  12. I broke my computer trying this. 🙁

  13. Couldn’t be because of this. At most you may not be able to connect to the Internet. Reset the Hosts file – https://www.thewindowsclub.com/how-to-set-the-windows-7-hosts-file-back-to-default

Leave a Reply

Your email address will not be published. Required fields are marked *


4 + 5 =