How do I modify my hosts file?

There are some instances where you would like to set up a hosting package with Basehost, but aren't ready to switch your nameservers and make the new hosting package live.  An example would be that you want to test a new website without interrupting traffic to your current site; see your hosted site before the DNS propagates; test an SSL certificate installation before making changes to your site, and other DNS-related reasons.  

In these cases you can update the hosts file on your computer to point a domain to a different IP address. 

Tables can't be imported directly. Please insert an image of your table which can be found here.

Note:


When modifying your hosts file you update that file to point your domain to a different IP address.  This affects only the machine on which you change your hosts file.  This will have no impact on any other users, or any other devices on your network.

You must run your text editor as administrator to modify your hosts file.

 

Windows

1. Press the Windows key.

2. Type Notepad in the search field.

In the search results, right-click Notepad and select Run as administrator.

3. In Notepad, go to the following location: c:\Windows\System32\Drivers\etc\hosts

4. You may see no files here, in which case change the file type from Text Documents (*.txt) to All Files.

5. Make the necessary changes to the file.

6. Click File > Save to save your changes.

An example of the values you would want to add is:

Tables can't be imported directly. Please insert an image of your table which can be found here.

This can also be expressed on one line, as in:

Tables can't be imported directly. Please insert an image of your table which can be found here.

 

Tables can't be imported directly. Please insert an image of your table which can be found here.

Note:

 

Mac OS X 10.6+

  1. Open Applications > Utilities > Terminal.
  2. Open the hosts file by typing the following line in the terminal window:

    sudo nano /private/etc/hosts
  3. Edit the hosts file.

  4. Save the hosts file by pressing Control+x and answering y.

  5. Make your changes take effect by flushing the DNS cache with the following command:

    dscacheutil -flushcache

Once you have made this change to your hosts file, you can open a browser and type your domain name and you will be directed to the host at that IP address. If you want to temporarily remove that entry from your hosts file, you can simple put a hash symbol at the beginning of the line(s). This comments out the entries and your hosts file will ignore them. 

An example edited hosts file may look like this:

The IP addresses for various hosting packages are not published here, but you can contact the service center at any time to get that information.

Note: If you're setting up a new hosting package and have a current site that you are planning to move to Basehost, consider using our Hosting Migration service.  We take the challenge out of moving your services and provide an easy and seamless experience.  Get more details at move.basehost.com.au!