A hosts file is a file that maps domain names to IP addresses. This article explains how to edit the hosts file on a Mac.
Follow the steps below to edit the hosts file on Mac:
sudo nano /private/etc/hosts
sudo nano /etc/hosts -- (on newer MacOS)
Enter the password to edit the host file. (Note: The cursor will not move when the password is typed)
Move the cursor to the bottom of the file and enter the server IP and domain name
SERVER_IP_ADDRESS domain.com/ SERVER_IP_ADDRESS www.domain.com : example (184.108.40.206 mydomain.com/ 220.127.116.11 www.mydomain.com:
Subscribe to receive weekly cutting edge tips, strategies, and news you need to grow your web business.
No charge. Unsubscribe anytime.
Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.