hosts file
The hosts file is a computer file used to store information on where to find a node on a computer network. This file maps hostnames to IP addresses. The hosts file is used as a supplement to (or instead of) the domain name system on networks of varying sizes. This file is (unlike DNS) under the control of the user who is using the computer.
History
The
The small size of the ARPANET permitted hosts files to be used with some convenience for some time. Network nodes typically had one address, and could have potentially many names. As individual TCP/IP computer networks started becoming popular, however, the hosts file became a large burden on system administrators — networks and network nodes were being added all the time — making maintenance of the hosts file a task which grew significantly.
Location and default content
The host file is located in different locations in different operating systems and even in different Windows versions.[1]:
- Windows NT/2000/XP/Vista:
%SystemRoot%\system32\drivers\etc\is the default location, which may be changed. The actual directory is determined by the Registry key\HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath. - Windows 95/98/Me:
%WinDir%\ - Linux and other Unix-like operating systems:
/etc - Mac OS: System Folder: Preferences or System folder (format of the file may vary from Windows and Linux counterparts)
- Mac OS X:
/private/etc(uses BSD-style Hosts file) - OS/2 and eComStation:
"bootdrive":\mptn\etc\
In Windows, the default hosts file is often blank[2] or it contains (inactive) comment lines followed by the single entry
127.0.0.1 localhost
An example can be found at [3].
Other uses for the hosts file
The hosts file has alternative uses, including filtering ads by having entries for known ad-servers redirect to machines without the advertising on them or more typically by redirecting references to ad-servers to the local address 127.0.0.1. This can save network bandwidth, as well, by eliminating a request to the DNS server normally used for obtaining address information, as well as by not downloading the advertisements. However, if the hosts file is to be used for this purpose, it must be kept up-to-date with lists of Internet servers known to host such content.
A more important use of the hosts file is to block known dubious or criminal domains and servers (with spyware and other malware) in the same manner used for blocking ad-servers[4].
The hosts file can also be "hijacked", or used for malicious purposes. For example, adware, computer viruses, trojan horses, or other malware can edit the hosts file (particularly on Windows-based systems) to redirect traffic from a "safe" site (such as Google or Wikipedia) to sites hosting content that may be offensive or intrusive to the user or the user’s computer system. For example, a trojan (Qhosts) redirected traffic from search engines such as Google and AltaVista to a site specified by the author of the trojan horse[citation needed]. Mydoom.B (a malware program) blocked users from visiting sites regarding computer security and antivirus software, which also affected the Windows Update web site.
See also
- Adblock
ARPANET - Computer virus
- DNS
- Resolv.conf
- Malware
- Spyware
- TCP/IP
- Trojan horse (computing)
- Unix-like
- Windows
References and footnotes
External links
- How to Define Static hostnames for IP Addresses in Windows (counterpart of Linux's /etc/hosts file in Windows)
- Why Should You Wait for Internet Propagation? – An alternative use to the hosts file
- Using a hosts file to remove ads without getting broken images - Using hosts files with other tools makes viewing website content more pleasing.
- Custom hosts files
- Most Valuable Professional(MVP) site Updated monthly with free custom HOSTS file; information and instructions for installation. Focused on preventing unwanted advertisements & parasites. Numerous 3rd party awards and recognition(s).
- Dan Pollock's hosts file A well maintained hosts file with updates almost daily,
- Andrew Short’s Hosts file project – comprehensive hosts file
- HPHosts – An ad blocking hosts file
- The Security Now! podcast page on the hosts file
- Mikes Ad-Blocking hosts file – available as a direct download to merge in, or as an installer
- SCoooBY’s Hosts File – A large list of ad servers
- Ad Blocking Lists – Peter Lowe’s List
- (French) Airelle Lists – Hosts files with a large blacklist of 500,000 sites
- Spybot has an advanced setting that adds a blacklist to your hosts file.
- Applications to Manage Hosts Files
- Abelhadigital’s HostsMan 3.0.45 – A freeware application for hosts file management with auto-updates
- Kimberly's Hosts Manager – Freeware Microsoft Windows hosts file manager, on the forum B.I.S.S-Bluetack Internet Security Solutions
- Funkytoad’s HostsXpert v4.0 – A free application to arrange, and edit hosts files
- Mike Meyer’s HostsToggle 2.1 – An open source hosts file tool
- KH Blocker – A free Microsoft Windows application which manages an ad-blocking hosts file
- Ray Marron's Hostess – Freeware Microsoft Windows hosts file manager.
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)





