[OnCloud] Modifying your HOSTS file

This Article is Recommended for Technical Users Only. 

To view your site while your domain is being setup or transferred, you will need to make an entry into your local HOSTS file to resolve your server address.

 

Modifying Your Hosts File on Windows

Your HOSTS file can usually be found in the following location on a Microsoft Windows operating system:

C:\WINDOWS\system32\drivers\etc\

This may vary based on the operating system. If you can't find it, do a search for "HOSTS".

  1. Once you have the file open, you will see an entry like this:

127.0.0.1     localhost

  1. You will need to add this second line:

168.144.#.#     yourDomain.com

Once you've completed this step and re-saved the HOSTS file you will be able to view your site, but only on the computer where you have made this modification. We recommend that you remove this entry once your domain name has been transferred and subsequently use your domain name for access.

Please Note: Windows Vista users may need to right-click on their text editor shortcut and choose "Run as Administrator" before editing the HOSTS file.

 

Modifying Your Hosts File on a Mac

Since modifying the Host file differs between the OS versions, below is the terminal instructions for modifying the hosts file.

  1. Open your Finder and go into Applications -> Utilities and then double click on Terminal.
  2. From the terminal window, type sudo vi /etc/hosts and press Enter.
  3. You will be prompted for your system root password, type it here and press Enter. (Note: You will not see any character markers for your password, but it is being entered.)
  4. The file will then appear within the Terminal and you can press the A key to begin editing mode. (It will indicate Insert at the bottom of the Terminal.)
  5. Move your cursor to the very end of the file and create a new line. You will add the below to the end of the file:

168.144.#.#     yourDomain.com

  1. After typing that in, hit the Esc key on your keyboard. This will remove the Insert notification at the bottom of the Terminal.
  2. Hold the Shift key and hit the semi-colon key (;).
  3. Type wq and press Enter.
  4. Close the terminal and restart your Mac.

 

Was this article helpful?
0 out of 0 found this helpful