How can I preview a site before I switch the DNS?

If you're moving your site to Website Source from another host, you'll want to test your site on our servers before switching the name to point at its new home.  If you have a dedicated IP address, this is very simple: just go to http://that.domain's.ip.address/ and view the site from there.  However, if your domain is on a shared IP address, or if the code on your site uses absolute instead of relative links, this might not be a viable answer.  In these sort of situations, the best solution is to modify the 'hosts' file on your computer.  By doing so, you can trick your computer into loading the site from our servers and behave exactly as it would once the name servers are changed to ourselves.

To get started, you'll need to find your hosts file.  Use the table below to find out where to find your hosts file:
Operating System Versions Location
Unix, Linux /etc/hosts
Microsoft Windows 95, 98/98SE, Me %WinDir%\
NT, 2000, XP, 2003, Vista, 7 %SystemRoot%\system32\drivers\etc\
Apple Macintosh 9 and earlier System Folder: Preferences or System folder
OS X 10.0 – 10.1.5 (Added through NetInfo or niload)
OS X 10.2 and newer, iOS /etc/hosts
Android /system/etc/hosts

Once you've found the hosts file, open it up in a text editor (such as Notepad in Windows, or TextEdit in OS X), and add a line similar to the following:
Replace the number with the IP address for your domain, and the name with your own domain name (both with and without the www).  Now save the file and close the text editor.  The changes should take effect immediately, though for completeness' sake you should clear the cache on your browser, to ensure that you are looking at the correct version of the page.

Add Feedback