The following solution is for Windows computers.
1. Access your Local Disk (C:) – also called Windows (C:). Look for the host file in the etc file in the drivers folder. C:\Windows\System32\drivers\etc
2. Open the host.txt, and at the very end, under the 127.0.0.1 localhost configuration, add: “127.0.0.1 www.websiteYouWantToBlock.xx”.
Additional websites can be added on a next line
3. Save changes
This process blocks the desired webpages from any browser.
Password-based solutions (apps, additional software, etc.) might be more appropriate for that kind of a parental control.
One solution for mac computers would be:
1.Open your terminal
2. Type “sudo nano /etc/hosts” and hit "enter" to open the "hosts" file in another window.
3.Add the website you want blocked after the number 127.0.0.1
4.Press the Control Key + "O"
5. Type in “sudo dscacheutil -flushcache” and press "enter." ( this will reset the cache to put your changes in effect.
Comments
This is a very nice and elegant solution! Just keep in mind that the person, from whom the access to a certain website should be blocked, has no possibility to edit that file too (e.g. if everyone signs-in under the same account on that computer and has same administrator rights). Otherwise that person could 1) use this file as a reference to which websites to try to get access; 2) edit this file for the time he/she wants to access those sites; 3) edit that file back to how it was, i.e. leaving no traces. :)
I would do that on the router so that the children cannot access the blocked site from other devices.
Efficient solution. Guess that blocks the site for all users an the computer though? A per user solution would be better fit to restrict the access.