Block URL on Chrome

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?


New Contributor III

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


echo "" >> /etc/hosts

or just execute command below
echo "" >> /etc/hosts

New Contributor II


I have made a script based on the following:


sudo nano -e /etc/hosts
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.



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

Contributor III

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.