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:
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:
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”:
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”:
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!