1) Open a Finder window.
2) Select Applications from the sidebar.
3) Double-click on Utilities.
4) Double-click Terminal.
5) In the Terminal window, you will need to enter a command to open the Nano text editor. You will need your administrator password, as well.
6) type
sudo nano /etc/hosts and then hit return.
7) Enter YOUR administrator password and then hit return.
You're now in the Nano text editor. You should see something that looks like this:
If you want to add a new device or domain, move the cursor using the arrow keys and position it after the text in the window. Then, begin typing.
8) If you're mapping a particular IP address on your local network to a domain, you can type the IP address, hit tab, then type the domain name.
(just paste this in for here):
54.209.36.119 ar-15.co
54.209.36.119
www.ar-15.co
3.138.255.236 ar15-backup.com
3.138.255.236 ar15.com
3.138.255.236
www.ar15.com
9) Once you're done, hold down the
control and O keys to save the file, then
control and X to exit.
FINALLY:
Back at the Terminal command line, type
sudo killall -HUP mDNSResponder then hit return key. That will flush your Mac's DNS cache, so it doesn't get confused by any changes you've made to the Hosts file.