Before configuring the host file in windows 10, you need to understand the working of the host file. The host file plays a critical role in the networking of a computer.
It is like the Phonebook, which saves the contact information of websites in the form of IP addresses, so, you do not need to remember the IP addresses or enter them manually before visiting any website or network address.
Whenever a web address (www.twitter.com) is entered in the web-browser, the operating system (Windows) first checks the host file saved on your computer. The location of the host file may differ in different operating systems.
In Windows 10, the host file is located at “%windir%\System32\drivers\etc\hosts” or “C:\Windows\System32\drivers\etc\hosts”.
The host file is a text file that consists of separate lines, where the IP addresses are placed in the first column followed by the corresponding website address or hostname.
Both of the columns are separated by space. In the host file, the IP address of your computer is written as “127.0.0.1 localhost”.
In this article, we will discuss how to configure the host file in windows 10.
Configure Host File in Windows 10
Click the Start menu and scroll down to locate “Windows Accessories”.
Under the Windows Accessories, locate and right-click on Notepad. In the right-click menu, hover your mouse pointer to the “More” option.
From more options, select the “Run as Administrator” option.
User Account Control setting message will appear on the screen. Select “Yes” to continue.
In Notepad, click on the “File” menu and select “Open”.
Enter and navigate to the address C:\Windows\System32\drivers\etc using the address bar in the open file dialogue box.
Enter the file name “hosts” and click “Open”
To configure the host file as per your requirements. Save and then close the file before further action.
Now you need to clear the DNS cache of your system to make the changes effective. Open the command prompt in administrator mode and enter the command “ipconfig /flushdns”.
If you find this process difficult, you may find third-party tools to edit the host file with a couple of clicks. One such application is “Host File Editor”.