- To reset the “Hosts” file on Windows 11, open Notepad as an administrator.
- Copy and paste the original settings.
- Create a backup of the previous file.
- Save the new Hosts file in the “%WinDir%System32Driversetc” location.
On Windows 11, if you made changes to the “Hosts” file, you can quickly reset it to its default settings to resolve Domain Name System (DNS) problems caused by editing this file.
The Hosts file resides in the “%WinDir%System32Driversetc” path and allows you to map domain or host names to IP addresses. Typically, you don’t have to map addresses on Windows 11 manually. However, it can be useful in many scenarios. For example, when you want to block certain websites. When you don’t have a local DNS server in the network, you must map an IP address to a computer name or prepare a website transfer to a new hosting provider.
The only caveat is that if you make a mistake, you may end up with unwanted networking behaviors. If you notice networking issues after editing the Hosts file or you want to undo previously made changes, it’s possible to reset the file’s configuration.
This guide will teach you the steps to reset the Hosts files on Windows 11. (These instructions should also work on Windows 10.)
Reset Hosts file to default on Windows 11
To reset the “Hosts” file to its default settings on Windows 11, use these steps:
Open Start on Windows 11.
Search for Notepad, right-click the top result, and select the Run as administrator option.
Copy and paste the following text into the file:
# 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: # # localhost name resolution is handled within DNS itself. # 188.8.131.52 rhino.acme.com # source server # 184.108.40.206 x.acme.com # x client host # 127.0.0.1 localhost # ::1 localhost
Click on File and select the “Save as” option.
Browse to the Hosts file location:
Select the “All files” option in “Save as type” setting.
Right-click the existing hosts file and select the Rename option.
Confirm the hosts.old name to keep a backup of the previous configuration and press Enter.
Use the hosts name in the “File name” setting.
Click the Save button.
Once you complete the steps, the Hosts file will reset to its default settings, fixing any related problems on Windows 11.