

However, you cannot open the file directly as it resides in a protected area of the file system. The first is by using TextEdit since the hosts file is a plain text document. There are two main ways to edit the hosts file on Mac OS X. How to Edit Your Mac’s Hosts File With Text Edit Let’s take a quick look at how to edit the Mac hosts file in macOS. or block access to a site entirely by pointing to an internal or unused IP address. While the modern Internet uses a variety of public and private DNS servers to assign IP addresses, the hosts file is a handy way to override those DNS servers, allowing you to manually point a website’s address to the desired IP address. Your Mac’s hosts file is a small but important text document that has the ability to map hostnames to specific IP addresses. How to Edit Your Mac’s Hosts File in Terminal with Nano.How to Edit Your Mac’s Hosts File With Text Edit.
