How to Edit Your Hosts File in Windows 10

What is the hosts file?


The hosts file is a document where you can manually input a hostname and IP address association to bypass the DNS server.


By default, this hidden file is not visible in the system directories.


To reveal hidden folders in Windows 7, open Windows Explorer, click the "Organize" drop-down menu, and select "Folder and search options."




In the Folder Options, select "Show hidden files, folders, and drives," then click Apply and OK to implement the changes.




Next, navigate to the directory of the hosts file to make the necessary changes.


You may open it using cmd, %systemroot%\system32\drivers\etc\


or go to My Computer -> C drive -> Windows -> System32 -> drivers -> etc



Double-click the hosts file to open it for editing.




Be aware that using this method to edit the Hosts file may not work. You might see a message indicating you lack permission to save changes to this location.




To successfully edit the hosts file, click the Start button, type Notepad, then right-click and select Run as Administrator to open the hosts file.




Now, once again navigate to the drivers/etc/ folder and ensure you select All files for File Types; otherwise, the Hosts file will not be visible.





After making your edits, click save to apply all changes. You will no longer encounter the error regarding modifications to the Hosts file.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.