Solving the Vista system to modify the hosts file is invalid

  

Many friends may have encountered such a problem, used to block some malicious URLs, modified the hosts file, but it does not always take effect. 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 introduced the network
anti-black file many times, by modifying the hosts. Files to achieve blocking or even turning to malicious URLs.

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 documents, the hosts file must be ascii encoding, if you save it as unicode format will not be read correctly.

back to today's main topic, modify hosts domain name will point to the new ip is not always take effect, tried many ways, the problem still exists, so Microsoft's Web site to find the answer, finally found a " DNS Client service problem, "DNS CLient" service is used for caching dns, so modifying the files of hosts can not take effect immediately, it takes a period of delay, usually you can use ipconfig /flushdns to refresh the dns cache, but This method seems to have no effect on my problem, so simply open the Control Panel - Administrative Tools - Services, find "DNS ClIEnt" in it and disable it and change to manual mode.

So the problem is solved, hosts file to modify at any time to take effect.

That is 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