Editing Your Hosts File

Edit Host File on a Mac

Step 1 – Open the Terminal.app

Open the Terminal app by going into Applications -> Utilities -> Terminal (You can also use Spotlight to open Terminal, buy holding down the command key, then hitting the space bar and typing "Terminal".)

Step 2 – Open the hosts file
Open the hosts by typing this into the Terminal that you have just opened:
sudo nano /private/etc/hosts
Press enter, then type in your Mac user password when promted

Step 3 – Edit the hosts file

Navigate to the bottom of the file using your arrow keys. Then add to the bottom of the file the IP addresses and website addresses (We will provide the actual IP address and domain name for you to use) that need to be added to the host file:

199.16.170.100    www.inetz.com
199.16.170.100    inetz.com

Step 4 – Save the hosts file

When done editing the hosts file, hold down control and press o to save the file. Press enter on the filename prompt, and then hold down control and press x to exit the editor.

Step 5 – Flush the DNS cache

Type this into in Terminal:
dscacheutil -flushcache
Then press enter

Step 6 – Test
Go the website you just added to the host file and verify that you can see the website.

To change back to the previous setting follow the above steps but on step 3 add a pound symbol (#) in front of the lines you added to the host file.  Then on Step 6, you should the original website.

Contact Us

Let us know about your next project!
Or just drop us a line.

    Inetz logo
    Inetz Media Group

    1055 East 3900 South
    Salt Lake City, UT 84124

    1611 East 2450 South
    bldg #3
    St. George, UT 84790

    (801) 415-2500   |   Get Directions

    1.888.INETZ.COM | © Copyright 2025 Inetz Media Group. All Rights Reserved
    Skip to content