Find Where Is The Hosts File in Windows 10 and Edit it.

By

Although small, the host file is particularly useful since it stores the host names and corresponding IP addresses. It is the one that is queried first before a DNS query on the web address servers. Thus, the host file is a basic tool for a network protocol: it converts host names into numeric IP addresses. However, the network can only work with these addresses. It is installed on all common operating systems for PC, Mac, and mobile devices. Only system administrators can edit the host file. Each time you visit a website, your computer first checks the host file to find a matching entry or rule for the page. follow this brief guide to find the location where is the hosts file in windows 10 / 7 and 8 and see how to use it to block websites or bypass your DNS if its blocking certain domains.

The Windows hosts file is located in “C:Windows\System32\drivers\etc“. In order to edit it, you have to open Notepad with administrative privileges and then open the hosts file.

What is a host file ?

First of all, the host file is rather a relic of the past. In the early days of the Internet, the file was used to link domain names to certain IP addresses. For example, the host file made sure that the computer could know which IP address was behind www.techlou.com. Therefore, this file contained a long list of these hosts and their special addresses. The influence of the term “host” can still be seen today, especially when we talk about “hosting a website”.

Where is the host file in Windows 10 / 7 or 8 ?

The windows hosts file location is “C:Windows\System32\drivers\etc“. If you open your own host file today in Windows 10, chances are that you will not find any entries in it. The Domain Name System (DNS) is now used to access websites. However, the host file is still convenient for local (LAN) and virtual (VLAN) networks. Among other things, you can edit the host file to block malicious websites while you are surfing the Internet.

hosts file in windows 10

The host file is a very simple text file that can be opened and edited under Windows with Notepad, for example. First, you can see the description of the file by Windows. You can set IP addresses and corresponding host names below. The defined IP address is on the same line as the corresponding host name. It is important that the two pieces of information are separated by at least one space. You can also add comments with the “#” prefix. Blank lines in the text file are ignored.

How to edit the host file in Windows 10, 7, 8 and XP

  • Find Notepad in the Start menu and right click on it. Select “Run as Administrator“.
open notepad
  • Once in the Notepad, click on “Open” in “File“.
  • Open the “host” file in Windows Explorer that you can find in : C:Windows\System32\drivers\etc .
hosts file location
  • Make sure to select “All files (*.*)” in the filetype dropdown so that you can see the host file, otherwise the host file will be hidden.
where is the hosts file


You now have the possibility to modify the host file.

edit hosts file in windows 10

Note: If you open Notepad without administrator privileges you will NOT be able to save the file after edit.

While most users never encounter the need to modify the Hosts file. Some users modify the Hosts file to block certain websites on their computer.

How to block a website with host file

With host file you can block access to Facebook on your computer by mapping facebook.com with an incorrect IP address.

edit hosts file in windows 10

Similarly, you can completely bypass the DNS server by mapping your favorite websites in the host file to their correct IP addresses.

So, there you have it, a quick and easy way to edit your Hosts File in Windows 10. (It’s the same steps for Windows 7 / 8 or even XP).

See also: How To Copy and Paste Multiple Items in Windows Clipboard

Related Posts

Leave a Comment