Work on sites before the DNS has rolled over (by editing the hosts file)

By Ryan
Picture of the author
Published on

Important: This does not work if you are behind a proxy, which includes antivirus firewalls and such.

  • Right click on the hosts file in C:\Windows\System32\drivers\etc
  • Go to properties, turn off "read-only"
  • Open the file using Notepad or any text editor
  • Add a line to the bottom of the file with the IP and domain
  • When you are done, don't forget to turn read-only back on again

Ex. 200.200.200.200  thedomain.com

Use the IP of the new server and then the domain you want that IP to resolve to.

Now you can browse to that domain and it will resolve to the new IP even though the DNS hasn't been updated yet.