What are Windows Host Files?

Definition: A hosts file is a list of computer names and their associated IP addresses. Hosts files are used by Microsoft Windows and other network operating systems as an optional means to redirect TCP/IP traffic in special circumstances. These files are not required to use ordinary network and Internet applications.

What Hosts Files are Used For

The two common reasons for an individual to set up a hosts file are:

  • 1. To prevent access to undesirable Web servers (such as those offering tacky advertising or inappropriate content)
    • 2. To set up private, easy-to-remember "shortcut" names for servers on a local network

In Windows, the hosts file is a simple text file typically named hosts (or occasionally, hosts.sam). It is normally located in the system32\drivers\etc folder. Linux, Mac and other operating systems each follow a similar approach but with different conventions for naming and locating the hosts file.

A hosts file is designed to be edited by a computer administrator, knowledgeable user or automated script program. Computer hackers may also attempt to modify your hosts file, which has the effect of redirecting requests intended for standard Web sites to other locations illicitly.

Also Known As: HOSTS