Hosts File in Windows 10: location and editing

+1 vote
Can you suggest where I can find the hosts file in Windows 10 and how it can be correctly changed?
Are there any peculiarities?
asked Apr 29, 2016 in Computers by Isaac
edited Apr 30, 2016 by Expert Brian

1 Answer

0 votes

Good day!
The hosts file in Windows 10 is located at the same place as in the outdated operating systems Windows XP, Windows 7 and Windows 8, by the following pathname:
or if you have a non-standard Windows location, the folder, containing the hosts file, can be found as follows:
In the second variant, the system will replace “%SystemRoot%” system variable with the folder, where Windows has been installed.

How to get access to the hosts file:

 By default, the hosts file is available for editing only to system administrators. This is done to prevent third-party programs, inexperienced users and viruses from changing this file and thus harming the system stability.
If you just open the hosts file in Notepad and change it, you won’t be able to save it. In order to save it, you will have either to grant all the users the right to edit this file or run Notepad as an administrative user. By no means should you allow anyone to edit the file, for this will make a huge hole in the Windows security system, that’s why I will tell you about the second option.

1. Press the magnifier to the right of “Start” button and type “notepad” in the search box. After that, “Notepad” application will appear in the above located search results, click it with the right mouse button and choose the first line from the context menu: Run as administrator:

Run notepad to edit the hosts file

If there is no “Run as administrator” line in your context menu, that means your user doesn’t possess administrative rights. Turn to the computer main owner and ask for administrative rights.

2. Then, you’ll see Windows security system standard warning: 

User Account Control
Press “Yes”, as you have required access of your own volition and are well aware of your actions. If such message appears by itself without you doing anything, never agree.

3. Now we’ve run “Notepad” application and the only thing left is to open the hosts file, change and save it. Click “File” menu and select “Open”:

Open the hosts file in Notepad

4. Now insert a common pathname to the folder containing the host file into the address bar (%SystemRoot%\system32\drivers\etc), press Enter key and select the bottom right point “All files”:

Location of the hosts file in Windows 10
Hereafter, everything is simple: Make the necessary alterations in your hosts file and press Ctrl + S buttons to save it, then, close notepad. 
The hosts file alterations will come into effect immediately; there is no need to reload the computer.

If you have any questions left or need some details - please, ask a question!

answered Apr 30, 2016 by Expert Brian (5,410 points)

Related questions

+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
Welcome to Help Desk, here you can ask any questions and receive answers from our experts and other members of the community.

If you have any questions, please do not hesitate to contact our help desk!

Make a question!