Solve the modification of the hosts file under Vista system is invalid

  
        

A lot of friends may have encountered this problem. When blocking some malicious URLs, the hosts file is modified, but it doesn't always work. Internet search, Windows7 system and Vista system, XP system have encountered such a situation, it seems that the problem is still very common. A special solution is attached today, which may not be smothered, but it does solve many of the problems in this situation.

Before solving this problem, let's talk about the hosts file briefly. Many newbies may not know about it. The soft media has repeatedly introduced the network anti-black file, which is to modify the hosts file to achieve malicious URLs. The shield even turned.

Simply, the hosts file is used for the local dns service. It is written in a text file in the format of the ip domain name. The Windows system is usually stored in the system32 directory of the system disk, such as C:\\windows. \\system32\\drivers\\etc\\, the local host is generally defined as 127.0.0.1 locahost.

According to Microsoft's related documentation, the hosts file must be ascii encoding. If you save it as unicode, it will not be read correctly. Going back to today's main topic, modifying the hosts to point the domain name to the new ip is always ineffective. I tried a lot of methods, but the problem still exists. So I found the answer on Microsoft's website, and finally found a "DNS Client" service The problem, “DNS CLient” service is used to cache dns, so the modified files can not be effective immediately, it takes a period of delay, usually you can use ipconfig /flushdns to refresh the dns cache, but this method for me The problem seems to have no effect, so simply open the Control Panel - Administrative Tools & ndash; service, where it finds "DNS Client" and disables it and changes it to manual mode. So the problem is solved, and the hosts file is modified at any time.

It is still the same sentence, this method may not be effective for all the friends encountered, just for an example to learn from it. Welcome friends and friends to give better solutions and solve the difficult Windows problems we have encountered.

Copyright © Windows knowledge All Rights Reserved