Server Gigabit Guide

Windows 7, How to edit hosts file

You are here:
Estimated reading time: 1 min

How to Edit Hosts File.

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.It 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  here.

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

Windows 7-hosts file-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.Windows 7-hosts file-show hidden file,folders,drive

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 -> etcWindows 7-hosts file-hosts folder

Third, double click host file to open and edit the file.Windows 7-hosts file-open 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.

Windows 7-hosts file-message permission

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.

Windows 7-hosts file-Ru 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.

Windows 7-hosts file-navigate to driver-etc-folder-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 it. Learn how the guide of web hosting and Please refer to the following articles for the procedures.

KnowledgeBase: Web Hosting Features Guide

 

Was this article helpful?
Dislike 0
Views: 88