Windows contains a file named hosts that allows you to override where your browser looks for a website. This is useful when you need to test a website on a new server before pointing the domain to that new location to make it live.
The first step you take depends on the version of Windows that you are using.
Nothing special is needed in XP, simply open up Notepad from your Start Menu.
Windows Vista and 7
Find Notepad in the Start Menu and right click it, this will present you with a set of options from which you need to select the one that says Run as Administrator. Once you have clicked this Notepad should launch.
Windows 8 and 8.1
Bring up the Metro (Start Menu) interface and find Notepad (you can type to search). Then right click the Notepad icon and select Run as Administrator from the bottom of the screen. Notepad will now start.
Now you need to open the hosts file inside Notepad to make the required changes. This file is typically located here in...
Normally, if you have not edited this file before, you will see a couple of existing entries that refer to localhost. This is normal and these should be left alone.
To preview your website, you need to enter the IP address of your new server followed by a space and then the address of the website, like so:
22.214.171.124 example.org 126.96.36.199 www.example.org
Replacing 188.8.131.52 with the real IP address of your new server and example.org with your domain name. Any additional domains you wish to use should be added individually on new lines at the bottom of this file.
Save the file when you have finished making your changes and reload your web browser. You should now be able to preview your website from the location you have specified.