Knowledgebase
How to edit your Host file so you can post content immediately after purchasing a new domain name?
Posted by Phil (Netcetera) on 08 April 2011 07:22 PM

Editing Your Host File

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. The most common reason for this is to allow people to view or publish web content immediately after purchasing a new domain name or transferring an existing domain name.

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 work around 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.

Step–by–step Procedure

Windows operating systems contain a file called ‘hosts’ that will force resolution of your domain name.
  1. Open the hosts file
    1. Go to the Start menu and choose Run. Type the following in the Run dialog box: Edit Host File
      1. For Windows NT and Windows 2000
        1. C:\winnt\system32\drivers\etc
      2. Windows XP, Windows Vista or Windows 7
        1. C:\Windows\System32\drivers\etc
    2. Click the OK button (This should open a window with several files in it.)
    3. Find the file called ‘hosts’ and double–click it. If prompted, specify that you would like to choose a program to open the file with from a list of programs.
      1. Choose ‘Notepad’ from the list of available programs.
  2. Edit and save the hosts file
    1. The contents of your hosts file should look something like this
    2. Start typing on a new line at the bottom of the file.
      1. To do so, place your cursor at the very end of the last line and hit ‘Enter’ to start a new line.
    3. Type these two lines of text like this example:
      (use your server IP address and your site domain in–place of the defaults below)
      1. 123.123.123.123    yourdomainname.com
      2. 123.123.123.123    www.yourdomainname.com
    4. Your hosts file should look something like this when you are done
    5. Close the hosts file and save it when prompted.
    6. PLEASE NOTE: 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 to undo this change to your hosts file so that you can check to see that your domain name is now resolving without assistance over the internet.
  3. Undo the Hosts file change (after you have confirmed that it is resolving properly)
    1. Open the hosts file as described above.
    2. Delete the information that you added previously and close the file.
    3. Choose to save the changes to the hosts file when asked.
(1 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).