To reset the Hosts file to the default value in Windows 10/8/7

Updated July 2024: Stop getting error messages and slow down your system with our optimization tool. Get it now at this link
  1. Download and install the repair tool here.
  2. Let it scan your computer.
  3. The tool will then repair your computer.

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

July 2024 Update:

You can now prevent PC problems by using this tool, such as protecting you against file loss and malware. Additionally, it is a great way to optimize your computer for maximum performance. The program fixes common errors that might occur on Windows systems with ease - no need for hours of troubleshooting when you have the perfect solution at your fingertips:

  • Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
  • Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
  • Step 3 : Click “Repair All” to fix all issues.

Download Now

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 :

%systemroot% system32driversetc

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.

Expert Tip: This repair tool scans the repositories and replaces corrupt or missing files if none of these methods have worked. It works well in most cases where the problem is due to system corruption. This tool will also optimize your system to maximize performance. It can be downloaded by Clicking Here

Related Video

Scroll to Top