Where is the Hosts file location in Windows 8?

By | September 27, 2016

The Hosts files is a file that allows you to override the DNS lookups for specific domains.

Say you want to test your application that has brianseekford.com hardcoded but you actually want to run it against your local computer IP 127.0.0.1

You edit the hosts file and simply add the entry:

127.0.0.1      brianseekford.com

ALL dns lookups will now return 127.0.0.1 when looking for that domain, so your browsers etc will now all redirect. It was also the old school way to do ad blocking, put in a domain you never want to resolve. i.e. ads.joe.com

Anyway, now that you know what it does, this is where to find it:

C:\Windows\System32\drivers\etc

Remember, open notepad as Administrator FIRST, otherwise you wont be able to save.

 

Leave a Reply

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