[Summary] Wonderful use of the hosts file

Source: Internet
Author: User
The hosts file is stored in system32 \ drivers \ etc in the Windows directory. This file has no extension. When we access a website, the request level of the hosts file is higher than that of the DNS server. Therefore, modifying the hosts file can process the specified URL to prevent users from accessing a specific website. The hosts file also speeds up Website access. When we access the network, our computer sends a network domain name to the DNS server, and the DNS server resolves the domain name into an IP address and returns it to the computer. This process slows down Website access. Correct editing of the hosts file can speed up Website access. For example, add a specified IP address to the hosts file so that the DNS server does not need to parse the webpage address and directly access the specified website. In fact, the hosts file also has other special advanced functions, such as facilitating LAN users to smoothly connect to the system. These functions can greatly reduce the access time to the network, making access to the network faster and more convenient. 1. It is unnecessary to accelerate Website access. Its resolution is before DNS. 2. Check whether the website 127.0.0.1 www.123.com has experienced such a strange thing: during normal Webpage Browsing or other office operations, IE will automatically pop up the whole screen of Web advertisements at intervals and the content of these web advertisements will be automatically and randomly changed! However, the form of web site is relatively fixed: such as http://www.5xt.net, Baidu. Users can use the same method to completely block other malicious plug-ins, various webpage pop-up advertisements, and some illegal websites from being added to the hosts file. 3. One-click logon to a specific server in the LAN, such as a chat, game, or web server in the LAN. It is troublesome to enter an IP address every day. You can add the following to the hosts file: 221.555.78.122 aa.com, enter aa.com to replace the heap of numbers. 4. Do not flip the wall to the youtube203.208.39.104 www. youTube. com203.208.33.100 gdata. youTube. com5, do not flip the wall twitter128.121.146.228 Twitter. com128.121.146.228 www. twitter. com128.121.146.101 assets0.twitter. com128.121.146.101 assets1.twitter. com128.121.146.101 static. twitter. com128.121.146.229 assets2.twitter. com128.121.146.229 assets3.twitter. com65.74.185.41 Twitter. zendesk. com65.74.185.41 help.twitter.com 6. do not modify the hosts file: This file Important. Never let the virus be modified! Run the following command in cmd: Code Modification to the hosts file is prohibited: attrib + R + A + S + H % WINDIR % \ system32 \ drivers \ etc \ hostsecho y | cacls % WINDIR % \ system32 \ drivers \ etc \ hosts/g everyone: r7. allowed to modify the hosts file: Echo y of the previous operation | cacls % WINDIR % \ system32 \ drivers \ etc \ hosts/g everyone: fattrib-r-a-s-h % WINDIR % \ system32 \ drivers \ etc \ hosts8, how to use the start-up reserved channel (start-up batch processing) in Internet cafes: echo y | cacls % WINDIR % \ system32 \ drivers \ etc \ hosts/g everyone: fattrib-r-a-s-h % WINDIR % \ system32 \ drivers \ et C \ hostscopy "\ Server computer name \ hosts $ \ hosts" "C: \ windows \ system32 \ drivers \ etc \ "/yattrib + R + A + S + H % WINDIR % \ system32 \ drivers \ etc \ hostsecho y | cacls % WINDIR % \ system32 \ drivers \ etc \ hosts/g everyone: rexit9. modifying files is troublesome. You can write a batch. You only need to double-click the batch file to add it. Two methods are provided as follows: echo 127.0.0.1 >>%windir % \ System32 \ drivers \ etc \ hostsecho 127.0.0.1 www.baidu.com >>%windir % \ System32 \ drivers \ etc \ hosts or @ attrib % WINDIR % \ system32 \ system32 \ drivers \ etc \ hosts-r @ echo 127.0.0.1 www.baidu.com> % WINDIR % \ system32 \ drivers \ etc \ hosts @ echo 127.0.0.1 www.baidu.com.cn> % WINDIR % \ system32 \ drivers \ etc \ hosts or above Article I have read a lot of information from the Internet. Including the comment-not-'s blog.

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.