How To Edit Hosts File On Windows 10 or Windows 11. In this article, you will read what is Hosts file used for and how method to edit host file on Windows 10 and 11. Sometimes, there is a need to edit the host file on your system. Because, your host file can be edited maliciously. So, you may just want to control access to certain websites or control network traffic.
What Is Hosts File Used For?
Host File are the computer system files. It is an operating system file that maps hostnames and connections between an IP address and domain names before going to domain name servers. This file is an ASCII text file. It contains IP addresses separated by a space and then a domain name. Originally a file named HOSTS.
It resolved hostnames for decades before the DNS system was implemented, since way back in the ARPANET days. It varies very little between Windows, macOS, and Linux. The syntax is almost the same.
The typical syntax consist of three parts. The first part is the location to redirect the address to, the second part will be the address that you will want to redirect, and the third part is the comment.
(IP Address) (URL) #(Comment) ; for example
127.0.0.1 localhosts #loopback
How To Edit Hosts File On Windows 10 or Windows 11?
You can find the host file in the Windows folder, which is protected. If you want to edit, delete, or move the file, then you need the administrative priveleges to do so. To modify the host file, Notepad is the perfect choice. To edit the host file:
1.Press the Start button.
2.Type “notepad”.
3.Then right-click it.
3.Hit “Run as Administrator.”
4.Click on “File” in the top left corner.
5.Press “Open”.
6.Then navigate to the Windows hosts file’s location:
C:\Windows\System32\drivers\etc
7.Make it sure that you change the select to “All Files (.)” rather than “Text Documents (*.txt)”.
8.Hosts file doesn’t have a file extension.
9.It will not show up if you’re only displaying text documents.
10.After that, locate the “hosts” file.
11.Click open
12.Then edit the hosts file as per your wish.