Hosts is a system file without an extension. It can be opened using notepad and other tools. Its function is to associate some common website domain names with their corresponding IP addresses to a "Database ", when a user enters a URL in the browser to log on to, the system will first automatically find the corresponding IP address from the Hosts file. Once found, the system will immediately open the corresponding webpage. If not found, the system then submits the website address to the DNS domain name resolution server for IP Address Resolution.
Hosts files are not in the same location on different operating systems (or even Windows:
Windows NT/2000/XP/Vista/7/8 (Microsoft NT operating system): the default location is % SystemRoot % \ system32 \ drivers \ etc \, but it can also be changed. The dynamic directory is determined by the registry key \ HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Tcpip \ Parameters \ DataBasePath. % Systemroot % indicates the system installation path. For example, if Windows XP is installed in C: \ WINDOWS, the Hosts file is in C: \ WINDOWS \ system32 \ drivers \ etc.
In Windows, the default hosts file is usually blank or contains a comment statement and uses a default rule:
127.0.0.1 localhost
: 1 localhost
# Google Homepage
# This line is used to enable the official Android development website.
#74.125.113.121 2.16.android.com
# Download the updated content from the following address:
203.208.46.146 dl.google.com
203.208.46.146 dl-ssl.google.com
# Add the following content to the hosts file
# Modifying the slow process of opening doc files
Googleapis.com
Google-analytics.com