Hosts File

See also: Ad blockers | DNS

The hosts file is a text file simply named “hosts”, available on almost all internet-connected operating systems. It is used as a shortcut to DNS. When a user types in a host name (for example, “”) ordinarily the TCP/IP stack queries the DNS server to translate that name into an IP address. If “” was in the system’s hosts file, a hard-coded IP address would automatically be assigned to the host, and the DNS lookup bypassed completely.

The original idea of the hosts file was to allow small networks to operate without a DNS server. For example, two computers might be named “leela” and “fry”, and a shortcut to access each computer would be to hard-code the IP address in the file: leela fry

In this example, the computer with the IP number could be pinged simply by typing “ping fry”, rather than “ping”.

The hosts file is also used in ad blocking on the internet, by adding known advertisement and spyware host names to point nowhere. For example the entry:

Would automatically redirect any web requests to to the special IP number – the local system. Unless an ad server is running on the local system, this will mean no ads are shown.

Hosts files can also be hijacked by spyware and other malicious programs. Evil hackers could potentially point a benign hostname (such as to a malicious website that could act as a sort of online trojan – something that looked and acted like the real infoAnarchy, but actually tracked usage or other issues.

File Locations

If no file is found at this location, it is possible that your computer is running without one. This is probably not a significant issue unless your computer doesn’t know localhost is which regulary causes problems with a variety of applications.

TakeDown.NET -> “Hosts-File