etc/hosts (a symbolic link to /private/etc/hosts) Registry key under HKEY_LOCAL_MACHINE\Comm\Tcpip\Hosts It is usually named hosts, without an extension. The location of the hosts file in the file system hierarchy varies by operating system. The example illustrates that an IP address may have multiple host names ( localhost and loopback), and that a host name may be mapped to both IPv4 and IPv6 IP addresses, as shown on the first and second lines respectively. This example only contains entries for the loopback addresses of the system and their host names, a typical default content of the hosts file. For example, a typical hosts file may contain the following: Entirely blank lines in the file are ignored. Comment lines may be included they are indicated by an octothorpe (#) in the first position of such lines. Each field is separated by white space – tabs are often preferred for historical reasons, but spaces are also used.
The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more host names. ( April 2017) ( Learn how and when to remove this template message) Unsourced material may be challenged and removed. Please help improve this article by adding citations to reliable sources. This section needs additional citations for verification.