The hosts file is a system file that stores a list of web addresses (domains) and their IP addresses. Since it has priority over DNS, it is often used to speed up the loading of certain sites, as well as elementary local blocking of access to one or another Internet resource.
How to find the hosts file in Windows 10
To start editing, first you need to find out where the hosts file is located in Windows 10. To do this, you need to open "Explorer" and go to the following path:
The hosts file can be hidden. In this case, you need to make it visible. You can read how to do this in this article: How to view hidden files and folders in Windows 10
Modifying the hosts file in Windows 10
The main purpose of editing the hosts file is to restrict local access to certain Internet resources. To do this, you need to open the file and edit it as follows.
- Navigate to the directory containing the hosts file. (see above)
- Open the file with Notepad.
- For example, you want to block access to the site example.com from your computer. To do this, go to the end of the hosts file, and enter the following information:
- Save the file. Now from this computer it will be impossible to access this site until you delete this line.
* You need administrator rights to edit the hosts file.