- Launch Terminal, type sudo nano /private/etc/hosts and press Return. You’ll need to also enter your admin password to execute it, as with all sudo commands.
- You will now have the hosts file open in the Nano editor. Use the arrow keys on your keyboard, to navigate and edit the file.
- Add the desired IP followed by the host name (or domain name).
- Press Control-O to save the file.
- Use your Web browser to test the changes and flush the cache with dscacheutil -flushcache if they still haven’t taken into effect.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article