How to edit the Hosts file

windows XPThe Hosts file is a local file on your Windows workstation, that allows you to override DNS records. This can be useful if you need to access a website for which you are waiting for DNS changes to be replicated across the internet.

Hosts file

The hosts file is hidden by default, so first we need to show hidden files.

  1. Start by opening Windows Explorer.
  2. Press and release the Alt key to reveal the Menu bar.
  3. Go to Tools > Folder Options...
  4. Select the View tab.
  5. Click Show hidden files, folders, and drives.
  6. Click OK.

Next we need to open Notepad as an administrator.

  1. Click the Start button, and Search for Notepad.
  2. Right-click it and choose Run as administrator.
  3. Click Yes in the dialog box.

Now we can open the Hosts file.

  1. Go to File > Open
  2. Browse to C:\system32\drivers\etc
  3. Change file types from Text Documents (*.txt) to All Files.
  4. Open the hosts file.
  5. Add the following lines to the bottom of this file, and Save the file.


Thanks for visiting.