The host file, a concept similar to the domain name server (DNS) is a part of many operating systems.
It is a local hostname that you can use to override the results provided by DNS servers and perform a domain lookup on a local area network.
Earlier in the News: Microsoft Ends Support for Windows Explorer after 26 Years.
In windows 11 and windows 10, you can find the host file in C:\System32\drivers\etc\hosts
It contains lines of code which include two lines of code of which one is the IP address, and the other is the computer hostname. Typically, a host file looks like this.
You can ping a local server by from the command line.
View and edit Windows 11 and Windows 10 Host File
Usually, Windows 11 or 10 doesn’t display a valid enter since they are commented out. But you can view it by opening it in Notepad.
While this guide is simulated on a Windows 11 environment, you can perform a similar operation on a Windows 10 computer.
You may also be interested in How to find and play Microsoft Surfing Game.
From the search bar, type in “notepad” and select the app to open.
Next, open the Windows file explorer by pressing Windows Key + E. and from the “Quick Access” search bar of Windows 11, type in %SystemRoot%\System32\drivers\etc\ and press the Enter Key.
From the list of files that is displayed, you will notice the “Hosts” file.
Next, drag the “Hosts” file into the “Notepad” window.
You will notice the IPv4 and IPv6 address are commented out with a hash (#), you can view them by uncommenting them.
But you can’t edit the original host file without administrative privilege. To do so, go back to the “Hosts” location in file explorer and drag the file into your desktop GUI.
You can do this by right-clicking on the file and dragging it at the same time, and to paste it, select the “Copy here” option in the dialogue box.
Next, open the notepad and drag the Hosts file from the desktop GUI to Notepad. Then add your entry to the file, and click CTRL + S to save.
Next, close Notepad and drag the Hosts file from your desktop window back to the Hosts location on your file explorer. To release it, select Replace the file in the destination.
You will be denied access until you have administrative privilege. Click the Continue button to provide it.
You can view your changes by opening the Hosts file in Notepad again.
I hope you find this guide helpful. Kindly leave a comment if you have any questions.