You will need the domain name (eg: example.com, test.example.com) and the IP address of the target server. Make sure you close all open browser windows before doing this.Common locations of the 'hosts' file:
Windows 95/98/Me: c:\windows\hosts
Windows NT/2000: c:\winnt\system32\drivers\etc\hosts
Windows XP (Home OR Pro): c:\windows\system32\drivers\etc\hosts
(you may need administrator access for Windows NT/2000/XP)
NOTE: 'hosts' is the name of the file and not another directory name.
It does not have an extension (eg: .exe, .txt, .doc, etc.)
1) Copy the location to your 'hosts' file from the respective Operating System above (copy only the bold area)
2) Open Windows Notepad (Start -> All Programs -> Accessories -> Notepad)
3) Click on the File menu and choose Open...
4) Paste that location into the File name: field and click the Open button
5) Start on a new line at the bottom of the file
6) Type the IP address, hit the TAB key, then type the domain*
7) Save the file and close all open browsers before attempting to browse to the domain.
Remember, this is only a temporary fix, so once your registrar has the updated information and DNS is fully propagated, you will need to remove any lines you added to the 'hosts' file.
NOTE: this ONLY works on the computer where you changed the 'hosts' file.
*You can add more than one hostname on the same line, just make sure you have at least one space or TAB in between each one.
Example line: 192.168.0.10 example.com test.example.com www.example.com