Host File Settings detailed
A lot of friends don't know what the host file is? In fact, the hosts file is used to record the host IP address and host name of the corresponding relationship, after the establishment can use the host name to access the host, and do not have to remember the IP address. (Hosts is a local simple DNS, it takes precedence over DNS server queries; Oh, I think so.) )
WinXP, Win2K systems are stored under SYSTEM32DRIVERSETC in the Windows system directory, Win98 under the Windows system directory. (The Windows system directory is generally c:windows).
The Hosts file is a plain text file, the format is simple, one line corresponds to an IP address, each line in the format:
IP Address host Name
The IP address and host name are separated by a space, with no limit on the number of spaces.
The content after "#" in any line is considered a comment.
IP address can be any IP, this machine, not the local machine all line.
The IP address and host name of the corresponding relationship can be resolved on the computer and used in the software.
When using the hostname, Windows will first find the corresponding relationship in the Hosts file, and if not, send a resolution request to the domain name server. Hosts the IP pointer that can be used to transfer some host names on the computer.
After the general installation of Windows system, the hosts file in addition to comments, there is only one line of valid correspondence:
127.0.0.1 localhost
This is the IP address that represents this computer.
Users can add the required IP and host names themselves.
For example, do not want to visit http://www.123.com, then we write the following in the hosts:
127.0.0.1 http://www.123.com# Shielded Web site
0.0.0.0 http://www.123.com# Shielded Web site
So the computer resolution of the domain name to the native or wrong IP, to achieve the purpose of shielding.
* * Finally remember to set the host file as read-only property, so generally speaking, malicious Web site can not modify the host file. **