Detailed analysis of the role and modification of the computer Hosts file

Source: Internet
Author: User

Refers to the computer system in the Hosts file, if not too familiar with, it is really unheard of, one is because the system hosts file for the system properties, in the system default settings, we simply can not see its existence, but because the body in the System deep folder, we generally can not detect its existence. Here are some practical applications and modifications to the system hosts file.

First, where is the hosts file specifically stored

The computer system Hosts file is located under the system installation directory such as Windows System32\Drivers\Etc folder (Windows 2000/xp/vista/seven System), while in Windows 98 the file is in the Windows folder under the system. It should be noted that the Hosts file is not visible under the default settings, you need to set the display system folder and show hidden files.

Second, what is the hosts for?

1. Hosts is equivalent to a local DNS cache, such as what needs to access a Web site, if there is no local resolution of the Hosts file, the browser needs to access the remote DNS resolution server, After waiting for the DNS server to return IP information, our browser can make a request to the destination URL point of the server, but if the hosts file local cache resolution, our browser will not go to the remote DNS server, but directly to the site server request, So the hosts file can speed up the opening of our website;


2. LAN setup is simplified. Because the local area network very few people set up the DNS resolution server, so caused some access is not too convenient, but if the hosts file is simple and convenient after the more simple, because its own computer Hosts file is equivalent to a DNS resolution server;

3, can be used to block any website. Although the Hosts file is a System Properties file, we can modify it to achieve some of our practical applications. Extrapolate, we can also be used to block some Web site plug-ins, pop-window ads and so on, the specific format is:

127.0.0.1 site A that needs to be blocked
127.0.0.1 Site B that needs to be blocked
127.0.0.1 websites that need to be blocked C

For example, if we want to shield www.xxx.com, we just need to change it.
127.0.0.1 www.xxx.com #注释 (Note: A space is left between the 127.0.0.1 and the URL, leaving a space between the URL and the # comment)

It is also important to note that there is no space in front of the IP address, there should be at least 1 spaces between the IP address and the domain name. After the modification, be sure to remember to save the file, if installed 360 security guard will prompt whether to prohibit changes to the Hosts file, we must choose to allow, otherwise it will modify the failure. There is a Web site must be finished to enter the line will be effective, a line can only block a URL, it is recommended to modify: "IP address + space + domain + ENTER" to modify the record!

Source Address: http://www.feifeiboke.com/pcjiqiao/212.html

Detailed analysis of the role and modification of the computer Hosts file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.