Host file usage tips

Source: Internet
Author: User
When surfing the Internet, many friends often encounter situations where some webpages cannot be opened at any time, but they can be opened easily on other computers. In this case, the biggest possible reason is your IE browser, and hosts table files are often the source of the disaster.

  

1. What is a hosts table file?

The hosts table file is a file without an extension, but it is a file in text file format. You can use the Notepad program to edit it. The hosts table file stores the domain names of some common website hosts and their corresponding IP addresses. When we use a browser to browse a website, enter the Domain Name of the website in the address bar and press Enter. the system must convert the domain name to its unique IP address through some channel, this work is usually done by the DNS (Domain Name Resolution Server) server. Before the system processes the domain name to the DNS server, it always checks the local hosts table file to see if there is a corresponding ing between the domain name and the IP address. If yes, it will be directly used, this saves a lot of time.

For this reason, if a domain name in the hosts table file has an error corresponding to the IP address, when you enter this domain name in the browser to try to open its corresponding webpage, the website cannot be opened, and those websites with no ing error or corresponding records in the hosts table can be opened normally. This is why some websites cannot be opened but can be opened smoothly on other computers. Many malicious programs often make such pranks.

Ii. solutions after recruitment

After understanding the principle, if some websites cannot be opened properly due to the recruitment in our browser, we can solve the problem by modifying the hosts table file. The location of the hosts table file in the system. Windows 9x is stored in the C:/Windows directory and Windows NT/2000 system. It is stored in the C:/winnt/system32/Drivers/etc directory, windows XP is saved in C:/Windows/system32/Drivers/etc. If you cannot find it, you can search by using the system's search tool. After finding it, open it directly with notepad, and delete all the content of other lines except the beginning of "#", for example, "127.0.0.1 onlinestore.smgbb.cn ", click Save to save the file. Of course, you can also choose to delete websites that are blocked and you want to access, so that other websites that are blocked will not be affected.

This method uses the hosts file over DNS query to direct the domain name of the movie website to an IP address 0.0.0.0 that may not exist, avoiding the website, naturally, you will not encounter this nasty question window.

If there are multiple websites to be blocked, you can connect the domain name to a fake IP address or any IP address in the LAN based on the above method to solve the problem.

Iii. Experience

When you encounter some websites that cannot be opened, and some websites can be opened smoothly, in addition to setting a URL Filter in the IE browser, the hosts table file is the most suspicious. The above method can be easily solved. In view of this, some annoying websites (such as the Baidu plug-in installation page) can be used to "Block" them. The method is very simple, add a line similar to 127.0.0.1 bar.baidu.com (separated by space between 127.0.0.1 and bar.baidu.com) to the end row of the hosts table file, and save and exit the hosts table file. You can also use the hosts table file editing function of the netassistant, and click "add" in the window shown in Figure 1, enter 127.0.0.1 and bar.baidu.com in the "ip address" and "Domain Name" columns, and click "save now. In the same way, you can "block" other websites that you do not want to access in your brain.

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.