Helps you easily block unwanted sites

Source: Internet
Author: User
Tags website domain names

To do things well, you must first sharpen your weapon. First, let's talk about Windows. There is a file named Host in Windows (If your operating system is Windows 98, go to the c: Windows directory to find it, for Windows 2000, go to the c: WindowsSystem32DRIVERSetc directory.) The word "host" is the host name, which stores the ing between the domain name and the IP address, that is, the one-to-one correspondence between an IP address and a domain name.
For example, when you enter the "http://www.yesky.com hosts file" in the address bar of IE browser, in fact, carefully look at it, you will see the IP address in the lower left corner of IE, but it is a flash. If this ing is not found in the HOST file, IE queries DNS further.

There are thousands of DNS servers on the Internet. They all play the same role, that is, they store file groups similar to HOSTS. After finding these groups, they will be the same as what we just said, if it cannot be found, it indicates that the domain name you entered has not been applied for, and IE will return the "Http 404" error, that is, the prompt cannot be found on the webpage.

Well, with so many basic knowledge, we started to talk about today's theme officially, that is, using the HOSTS file function of the local machine to shield the poor site, in this way, the website is blacklisted. First, right-click the HOSTS file we just found and select "open ", in the "open mode" dialog box, select the "Notepad" Program (because the icon of the HOST file is not recognized by Windows, but it is essentially a text file, the purpose of this operation is to prevent users from making changes at will. You don't need to take a closer look at the above pile. Observe the following line and one line is written like this: "127.0.0.1 Localhost" (note that spaces must be used in the middle). The "127.0.0.1" at the beginning is an IP address. However, it is special and indicates "localhost ", that is, the meaning of "Local Machine", that is, the machine currently used by the operator. Then we press Enter next to this line, enter "127.0.0.1 www.xxx.com" in this format, and save the disk to exit, enter the "http://www.xxx.com" address in the IE Address Bar and press Enter. Think about what will happen? Maybe you guessed it. Yes, at this time, IE cannot take you to the real IP address corresponding to this domain name. Instead, it will take you to the IP address 127.0.0.1, that is to say, you have turned to a circle and ran back, do you know? In this case, will the website be blocked?

Okay, start another line, and enter "127.0.0.1 www.yyy.com" and other ing, all the bad site domain names will be mapped into an IP address --- 127.0.0.1. In this case, in the future, no matter which site you are blacklisted on your local computer using IE browser, IE will ask you to switch around at your own door. It is certain that you cannot get in.

I add the website domain names I know to the HOSTS file one by one, COPY them to the response directory of each workstation, and strictly protect them. Facts prove that the effect is very good.

This method is very suitable for families, schools, or Internet cafes. I hope all the parents, teachers, and network administrators can manage their "one acre of three sub-Locations", because it is so hateful to be busy with websites, so you must stop it. However, this is also a bad thing, that is, we cannot block all the bad sites at a time, because we can all know the domain names of all the bad sites. However, I don't think it's easy. You only need to update the HOSTS file at all times. Because, after all, we don't need to spend money to achieve our goal.

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.