Previewing Your Site Before DNS Has Resolved

Here is a quick and easy trick to preview your site, before your domain nameserver has been updated to point at the new server.

1. Open this file with notepad.

C:\WINDOWS\system32\drivers\etc\hosts

N00b hint: Right click the file, select “Open With”, choose Notepad.

2. At the bottom of this file, add the IP address of your new server, hit tab, type in the domain without the http:// or the www.

Example:

#Your new server IP Address      Your Domain
46.47.123.67                     ratebeer.com

3. Reboot the browser, and punch in your domain.

The site on the new server should be showing. If rebooting the browser didn’t do it, try restarting your computer.

4. Good Practice

Delete that line (or # it out) after you are done testing the site on the new server! You’ll kick yourself if down the road you can’t figure out why the site on a *new new* server just won’t pull up, and you realize this line is still in your host file.

0 Comments
Submit Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

To include your code, use pastebin, and paste the URL in the comment body. Failure to do so may prevent your comment from appearing. Thank you.