To test your website before DNS propagation has completed you can edit the HOSTS file on your local computer. Your computer will use the entries in your HOSTS file before it looks up the current information in DNS. This walkthrough will explain how to edit the HOSTS file on Windows 98/Me/2000/XP/2003/Vista computers as well as on Apple Mac OS 9 machines.
Windows:
Locate the HOSTS file on your computer. Depending on the operating system you have, the following are locations you may be able to find this file.
Windows NT/2000/XP/2003/Vista:
c:\windows\system32\drivers\etc\hosts
Windows 95/98/Me:
c:\windows\hosts
Open this file with a text editor such as notepad or wordpad.
You will see two columns of information, the first containing IP addresses andthe second
containing host names.
By default a windows host file should be similar to the following:
127.0.0.1 localhost
You will need to add lines just underneath the existing line that will point requests from
your computer to your new server's IP address.
Suppose the IP address of your new server is 64.27.90.230 and the domain you want to
test is mexxus.com:
Save the file with these new entries and close all open browsers.
You can now go to either http://www.example.com or http://example.com to test your
new server.
Note:
When you are finished testing your new server please don't forget to reopen the HOSTS
file to remove the lines you added above.
Look in System Folder:Preferences and in the System Folder itself. See if you have a file named Hosts.
If not, create one in your preferred text editor.
Mac OS 9Open this file with any text editor. Near the end you will see two columns of information, the first
containing IP addresses and the second containing hostnames. There might be an existing line
that looks like this:
127.0.0.1 localhost
We are going to add lines just underneath that line that will pointrequests from your computer to
your new server's IP address.
Suppose the IP address of your new server is 64.27.90.230 and the domain name you want to
test is example.com, you'd make a
two line entry like this:
64.27.90.230 example.com
64.27.90.230 www.example.com
Save the file with these new entries and close all open browsers. You can now go to either http://www.example.com or http://example.com to test your new server.
Note:
When you are finished testing your new server please don't forget to reopen the HOSTS file to
remove the lines you added above.