Modifying your hosts file will allow you to override the DNS for a domain, on that particular machine. This can be used to test your site without the test link, prior to going live with SSL, verify an alias site works prior to DNS changes, or for other DNS related reasons. This causes your local machine only to look directly at the IP specified.
Your hosts file will need to have two entries added that will contain the IP address you want the site to resolve to and the address. Adding the below two lines for example will point www.domain.com and domain.com to our current PHP5-ITK ("Refreshed" PHP5) cluster:
Below is how to locate and edit the hosts file on several OS platforms. Once the proper domain information is added you will save the file and your system will begin resolving to the specified IP. Once testing is finished these entries should be removed.
Windows Vista and Windows 7
Vista and Windows 7 use User Account Control (UAC) so Notepad must be run as Administrator.
1. Click Start -> All Programs -> Accessories
2. Right click Notepad and select Run as administrator
3. Click Continue on the "Windows needs your permission" UAC window.
4. When Notepad opens Click File -> Open
5. In the filename field type C:\Windows\System32\Drivers\etc\hosts
6. Click Open