The Hosts file is a computer file used by an operating system to map hostnames to IP addresses. The Hosts file is a plain text file and is conventionally named hosts. The host file is one of several system facilities that assist in addressing network nodes in a computer network. Sometimes you might want to edit the Hosts file for adding IP addresses or changing the existing ones. We have done a detailed tutorial on how to edit the Hosts files in Windows 11. But what if you want to reset the Hosts file in Windows 11 to the form it was when you set up Windows? While there is no direct option to reset a Hosts file, you can always copy and paste the original Hosts file data, here is how to do it.
Related Reading: How to Edit Hosts File in Windows 11
How to Reset Hosts File in Windows 11:
Step 1: Open the start menu and type notepad.
Step 2: From the search result, right-click on the notepad, and select the Run as administrator option.
Step 3: Once the notepad is open, you need to copy and paste the following text onto 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: # # localhost name resolution is handled within DNS itself. # 22.214.171.124 rhino.acme.com # source server # 126.96.36.199 x.acme.com # x client host # 127.0.0.1 localhost # ::1 localhost
Step 4: Now you need to save the file to the desired location. Click on the file menu and select Save as option.
Step 5: Here you need to copy and paste this location %WinDir%\System32\Drivers\etc and press enter.
Step 6: This will open the Hosts file directory and here you will see the existing host file. Right-click on the existing host file and rename it to Hosts.old or something different.
Step 7: Once you have renamed the old Hosts file, now you can save your new Hosts file with the same name. Use the name as “hosts” in the File name box and save the file as the “All files” option.
Now you will have the new Hosts file which is reset to the default Hosts file in Windows 11.