Hosts File
Overview
The standard procedure ONEsite uses when building out community sites is to utilize hosts file changes to access our production environment sites while they are under construction. This serves two purposes:
- The site can be built privately, without the chance of it being seen by the public before the client is ready.
- The site can be built at the same URL where an existing site lives, and switched out when it’s time for the new community to go live.
Hosts Entry
The general host entry to view a site is as follows:
209.217.19.90 DOMAIN_NAME.com www.DOMAIN_NAME.com 209.217.19.73 widgets.DOMAIN_NAME.com www.widgets.DOMAIN_NAME.com Where DOMAIN_NAME = the name of your community.
Please note: Certain projects are assigned different IP information. If your project manager has given you other IPs, those are specifically for your community only and should be used in place of the above.
Examples
209.217.19.90 onesite.com www.onesite.com 209.217.19.73 widgets.onesite.com www.widgets.onesite.com 209.217.19.90 community.onesite.com www.community.onesite.com 209.217.19.73 widgets.community.onesite.com www.widgets.community.onesite.com
Windows
- Using Windows Explorer browse to C:\Windows\System32\drivers\etc.
- Double-click on hosts to open the file. When prompted for the program to open the file with select Notepad or your prefered text-based editor.
- Add the lines presented above to your file. Please be sure to edit them to match your community’s URL.
- Save the file.
- Open a Command Prompt (cmd.exe)
- Type ipconfig /flushdns and hit enter to clear your cache.
Mac
- Launch the Terminal program.
- At the command line type sudo pico /etc/hosts and hit enter.
- You will be prompted to enter your computer’s password.
- The file is now open and ready to edit.
- Add the lines presented above to your file. Please be sure to edit them to match your community’s URL.
- Hit control + x together to Save and Exit.
- Type dscacheutil -flushcache and hit enter to clear your cache.
- Quit Terminal.
Linux
- Hit Alt + F2 to open the Run Application window.
- Type gksudo gedit /etc/hosts and hit Run.
- You will be prompted to enter your computer’s password.
- You will be prompted to enter your system’s password.
- Add the lines presented above to your file. Please be sure to edit them to match your community’s URL.
- Save and Exit.