0

I know I can block websites in Parental Controls, but accessing that option requires the "Limit Adult Websites" option, which I find to be overly strict.

Is there a way to block specific websites without third-party software?

I'm running High Sierra on my laptop.

1

The only way I can think of to do this (without enabling parental controls or using a 3rd party app) would be to edit the hosts file. See here for more info.

1

Actually you can do this but an intelligent and curious child might find what you have done and bypass your options. That said you could just edit the hosts file:

  1. Open a terminal window and type the following

cd /private/etc/

  1. This puts you into the Unix underpinnings of the macOS system. Once there we will use the "Nano" text editor to modify the hosts file, like this

sudo nano hosts

You will be prompted for a password. Use your account password there. If your system's hosts file has not been previously modified the Terminal window will change to look similar to this

Terminal running the Nano text editor

Now what you will need to do is enter the info on the websites you want to block. Remember that you only need block the root domain. So if he goes to a website like teenchat.co.jp/violentvideogames/killerclowns. You only need the part up to the first shash like this: teenchat.co.jp

  1. In the Terminal window type 127.0.0.1 teenchat.co.jp

127.0.0.1 refers to "localhost" or the computer you are currently on which does not have a web server on it followed by a space and the host name/URL of the web site you want to block

  1. Continue adding entries just like this, 127.0.0.1, a space then the host name/URL of the site you want to block. Each one on a new line.
  2. When you have entered all the sites you want to block hold ControlO and it will prompt for the fie to write out, just hit Return then ControlX to exit.

The words at the bottom indicate those commands and others with the Carat ^ symbol indicating the Control key.

  1. Once Nano has saved your hosts file and exited, reboot your Mac. Those sites should now give you errors when you go to them.

If your child has an admin password he can easily undo this as the password you enter when you type any command starting with "sudo" will be the password of the current user. If that user is not an admin it won't work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .