Sales - 0203 005 9181 Support - 0203 005 9180

Editing your Hosts file on MAC

A useful method for viewing a website before it is live on a server is to add an entry to your Host file on your Mac. This file bypasses the DNS so you can view the site whilst it’s still in development. 

The most straightforward way of doing this is by an editor called iHosts which you can download here from the Mac App Store.


Once you have iHosts installed 

Open Terminal from Applications>Utilities>Terminal.




Open the hosts file in Terminal by entering:

$ sudo nano /private/etc/hosts

(you may need to remove the ‘$’ if terminal reports “-bash: $: command not found”).


Enter your Mac password if you have one. 


Use the arrow keys to navigate to the bottom of the list, and enter the IP Address of your server, hit the tab button, then input the url of your website. 

When finished, hit Control+O followed by ENTER/RETURN to save changes

Now you can test your sites as if they were live. You may need to clear your browser cache and then browse to the domain.Note: To go back to using the public DNS you need to revert the changes made to your local host file. To do this, do the exact same steps above, but remove the new entries you made, then save as detailed in step 5. You may need to clear your browser cache once again not ensure everything is fresh.NB: If you entered in your host file, you’ll need to browse to would still show the current live site unless you also place this in the hosts file.

Nimbus Hosting
1 Centrus, Mead Lane Hertford Hertfordshire SG13 7GX GB 0203 005 9181 [email protected]