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

  1. Using Windows Explorer browse to C:\Windows\System32\drivers\etc.
  2. 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.
  3. Add the lines presented above to your file. Please be sure to edit them to match your community’s URL.
  4. Save the file.
  5. Open a Command Prompt (cmd.exe)
  6. Type ipconfig /flushdns and hit enter to clear your cache.

Mac

  1. Launch the Terminal program.
  2. At the command line type sudo pico /etc/hosts and hit enter.
  3. You will be prompted to enter your computer’s password.
  4. The file is now open and ready to edit.
  5. Add the lines presented above to your file. Please be sure to edit them to match your community’s URL.
  6. Hit control + x together to Save and Exit.
  7. Type dscacheutil -flushcache and hit enter to clear your cache.
  8. Quit Terminal.

Linux

  1. Hit Alt + F2 to open the Run Application window.
  2. Type gksudo gedit /etc/hosts and hit Run.
  3. You will be prompted to enter your computer’s password.
  4. You will be prompted to enter your system’s password.
  5. Add the lines presented above to your file. Please be sure to edit them to match your community’s URL.
  6. Save and Exit.