TechJunkie is a BOX20 Media Company

Home Mobile Android How To Block A Website On A Mac

How To Block A Website On A Mac

How To Block A Website On A Mac

The previous post was about how to block a website and was specific to blocking websites on Windows. But here we’ll explain how to block a website on a Mac, the process is something similar to blocking a website on Windows but with a few commands in Terminal, you can block a website on a Mac for sites on Chrome, Safari or Firefox. You can block website access to Facebook, YouTube or Twitter that can restrict access all together. This method doesn’t require you to download any software or install anything that you don’t want to have on your computer. The guide below is free and easy to complete to block a website on your computer and is great for blocking websites for all ages on content that you don’t want to access online.

With this method you can block websites on Mac and block a website when using the Internet by making a few additions in Terminal. You can also check out the Apple Support Page for more help and guides that great reads.

 

How to block a website on a Mac:

  1. Launch “Terminal” by going in /Applications/Utilities.terminal
  2. When prompted, in the command line, type in "sudo nano /etc/hosts".
  3. It will then ask for your admin password, type your admin password.
  4. Next you’ll see in the screen the host database for your computer.
  5. Use the down arrow to go to the bottom and below under where it states, "127.0.0.1 localhost".
  6. Type in "127.0.0.1 facebook.com".
  7. On the next line type "127.0.0.1 www.facebook.com"; just to be safe it’s working correctly.etc-hosts-add-url
  8. Next, hold down Control + “O”, which will save the changes to the host database.
  9. Press the “Return” key and then followed by Control + “X” to exit the current screen on your Mac.
  10. You can remove the past cache on your Mac by typing in "sudo dscacheutil -flushcache" in the command line, this refreshes the existing cache on the host database.
  11. Test to make sure it works by going to Facebook.com, when you go to the site a message saying, “Unable to connect” error message will show up and blocking you from going to the Facebook site.facebook-blocked-site

I5 vs i7 Mac Apple Laptop

Read Next 
David Williams

Nov 4, 2014

I am a true junkie for everything tech. My current arsenal includes an Apple TV, Amazon Fire TV Stick, iPhone Xs, Samsung Galaxy S9, Samsung Chromebook, iMac, and Dell XPS 13.

3076 Articles Published

More