Mondoze Knowledge Base

Search our articles or browse by category below

Windows 7, How to edit hosts file

Last modified: October 11, 2022
You are here:
Estimated reading time: 1 min

How to edit hosts file in Windows 7

Hosts file is a file where you can manually enter a hostname and IP address pair to bypass the DNS server.

By default, you cannot see the hidden file in the system folders.The hosts file is used to map hostnames (in other words domains) to IP addresses. With the hosts file you can change the IP address that you resolve a given domain name to. This change only affects your own computer without affecting how the domain is resolved worldwide.Learn more about hosts file here.

To show hidden folders in Windows 7, open a windows explorer, click “Organize” drop down button and select “Folder and search options”.

organize-folder-and-search-options

 

First, from the Folder Options, choose “Show hidden files, folders and drives, press Apply and OK to save the setting.

folder-options

 

Second,  access to hosts file’s directory to make the change.

May open with cmd, %systemroot%\system32\drivers\etc\

or access to My Computer -> C drive ->  Windows -> System 32 -> drivers -> etc

file-directory

 

Third, double click host file to open and edit the file.

notepad

 

Then, note that this method for editing the Hosts file will not work. You will get a message saying you do not have permission to save to this location.

do-not-have-permission-message

 

Beside that, In order to edit the hosts file, you have to click Start button and type in Notepad and then right click and choose Run as Administrator to open the hosts file.

run-as-administrator

 

Now navigate to drivers/etc/ folder again and make sure to choose. All files for File Types otherwise you won’t see the Host file.

save-as-all-files

 

Make your changes and click save to save all your changes. You will not get the error about not being able to modify the Host file. Learn how the guide of web hosting.

Was this article helpful?
Dislike 0
Views: 38