In this feature, you will learn how to block websites on Mac using Terminal. Most web browsers provide plugins to help you stay productive and not open the websites on which you are wasting time, but you can go a step further by simply blocking your computer from accessing specific websites together.
Meanwhile, there are many ways to block websites on Mac like using Mac’s built-in feature Parental Control, third-party apps for blocking websites and apps and also by editing hosts files on your Mac. But using Terminal to block websites on Mac is by far the easiest way. However, blocking sites with Parental Control is also a good option to use.
The reality is that Parental Controls are a bit complicated. It takes a while to get all the settings right. And every time you catch your kids coming up with a new solution, you have to devise a way to fix that, too. And what if you share the same computer with your children? Then you need to log out and log in every time you pass the laptop to each other.
So here, we’ll show the best way to block websites on Mac using Termina.
How to Block Websites On Mac using Terminal
You can also set up a website block list if you are comfortable using Terminal on your Mac for different commands. Just follow these steps.
Step 1. Click the Search (finder) icon on the top right-hand corner to open Spotlight Search.
Step 2. Type Terminal in the Spotlight search and then Click Terminal to open.
Step 3. Here in the terminal window, simply type the command sudo nano /etc/hosts then press enter.
Step 4. Here, you’ll be asked to enter your Mac Administrator password. Enter your Mac password then press enter. if you haven’t set a password then you won’t get the password dialog box.
Step 5. Now, bring the cursor all the way down using the arrow key. Now type 127.0.0.1 followed by a space and then add any website/websites that you want to block on your Mac. For instance, 127.0.0.1 www.twitter.com or twitter.com to add more websites to block on mac.
Note: Make sure that you type the website URL in different ways like www.twitter.com, twitter.com or https://www.twitter.com.
Start a new line type 127.0.0.1 followed by a space and then followed the website/websites. Adding 127.0.0.1 is mandatory after that add any website.
Step 6. After adding websites/website to your blocking list simply press Ctrl+X then press Y and enter to finish.
How to Unblock Websites on Mac using Terminal
So by now, you have learned how to block websites on Mac with Terminal. There’s a time where you want to unblock all the blocked websites on your Mac.
Step 1. Click the Search (finder) icon on the top right-hand corner to open Spotlight Search.
Step 2. Type Terminal in the Spotlight search and then Click Terminal to open.
Step 3. Here in the terminal window, simply type the command sudo pico /etc/hosts then press enter.
Step 4. Here, you’ll be asked to enter your Mac Administrator password. Enter your Mac password then press enter. if you haven’t set a password then you won’t get the password dialog box.
Step 5. Look for the websites you want to unblock. Remove them from the list then press Ctrl+X on the keyboard and then press Y to finish the process and then press enter.
Related Posts:
Related Searches:
- how to unblock websites on mac terminal
- how to block websites on a mac administrator account
- how to block websites on safari mac
- how to block site mac terminal
- block websites on safari terminal
Conclusion
This was all about how to block websites on Mac using Terminal. We hope that by using Terminal, you can block all unnecessary and inappropriate websites for the safety of your children and doing so this is the easiest way for blocking websites on your Mac.