1

I'm just trying to create a basic program that allows users to input websites to be blocked but editing the host file does not work at all. I tried using all the links from here for sites like reddit/youtube.

When I ping the site after adding it to the host file, it does seem like it worked as my pc seems like it isn't able to reach the site. However no matter how many times I flush my DNS or clear my browser's cache as long as I'm not using incognito nothing gets blocked.

Are there any other methods to block websites locally?

2
  • Is this a website, a server or a desktop ? Commented Aug 26, 2022 at 5:03
  • I'm using my own desktop pc @RohitGupta Commented Aug 26, 2022 at 5:05

1 Answer 1

1

There are a number of ways to block websites.

  1. Use a Virus Scanner such as MalwareBytes. It allows you to block not just URLs but also files. These will be local to your pc.

  2. Use a pihole using a raspberry pi. It is intended to block sites posting ads. But I use it to block specific websites as well. I have it on the network, so that it works for all users on the network.

  3. A service like OpenDNS which will block urls being accessed from ipaddress. The free version will let you have categories for blocking and a limited number of URLs. For more, you have to pay.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .