/etc/hosts entries blocking annoying game site (slither.io) in Chrome & Firefox, but not Safari

dnsgameshostssafari

My lower school-aged son is now home schooling due to the SF Bay Area's COVID-19 school closures. He uses a 2018 MacBook Air with Catalina to complete assignments in web-based learning tools, and I have him set up as a non-admin user.

The biggest problem we face is that every time we look away for a few minutes (we have two kids and two jobs), we'll find he's navigated Safari to one of various addictive HTML5 games he just can't resist right now.

I've edited the /etc/hosts file to effectively block the most tempting sites, and have been successful with one exception: http://slither.io . I've used the following lines:

127.0.0.1 slither.io
127.0.0.1 www.slither.io

This successfully blocks the site in Chrome & Firefox but not Safari. I've tried:

  • Clearing Safari history
  • Emptying caches in Safari Develop menu
  • Clearing DNS caches with Catalina-specific command
  • Logging my son's Mac user out and back in
  • Computer reset
  • Full computer shutdown and restart
  • Full Catalina operating system fresh reinstall, with re-application of the /etc/hosts changes
  • Using parental controls in Screen Time > Content & Privacy > Limit Adult Websites (adding slither URLs to blacklist there)

None of this has prevented slither.io from working in Safari, and Safari cannot be uninstalled. My temporary fix is to disable Javascript and Cookies on Safari and hide Safari from the dock so that Chrome seems like his only option, but this kid is smart and I feel these countermeasures will be overcome within a day or so.

Can anyone repro this issue, or offer any guidance on next steps?

Best Answer

It's a simple solution. You don't need to mess with /etc/hosts file. Just use openDNS, sign-up, sign-in then goto the "Web Content Filtering" on the settings and tick the "Games" box.

Don't forget to change the DNS server on your computer to openDNS:

1) Unencrypted DNS: 208.67.222.222 and 208.67.220.220

2) Encrypted DNS: https://doh.opendns.com/dns-query

Check whether you have setup the DNS correctly through:

https://welcome.opendns.com

Good luck!