Tuesday, February 05, 2008

Testing a web site before you migrate the DNS

When you set up a web site on a new domain an easy way to test it out before migrating the dns is to add a record to the host file on your local machine, and override dns to get to the new ip address.

here is a command from windows system that will open host file on any windows os
notepad %systemroot%\system32\drivers\etc\hosts

or on unix
vi /etc/hosts

then add the record (be sure to put a tab between your ip and the domain
70.170.170.170 my.domain.com

Be sure to remove the entry when you migrate the DNS. Also before migrating DNS records be sure to lower the TTL to 5 minutes for at least 48 hours before you make the change.