Browse Ask a Question
 
Tools
Rss Categories

Previewing your web site by editing your hosts file

Reference Number: AA-00179 Views: 87 Created: 2010-07-30 16:38 Last Updated: 2010-08-04 11:11 0 Rating/ 1 Voters

Issue

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 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 preview your site immediately and cannot use the Plesk Site Preview feature then you can edit a file on your computer as a temporary work around.

Solution

Windows & Mac contain a file called 'hosts' that will force resolution of your domain name. Edit this file using the following procedure.

Click here for instructions for Windows or Mac instructions.

Windows 

1. Locate the hosts file on your computer

Use Windows explorer to navigate to the following directory:

Windows 95/98/Me c:\windows\hosts

Windows NT/2000 c:\winnt\system32\drivers\etc\hosts

Windows XP Home/Pro c:\windows\system32\drivers\etc\hosts

2. Open the hosts file for editing

Open your hosts file in Notepad. It should look something like this when you open it:



We will start typing on a new line at the bottom of the file. To do so, click your mouse so that the cursor is at the very end of the last line and hit <Enter> to start a new line.

Enter the following two lines of text like this example:

123.123.123.123 yourdomainname.com

123.123.123.123 www.yourdomainname.com

Important Note

You must replace the 123.123.123.123 number with the IP Address of the web server detailed in your Net24 setup email. Replace 'yourdomainname.com' and 'www.yourdomain.com' with the domain name of your web site.

Your Hosts file should looks something like this when you are done.


Close the Hosts file and save it when asked. If your browser is currently open, close it so that the changes take effect. It is not necessary to restart your computer.

Mac OS X 10.2 or later

To find the hosts file in OS X's graphical interface:

  1. Open Finder.
  2. In the Go menu, select "Go to Folder"
  3. Type /etc for the folder name.
  4. In the list of files that appears, you should find hosts. Double click it to open it in a text editor.
  5. As in the earlier examples, the format of the file is: 123.123.123.123 www.yourdomainname.com.

You should now be able to view and publish to your web site using your domain name.


Info Ask a Question