RECOMMENDED: Click here to fix Windows errors and optimize system performance
The Hosts file file under Windows is used to map host names to IP addresses. If, for any reason, you determine that your Hosts file has been compromised and malicious entries have been added, you can reset the Hosts file to the default value if you wish.
Reset Hosts file under Windows 10/8/7
The file Hosts file under Windows 10/8/7 is located at the following location :
To reset the Hosts file, open the file explorer, type the following in the address bar and press Enter :
Rename the Hosts file to hosts.bak. You may be required to take possession of the file first.
Then create a new Hosts file by default. Open a new text file named hosts in the %WinDir%system32driversetc folder.
Copy the following text into the notepad file :
# Copyright (c) 1993-2009 Microsoft Corp # This is an example of a HOSTS file used by Microsoft TCP/IP for Windows. This file contains IP address assignments to host names. Each entry must be held on a single line. The IP address must be in the first column, followed by the name of the corresponding host. The IP address and host name must be separated by at least one space. In addition, comments (like this one) on individual lines or after the machine name, which is identified by a'#' symbol. Click here to see how to lock, manage and edit the Hosts file under Windows.