Windows 7 hosts file location!

The hosts file location hasn’t changed in Windows 7 and is the same in Windows NT, 2000, XP, 2003, Vista and Windows 7. It’s an important system file to map hostnames to IP addresses. For example it can map domains to your PC (localhost) by adding the IP in front of a domain name.

Windows 7 Hosts file location

As we previously reported, you might get an error “access denied” when accessing the hosts file in Windows 7.
Here’s the solution: How to access hosts file in Windows 7

Where to find the hosts file in Windows 7, Vista, 2000, 2003, NT?

The location of the hosts file in Windows 7 is:

  • C:\Windows\System32\drivers\etc
  • Sidenote: In Windows 95, 98, ME the location is: %WinDir%\


Malware exploits your host file

As mentioned above your hosts file can map hostnames to IP’s. Malware can exploit that by adding sites of well-known system security tools so that they won’t resolve properly.

  • Example: If you find the entry in your hosts file, you won’t be able to visit that site, because your PC is resolving that address to your own PC. It would not retrieve the IP of the website, it would retrieve the IP of your “localhost” (

So, your hosts file can be used in a good or bad way. If you know the IP of malware sites or ad sites, you can prevent them from working and resolving properly, but this can also be used against you.

4.8 of 5 0 (95%) 4 votes
- Cheers!

Tags: ,

Written by:
Oliver is the founder and lead editor of this site. He is interested in finding new ways to break Windows, find common errors and help others to fix them. Aside from that, he loves to fully customize systems with Rainmeter and Dreamscene, find out more about ancient civilizations like the Chachapoya, sharpen his digital photography skills and create software with a small group of selected developers. If you would like to connect with him to discuss anything, send him a mail!

Learn More About.Me

Follow me on Twitter for daily updates:

Contact The Author:

Get Free Help

Connect With Our Site:



Need help? Ask a question at our QA site, click the red button to get started:
Want to support us? Great, simply buy your favorite games from G2A via our referral link ( and save money at the same time:

One Response to Windows 7 hosts file location!

  1. Orange Community Approved Comment:
    Lanh said:

    Thanks I really needed this. I could not find this host file for the life of me. I needed it to force propagation on one of my clients domains.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *