How to edit Host File Windows 7

The host file in windows is a file that maps host names to IP Address. This works much like a simple DNS, however only one Host Name can go to one IP Address. This can be useful in many situations, for example if you are setting up a small office and don’t have the resources for a DNS you could set-up a host file to resolve internal Host Names for you.

Back in the days of Windows XP and NT all you had to do was open you host file and edit the data. But when windows Vista and 7 came along things became a bit more complicated as you have to open as administrator, so what if your not logged in as an administrator?

Well you first need to open Notepad as an administrator, to do this find notepad on your start bar, then right click, Open as Administrator:

Right Click, Run As Admin

You will then be asked if you “Want the following program to make changes to the computer“, click yes. Now this will load Notepad with full administrator rights, allowing it to open system files. You now need to click File>Open then navigate to C:\Windows\System32\drivers\etc\hosts:

The Host file Opened in Notepad With Admin rights

Now you will be able to edit your host file. You should leave anything already in your host file as it is, unless it is obliviously linked to a mallware. To add an entry you first need to enter the IP Address and then the host name, so on my network I have an Intranet server running on the address, so I type this address into the host file, then press TAB then type the host name. Now when I want to see my Intranet server I only need to type in companyweb, much easier to remember then One you have finised editing the host file just click file>save then close notepad to finish.

, , , , , , , ,

  1. #1 by Robert Wilson on October 18, 2010 - 9:04 am

    thanks for the post

Comments are closed.