The Hosts file is a system file without an extension, which is mainly used to speed up domain name resolution and block websites. The Hosts file is a good thing that can help us effectively block various malicious websites and protect our computers. We can also add or modify it, but there are still many users using Win7 system who still don’t know where the Hosts are stored? Today, the editor of Huajun brings you a simple and easy-to-understand solution. I hope you will support and share the carefully selected content. If you like it, hurry up and get it!
The specific steps are as follows:
1. What is the Hosts file?
The main function of the Hosts file is to define the mapping relationship between IP addresses and host names. It is a provision for mapping IP addresses and host names. Can be opened with a text file! When a user enters a URL that requires login in the browser, the system will first automatically search for the corresponding IP address in the Hosts file. Once found, the browser will immediately open the corresponding web page. If not found, the browser will submit the URL. DNS server performs IP address resolution. This is also a way to improve the speed of opening web pages!
2. Where is the location of the Hosts file?
1. The Windows xp/2003/vista/2008/7/8 user Hosts file is in “c:windowssystem32driversetc”
2. You can enter directly according to the above path, or you can enter c: windowssystem32driversetc after Win+R.
3. How to repair the Hosts file
1. Copy the Hosts file to the desktop and open it with Notepad!
2. Delete all the 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 denoted by a ‘#’ 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. Place the modified Hosts file into c:windowssystem32driversetc to replace the previous Hosts file, and the repair is successful!
The above is all about where the hosts file is in Win7 system and how to repair the hosts file. Users in need can find the storage location of the hosts file according to the above method. You might as well try it and find out.