Skip to main content
All CollectionsJelasticBackups
How to modify your host's file to work on a site that is not yet live
How to modify your host's file to work on a site that is not yet live
Updated over a week ago

Modify your host's file so you can work on a site that is not yet liveThe usual steps to build a website are as shown below:

  1. Choose a domain name for your website.

  2. Purchase the rights to use that domain name from a registrar.

  3. Choose a hosting company to host your website.

  4. Build your website.

  5. Contact your registrar to direct the DNS servers to point web requests for content on your site to the server that's hosting it.

Scaleforce as a hosting company supplies a temporary alias that is added to your domain name so you can work on your site before making it live. If you don't have a temporary alias or don't want to use it, but do need to access your website before contacting your registrar, you can modify the host's file of your local machine.
​
The host's file is a file that all browsers look at when getting a new website request prior to going to their DNS server. When you enter a website in your browser, your PC first looks at the host's file for information and if it doesn't find the website there, it asks the ISP's DNS server to locate the IP address of the site.

Modify the Host's File on a Windows 8 PC

Windows 8 by default, protects the host's file from modification by malicious programs. To modify it, run Notepad as an administrator.

  1. Press the Windows key on your keyboard, type Notepad, but do NOT press Enter.

  2. Right-click on Notepad and choose Run as Administrator.
    ​

    1-Runasadministrator.png
  3. Log in (or have someone with admin credentials log in).

  4. Click File > Open.

  5. Navigate to C:\Windows\System32\drivers\etc.

  6. In the lower right corner of the Open dialog box, change the Text Documents (*.txt) to All Files.
    ​

    2-AllFilesHosts.png
  7. Double click on hosts.

Modify the Host's File on a Windows 7 or XP Machine

  1. Click on Start > Run > c:\.

  2. Navigate to c:\Windows\System32\drivers\etc and double click on hosts.

  3. Open it with Notepad.
    ​

    3-HostsFile.png
  4. Add the IP address of the server that is hosting your website.

  5. Press Tab and add the domain name of your website.

  6. Save the hosts file.

    • If you are unable to save it due to security policies on your computer, save it with a different name, like hosts2. Close Notepad. Delete the original hosts file and rename hosts2 to hosts.

  7. You should be able to access your website (without a temporary alias) from your local machine by entering the domain name in the address bar of your browser.

  8. Repeat the above process on any other machines you will be using when creating content for the site prior to making it live.

Modify the Host's File on a Mac or Linux

  1. Open the Terminal app.

  2. Type sudo nano /private/etc/hosts. for Mac, sudo nano /etc/hosts for Linux.

  3. Enter the IP address and domain name on a new line at the end of the file, as shown above.

  4. Save.

Did this answer your question?