If you're familiar with editing the host file on Windows, then in this article Mytour will show you how to edit this file, but on a different operating system, Mac OS X. The steps to edit the host file on Mac are not too difficult, if you just want to block Reddit or Facebook or try redirecting some domains on your local server.
Edit Mac's Hosts File in System Preferences
Utilize the Hosts Preference Pane app to edit Mac's Hosts file within System Preferences. Firstly, visit this page and download the latest version of Hosts Preference Pane. Download Hosts Preference Pane as a PKG file here: Download Hosts Preference Pane for Mac
Open the installation file you just downloaded and follow the provided steps.
Once completed, open System Preferences, and you'll see a new Hosts icon located in the last row.
Click on that icon to open a new Hosts preference window.
To edit the Hosts file on Mac in System Preferences, you need to have Admin privileges, so first click on the padlock icon at the bottom left corner. If you have Touch ID, you'll be prompted to scan your fingerprint; if not, you'll need to enter your password.
Note: Only Admin accounts can edit the Hosts file: if you're not an Admin, you can't edit the Hosts file.
Once everything is unlocked, you can add or remove domains using the '+' or '-' icons at the bottom left corner. If you've edited the Hosts file before, you know that the IP address '127.0.0.1' is added to block websites.
The 'use' column allows you to quickly remove any line in the Hosts file. Anything not selected in the Hosts Preference Pane table will not be displayed in the actual Hosts file, allowing you to quickly remove and add back domains you need for certain cases.
When you make any changes here, they will be applied to the Hosts file immediately - you can confirm this by accessing /private/etc/ and opening the Hosts file to check. However, the best way is to open a web browser on your computer and access the domain you redirected.
If you follow the steps correctly, the changes will take effect immediately, although sometimes you may need to restart your browser.
Above is how to edit the Hosts file on Mac in System Preferences that Mytour has just introduced to you. If you have any questions or concerns you'd like Mytour to answer, you can leave your questions in the comment section below the article.
There is currently a list of host files on Facebook in August 2017 to help users easily access Facebook when blocked. You can check the details of host files on Facebook in August 2017 here.
