hosts file

Also found in: Dictionary, Medical, Wikipedia.

hosts file

A text file on a networked computer that was used to associate host names with IP addresses. A hosts file contains lines consisting of whitespace-separated fields giving an IP address followed by list of host names or aliases associated with that address. The name resolution library software can use this file to look up the IP address for a host name. The hosts file is "/etc/hosts" on Unix and "C:\Windows\System32\drivers\etc\hosts" or "lmhosts" on Microsoft Windows,

Hosts files have now been almost entirely replaced by DNS, in which distributed servers provide the same information. A hosts file can still be used to override DNS for testing purposes or other special situations.

HOSTS file

A text file in a TCP/IP network that specifies the IP addresses of computer names and domain names. It is used to convert a request by name to a numeric IP address on the local network or the Internet.

Testing and Quick Retrieval
HOSTS files are used to override the DNS system for testing purposes so that a Web browser or other application can be redirected to a specific IP address. In addition, by explicitly stating an IP address in a HOSTS file, a website can be retrieved more quickly, because the multiple transmit/receive steps a normal DNS query takes have been eliminated. See DNS.

Denying Access to Websites
websites can be denied access from a computer if the URLs of those sites are added to the HOSTS file and directed to the loopback address of For example, the following entry in a HOSTS file prevents users from reaching YouTube or eBay.

HOSTS File Locations
In Windows, the HOSTS file is in the \windows\system32\drivers\etc folder. In the Mac, it is in /private/etc. The first line of a HOSTS file contains the following. See localhost.   localhost
References in periodicals archive ?
These addresses are hard-coded to bypass the hosts file and cannot be prevented from connecting.
Most SMEs use operating systems which control IP address through Hosts file of the operating system before controlling IP address, (like Windows operating system).
How to block ads using DNS and hosts file (http://www.
When the file is run, it downloads various files, stops and deactivates Windows Security Center services and Shared Internet Access and collects information on programs such as Outlook and Eudora and modifies the hosts file.
It also terminates processes connected with some antivirus and firewall applications, and overwrites the hosts file to prevent users of infected machines from viewing antivirus websites.
Additionally, Troj/BagleD1-L tries to stop various security applications such as anti-virus and firewall software, to rename files belonging to security applications (so they can no longer load), and to block access to a range of security-related websites by changing the Windows HOSTS file.