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?