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:
Choose a domain name for your website.
Purchase the rights to use that domain name from a registrar.
Choose a hosting company to host your website.
Build your website.
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.
Press the Windows key on your keyboard, type Notepad, but do NOT press Enter.
Right-click on Notepad and choose Run as Administrator.
Log in (or have someone with admin credentials log in).
Click File > Open.
Navigate to C:\Windows\System32\drivers\etc.
In the lower right corner of the Open dialog box, change the Text Documents (*.txt) to All Files.
Double click on hosts.
Modify the Host's File on a Windows 7 or XP Machine
Click on Start > Run > c:\.
Navigate to c:\Windows\System32\drivers\etc and double click on hosts.
Open it with Notepad.
Add the IP address of the server that is hosting your website.
Press Tab and add the domain name of your website.
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.
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.
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
Open the Terminal app.
Type sudo nano /private/etc/hosts. for Mac, sudo nano /etc/hosts for Linux.
Enter the IP address and domain name on a new line at the end of the file, as shown above.