Just a moment...

Modify Hosts File – Mac OS X & Windows

When you move a website to a new server, the final switch-over happens after you change DNS (Domain Name System) records to point to the new server.  The DNS server tells the world that (for example) www.yoursite.com is now at the IP address 11.12.13.14 (your new JetRails® server) instead of 10.11.12.13, the old server.

Of course, before making the switch public, you’ll want to test the new server yourself.  You do this by editing your Hosts File, which makes the same switch, but only for your computer.  Your web browser will go to the new server when you type in www.yoursite.com until you change it back.

The instructions below walk you through making this change.  After you’re done testing your new server, you’ll want to reverse the changes to the host file. Follow the same steps, but remove the entries you previously created.

Windows 8/10:

(Instructions for Windows 7 and OSX)

 1. Note  your JetRails server’s IP address, provided by your eBoundHost account manager.

 

make a note

 

2.  Open Notepad as administrator.  

  1. Hit the Windows key
  2. Type “Notepad” in the search field
  3. Right click Notepad and select Run as administrator
  4. If prompted, click ‘Yes’ on the UAC dialog

step 1 win10

 

3. Open the Hosts file.

  1. Go to file > open
  2. Navigate to c:\windows\system32\drivers\etc
  3. If it is not visible, select “all files” instead of “text documents” in the file type drop-down menu
  4. Select and open Hosts


Editing your host file with notepad

 

4. Add the new entries

  1.  At the bottom of the document, add two new lines, following this format:
    11.12.13.14 www.yoursite.com
    11.12.13.14 yoursite.com
    Your new JetRails IP address goes first, then your domain with a leading www.
    The second line is your domain name without the www.
  2. Use a [TAB] between the IP and domain


Screenshot of notepad in Windows 10 editing Hosts file

5. Save changes

  1. Go to file > save

 

Windows 7:

 

 1. Note  your JetRails server’s IP address, provided by your eBoundHost account manager.

2. Open Notepad as administrator.  

  1. Go to Start > All Programs > Accessories
  2. Right click Notepad and select Run as administrator
  3. If prompted, click ‘Yes’ on the UAC dialog

Notepad

3. Open the Hosts file.

  1. Go to file > open
  2. Navigate to c:\windows\system32\drivers\etc
  3. If it is not visible, select “all files” instead of “text documents” in the file type drop-down menu
  4. Select and open Hosts

Screen Shot 2016-02-25 at 10.32.12 AM

4. Add the new entries

  1.  At the bottom of the document, add two new lines, following this format:
    11.12.13.14 www.yoursite.com
    11.12.13.14 yoursite.com
    Your new JetRails IP address goes first, then the domain with a leading www.
    The second line is the domain name without the www.
  2. Use a [TAB] between the IP and domain

Screen Shot 2016-02-25 at 10.32.38 AM

5. Save changes

  1. Go to file > save

 

Mac OSX 10.6+:

 

1. Open Terminal

  1. Go to Applications > Utilities > Terminal

Screen Shot 2016-02-24 at 5.13.11 PM

2. Open the Hosts file

  1. Type sudo nano /private/etc/hosts
  2. Enter your username and password when prompted

3. Edit the Hosts file

  1. At the bottom of the document, add two new lines, following this format:
    11.12.13.14 yoursite.com   www.yoursite.com
  2. Save the file by hitting Control + X and answering Y.

4. Flush DNS cache to put the changes into effect

  1. In the terminal, type dscacheutil -flushcache

That’s it!  You’re ready to start testing your new server.




Read This Next:




Just a moment...
Just a moment...