Is it very annoying to jump out of a bunch of junk ads when browsing the web? In fact, this problem is very easy to solve, but many people still don't know. I often complain that my computer is locked by a virus page, can't be closed, or often jump out of the ad window, I don't know what to do.
Today, Xiaobian tells you a secret. Windows has a little-known feature that can help you block these malicious websites. This is the hosts file. You can modify it by manually modifying it without installing it. Third-party tool software. Then you will definitely ask what is the hosts file?
First, what is the hosts file
The hosts file exists in system32\\drivers\\etc in the Windows directory. This file has no extension, but we can use Notepad to open it. Open the file, you can see that there are many English explanations. At the end of the file, there is a line of 127.0.0.1localhost. This file includes the host's IP address and image name, and each address entered should be placed in a separate row. The IP address should be placed in the first column of the corresponding hostname. There should be at least one space between the IP address and the host name.
Since we are accessing the 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 specific websites.
The hosts file also speeds up our access to the site. 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 the speed of visiting a website. Properly working with the hosts file can speed up access to the site. For example, the specified IP address is added to the hosts file, so that the DNS server does not need to parse the address of the web page.
In fact, the hosts file has other special advanced features: such as convenient LAN users to connect to the system. These features can greatly reduce our access time to the network, making our access to the network faster and more convenient.
Second, blocking specific websites
To block specific websites, we can do the following.
1. In C:\\windows\\system32\\drivers\\etc, find the hosts file and open it with Notepad.
2. Enter the addresses of several websites you want to block at the bottom of the file. The format is as follows. The URL to be blocked is my123***.com:
127.0.0.1 my123* **.com
127.0.0.1 my123***.com
3. Save the hosts file.
4. Change the properties of the hosts file to read-only to prevent tampering by viruses.
Third, speed up access to the website
To speed up the resolution of the URL, for us to speed up the visit to the website, first find the IP address of the website you need to visit, you can use the ping command. Then, open the hosts file and add the “IP address domain name” at the end of the file.
Finally, save the hosts file and modify it to read-only properties. When you browse the website again, the domain name — IP address resolution is done by your local machine, without accessing the DNS server, speeding up the website access speed.
When you manually modify it using the hosts file, you won't complain that your computer is locked by a virus page, can't be closed, or often pops out of the ad window, I don't know what to do
When many users are working on a computer, they suddenly encounter a thorny problem, that is, when t
When you click the shutdown button on the Win7 system, you find that it becomes a r
The solution is as follows: 1. Locate the file in the WinXP system and copy it to the correspondi
The mouse is one of the most important input devices for the computer, and it is of
Win7 changes the default Opera browser method
How to deal with Win7 blue screen error 0x0000003B?
After the Win10 graphics driver is updated, the display screen becomes larger and unclear
Connection method for sharing printers on different network segments of LAN in Win7 environment
What computer can GMR Hong Kong Financial Group use?
Win7 system C disk free capacity is full How to add space
Microsoft: Win7/8.1 stocks must be cleaned up by October 31 next year
Win7 system computer mouse often stuck can not move how to solve
Win7 how to close the remote desktop service
Win7 system play "Dark Soul 3" appears white screen no response how to solve
What should I do if the Windows 7 system desktop cannot create a folder?
Solve the inability to access Windows7 file under XP3
How do notebooks in Win10 environment increase endurance by turning off background applications?
Steps to turn off root remote login on AIX
See CFS2015 live sweepstakes wins the event website
What is IESuper and what are the functions of IESuper?
Win8 running where, how to open Win8?
How to play DNF in the world of nothingness DNF emptiness of the customs clearance Raiders
Retrieving Win8 accidentally deleted control panel Metro icon