Where is the Win7 system Hosts file? How to fix Hosts file

  
                

The Hosts file is a system file with no extensions, mainly to speed up domain name resolution and block websites. The Hosts file is a good thing that helps us effectively block all kinds of malicious websites and protect our computers. We can also add or modify it, but there are still many users who use Win7 system, where is the Hosts stored? Here is a detailed discussion of where the Win7 system hosts file is, how to fix the hosts file.

The specific steps are as follows:

First, what is the Hosts file

The main function of the Hosts file is to define the mapping between IP address and host name, which is a mapping IP address and host. The rules of the name. Can be opened with a text file! When the user enters a URL that needs to be logged in in the browser, the system will first automatically find the corresponding IP address from the Hosts file. Once found, the browser will immediately open the corresponding webpage. If not found, the browser will submit the URL. The DNS server performs IP address resolution. This is also a way to improve the speed of opening web pages!

Second, where is the Hosts file location

1, Windows xp/2003/vista/2008/7/8 user Hosts file is in “c:\\windows\\system32\\drivers\\etc

2, you can directly enter according to the above path, you can also enter c:\\windows\\system32\\drivers\\etc

after Win+R 3. How to repair the Hosts file

1, copy the Hosts file to the desktop, open it with Notepad!

2. Delete the entire contents of Notepad, copy the following contents into a file and save it:

# Copyright (c) 1993-2009 Microsoft Corp.## This is a sample HOSTS File used by Microsoft TCP/IP for Windows.## This file contains the mappings of IP addresses to host names. Each# entry should be kept on an individual line. The IP address should# be placed in the first column followed by the corresponding Host name.# The IP address and the host name should be separated by at least one# space.## Additionally, comments (such as these) may be inserted on individual# lines or following the machine name by d & a ‘#&rsquo ; symbol.## For example:## 102.54.94.97 rhino.acme.com # source server# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself. # 127.0.0.1 localhost# ::1 localhost

3. Replace the modified Hosts file with c:\\windows\\system32\\drivers\\etc to replace the previous Hosts file. Success!

The above is about the Win7 system hosts file, how to fix the contents of the hosts file. Users in need can find the location of the hosts file according to the above method. Let's try it and you will know.

Copyright © Windows knowledge All Rights Reserved