Viewing a domain using hosts file
Sometimes, a temporary URL might not work due to the site pages checking requesting URL and serving only when the request comes from the domain name and not the temporary URL. In many cases (e.g. WordPress), the main page and all subsequent pages are redirected to the domain name and this might open the page on the old server whereas you want to check site on the new server before updating DNS.
In such cases, you can use your computer's hosts file to temporarily point your site to the IP hosting your domain and view it before updating DNS. Please add the following entry to the bottom of your computer's hosts file to access the domain temporarily from the new location.
x.x.x.x yoursite.com www.yoursite.com
(Replace yoursite.com with your actual domain name, and the IP x.x.x.x with the actual IP of your domain on our servers.)
- On our ASP plans, IP can be found in control panel under "Websites > yoursite.com". The IP is listed at the top alongside the domain name.
- On our Linux plans, you can find the IP by expanding stats section in cPanel in the left pane.
In Windows 7, The Path is C:\Windows\System32\drivers\etc\hosts. Open notepad, enter C:\Windows\System32\drivers\etc\hosts in the "File Name" field and click "Open". In certain cases, it might be hidden, so you can traverse to the etc folder, right click on the file, choose properties and uncheck read-only. This is a temporary setting that you can revert after verifying site propagation.
If you are running a different OS, you can find the path of hosts file in your computer by checking the link below.
http://en.wikipedia.org/wiki/Hosts_file