If the HOSTS file has been changed in Windows 11 or 10, certain websites or IP addresses may be blocked.
To reset the HOSTS file to default values, you can apply the information below. All references to certain IP addresses or hostnames will then be removed and any blocks will be lifted.
But what is it hosts file actually? The hosts file is a text file that can be used to associate hostnames with IP addresses. Hosts files are used for two reasons.
Firstly, they can be used to... block access to certain sites. The other reason people use hosts files is to associate domain names with an IP address that is different from the original address.
So it is a simple text file that can be used to redirect hostnames or IP addresses. The hosts file is stored on your computer and can therefore be edited.
Reset HOSTS file to default values
To reset the HOSTS file to default values you will need a text editor. The simplest thing is to use notepad for this.
Click Search in the taskbar. Search for “notepad”. Then right-click on the notepad result and click “Run as Administrator”.
In the notepad menu, click “File” and then “Open”. In the “File name” field, type:
%windir%\system32\drivers\etc\hosts
Then click the “Open” button to edit the HOSTS file.
To restore the contents of the HOSTS file to default values, copy the text below and paste it into the HOSTS 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:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
#
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Now press CTRL + S to save the HOSTS file. You can also click “File” and then “Save” from the menu.
The HOSTS file has now been reset to default values and then saved. Now close notepad.
I hope this helped you. Thank you for reading!