Block URL on Chrome

burleson
New Contributor

I am working on add URLs on Deny URLs under Parental Controls in the Configuration Profiles. It worked pretty well on Safari, however, our students are still able to access to sites that are placed on Deny URLs on Google Chrome. Students have to use Google Chrome due to Google Classroom. Is there any way can we block sites that are on the list under Deny URLs. I am wondered if Chromium is the best answer?

4 REPLIES 4

ibrahim_senyer
New Contributor III

You can modify /etc/hosts file
That blocks address regardless of the browser.

!/bin/bash

echo "127.0.0.1 www.facebook.com" >> /etc/hosts

or just execute command below
echo "127.0.0.1 www.facebook.com" >> /etc/hosts

gemsworldsg
New Contributor II

Hi,

I have made a script based on the following:

!/bin/sh

sudo nano -e /etc/hosts
127.0.0.1 web.whatsapp.com
127.0.0.1 www.facebook.com
sudo dscacheutil -flushcache
exit 0

However, when i create a policy and upload this .sh file; the page keeps loading. I'm not sure if there is anything wrong in the script. I'm planning to roll out this policy to students' Macbook. Would appreciate if you can help me out.

Thanks.

alexmcclements
Contributor

You could just block the access at the network level and save yourself a lot of hassle (aside from the inevitable complaints from teachers).

pete_c
Contributor II

Without any sort of network-level content filtering, you should deploy a managed profile for Google Chrome, which along with with blacklisting URLs also would give you enforcement over Safe Browsing, default managed bookmarks, white/blacklist specific Extensions.

https://cloud.google.com/docs/chrome-enterprise/policies/?policy=URLBlacklist