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:
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:
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 192.168.0.101, 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 192.168.0.101. One you have finised editing the host file just click file>save then close notepad to finish.