Editing your Windows Hosts file

By DigitalPulseHosting.com
2005-08-02 20:41:50
The Microsoft Windows Hosts file contains mappings of IP addresses to host names. For various reasons it may be necessary to update the Hosts file on your computer to properly resolve a web site by its domain name.

Editing Your Windows Host File

Overview

For various reasons it may be necessary to update the Hosts file on your computer to correctly resolve a web site by its domain name. The most common reason for this is to allow you to view or publish web content immediately after purchasing a new domain name or transferring an existing domain name to our service.

New and transferred domain names have a delay period that can be anywhere from a few hours to a few days. During this period of time the new or transferred domain information propagates around the internet, and is generally unavailable.

If you need to update your site immediately and cannot wait for the propagation of domain information around the internet, you can edit a file on your computer as a temporary work around.

Please note: this technique is only valid on the computer on which the change was made. It will NOT make the web site available to anyone on the internet.

Procedure

1. Open the Hosts file that resides at %systemroot%\System32\Drivers\Etc\hosts

Go to Start->Run and type in:

notepad %systemroot%\System32\Drivers\Etc\hosts

Click the Ok button.

The Notepad text editor should open up displaying a file similar to this:




2.  Add entries for your host name to the end of the file.  You should end up with something similar to this:



Replace the 123.123.123.123 occurences with the correct IP address of your hosting server.  This information would have been provided to you in your Welcome Email.  Replace yourdomain.com with the real domain name of your site.

3.  Save the hosts file.  At this point you should be able to view and publish to your web site using your domain name.


After 3-4 days, you will want check to see that your domain name is now resolving throughout the internet via DNS servers without assistance from your Windows Hosts file.

To undo the Hosts file change - Open the Hosts file as described above.  Delete the information that you added before and close the file.  Choose to save the changes to the file when asked.


Page: 1
return to top