Blocking a website from a computer

Internet is a very useful and powerful tool. Nowadays children learn how to use technology at a very early age, and it is necessary for adults to control what websites minors access and limit access to others or even restrict it for their own security.
3 answers

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 localhost configuration, add: “ www.websiteYouWantToBlock.xx”.
Additional websites can be added on a next line
3. Save changes
This process blocks the desired webpages from any browser.


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. :)

Volodymyr Lipenko - Thu, 11/23/2017 - 10:21 :::

I would do that on the router so that the children cannot access the blocked site from other devices.

Masood Lodin - Fri, 12/01/2017 - 00:04 :::

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.

Christoph Berger - Sat, 12/09/2017 - 18:43 :::

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
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.