Hosts file modification invalid reason and solution

  

When do I need to modify the hosts file? Basically, after the webpage has been maliciously tampered with, many users will find that this is not so simple and can be changed. It is not uncommon for the hosts file to be invalid. So today this tutorial will help you. Sorted out some methods.

Before solving this problem, let's talk about the hosts file briefly. Many newbies may not know about it. The soft media first introduced the network anti-thesis at the Vista home (www.vista123.com). The black file is to modify or even redirect the malicious URL by modifying the hosts file.

Simply put, 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.

Back to today's main topic, modifying the host to point the domain name to the new ip is always ineffective, tried many ways, the problem still exists, so on the Microsoft website to find the answer, and finally found a & ldquo ;DNS Client” service problem, “DNS CLient” service is used for caching dns, so modifying the files of hosts is not effective immediately, it takes a period of time delay, usually you can use ipconfig /flushdns to refresh the dns cache. However, this method seems to have no effect on my problem, so simply open the Control Panel - Administrative Tools & ndash; service, where it finds "DNS Client" and disables it and changes it to manual mode.

The problem is solved, and the hosts file is modified at any time. Note that this article is invalid, refers to the invalid after the setting, does not mean that there is no permission to modify the hosts.

If you have any of the above problems, you can try the above method to modify. Again, 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