I have quite a few blogs and websites and there are times when I need to bypass the DNS settings while testing them. Bypassing DNS settings can be done by editing the hosts file which is present in your Windows system files. Or, you might want to access servers in another subnet via a VPN tunnel.

Here is how you can edit the hosts file in Windows Vista.

Editing the Hosts File

Editing the Hosts File the usual way

  1. Open Notepad with Administrative privileges. This can be achieved by clicking Start -> All Programs -> Accessories, and then right-click Notepadopen as Administrator option. and use the
  2. Once Notepad is open with Administrative privileges, go to the following Windows directory – “C:WindowsSystem32driversetc” in Notepad and open the hosts file.

Now edit the hosts file as you wish and then save the file.

Editing the Hosts File for frequent users

For people like me who end up editing the hosts file often, it makes a lot of sense to have a shortcut of the hosts file on the desktop for easy access. Follow the following steps if you are looking out for an easy way to edit the hosts file often and would prefer to have a shortcut placed on your desktop.

  1. Create a Notepad shortcut on your desktop by right-clicking Notepad in the Start Menu and selecting ‘Send to Desktop’.
  2. Right-click the shortcut to Notepad on your desktop and select ‘Properties’ from the menu.
  3. Click the ‘Advanced’ button near the bottom of the shortcut tab and check ‘Run as Administrator’.
  4. Click OK in the advanced properties window.
  5. Replace “%SystemRoot%system32notepad.exe” with “%SystemRoot%system32notepad.exe C:WindowsSystem32driversetchosts” in the Target box.
  6. Click OK in the ‘Properties’ window to save the changes.

You are done! Use the shortcut to quickly open your hosts file with Notepad with administrative privileges.