If ever it is required to edit the hosts file in Windows, here are the steps you need to follow.
The process of modifying hosts file in Windows 10, Windows 8 or Windows 7 are the same.
Steps to edit hosts in Windows 10/8/7:
- Press the Windows key or Start menu on your computer
- Search for Notepad or any other text editor
- Right-click on Notepad and Run as Administrator
- Click on File > Open and paste c:\Windows\System32\Drivers\etc\hosts
- Add/remove the entries
188.8.131.52 rhino.acme.com # source server
184.108.40.206 x.acme.com # x client host
While updating the hosts file, keep in mind these points.
- Do not add # on the start of the line that you are adding. This comments out the entry.
- The IP address is placed first followed by the respective hostname
- The IP address and the hostname in the entry should be separated by at least one space
Read also: How to unzip files without WinZip
Why we modify the hosts file? What is the significance of the hosts file?
Let me explain.
The Windows hosts file contains the mapping between the hostname and an IP address.
If you try to connect to any hostname over a network, Windows connects to the IP address, specified in the hosts file. Each time a request is made, Windows looks for the hosts file mapping in the System32 folder.
That’s all on how to edit hosts file in Windows.
Happy learning 🙂