By: -

There are a lot of reasons you might want to block website/s on your Mac. It may be just that you want to stay away from websites that spread the malicious virus or contain explicit content. Or, you may just want to block the addictive websites like YouTube, Facebook, Instagram, etc.

We usually ignore and avoid these websites, but the best way to completely get rid of these websites is to block them on your computer. You can easily block the unwanted sites by creating a “blacklist” for your Mac devices.

Block a website on Mac

In this article, we’ll discuss how to restrict access to a particular website.

How to block a website on Mac?

There are various easy and straightforward ways to restrict these websites on Mac, although the browser is on. We have shortlisted four useful methods:

1. Enable Parental Controls

This feature allows parents to keep a control on their children’s data usage and prevents them from opening any unwanted content online.

  • Go to System Preferences and open Users & Groups

Enable Parental Controls

Advertisement
  • Click on the Lock button (to the bottom left of preference window)
  • Now, enter your username (Admin)
  • Click on the user account (to the left hand) for whom you want to block or unblock websites, then click “Enable Parental Controls.” This cannot be an administrator account

Enable Parental Controls

Note: many of you don’t have a child account, to create one, click on the “create a new account with parental controls” option and follow the instructions.

  • Once you have selected the user, hit on the Enable parental controls checkbox, then click on Open Parental Controls and enter your admin password (if asked)
  • Hit on the Web tab, click on Try to limit access to adult websites

This setting restricts any adult content or websites.

  • Hit on Customize
  • In the Never allow these websites section, click”+” icon to add a website
  • Enter the name of the website(s) you wish to restrict and click OK.

Now, the restricted websites won’t work on any kind of browser and show a restricted error message on your Mac device.

2. Blocking Websites with Hosts File

Terminal 1

 

Advertisement

You can edit Hosts file using Terminal on your Mac device. This is how u do it:

  • Press and hold Command + Space keys
  • Type “Terminal”
  • Now, select the Terminal option
  • You can now see a command line
  • Enter the following commands

Type in “sudo nano /etc/hosts

  • Click on Return
  • Now, enter your admin password
  • Type and enter 127.0.0.1 and the address of the website you want to block followed by a space
  • Hit on the Return option
  • Once again type “127.0.0.1”, followed by the website address and a www. In front of it
  • Click return
  • Click and hold Control + O to save your change
  • Again click on Return.
  • Press and hold Control + X.
  • Type “sudo dscacheutil -flushcache”
  • Click on Return

Now, these mentioned websites won’t open in any browser and displays “unable to connect” error message.

3. Install Browser Extension

Popular browsers like Chrome and Firefox enables you to install add-ons to make your browser flexible for you. You can block and even filter websites from your browser. This application is available on the browser’s extension store. It only blocks websites on that particular browser.

You can also adjust your router setting to block any website you don’t wish to visit on your Mac device.


Related Reading:

Advertisement

Leave a Reply

Your email address will not be published. Required fields are marked *