How to edit your Hosts file using MacOS X

How to edit your Hosts file using MacOS X

How to edit your Hosts file using MacOS X

1. Open Terminal, which is in Applications, then the Utilities folder. To do this go to the Finder (Desktop) and from the main bar at the top of the screen choose “Go” and then “Utilities”. Find the Terminal application icon and double click.

2. It is advisable to make a backup copy of your current hosts file:

sudo cp /private/etc/hosts /private/etc/hosts-orig

3. You will be prompted to enter your user password. Then type the following command to edit your hosts file:

sudo nano /private/etc/hosts

Enter your user password at the prompt if asked.

4. You will see a file with the following contents (or similar) to the following:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

5. Then enter in your IP Address of your server and your domain name
192.168.1.1     yourdomainname.co.nz

6. Save your file by using Control and "O" and press enter.

Your file should now look like

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
192.168.1.1     yourdomainname.co.nz

IF YOU NEED TO SET YOUR HOSTS FILE TO USE OUR SERVER IP ADDRESS PLEASE CONTACT OUR SUPPORT TEAM TO CONFIRM THE IP ADDRESS OF THE SERVER YOUR WEBSITE IS ON.


    Phone: +64 9 930 9390
    Mobile: +64 27 577 7764 (Sean Davis)

    Please do not send support requests by text