blocking website via hosts file not working?

31,342

Solution 1

link textI could not access the link (blocked in office) but i think this may help you edit your host file "“WWW” has become the universal standard for the default host. It is just as common to define a site with no host as well. This means that as far as DNS goes www.yahoo.com & yahoo.com are two totally different sites, even though they resolve to the same place. Because of this to effectively block the site, you must also block all hosts. This would usually mean:

127.0.0.1 facebook.com

127.0.0.1 www.facebook.com"

check the link for more details.

Also i you trying to block multiple sites, its better to have a proper software like proxy server or firewalls which can block access to particular sites.

Solution 2

I think Kavitesh Singh made the most important point: Blocking the domain with and without www. this is the most common reason for an entry not working.

Also, not all browsers immediately react to changes in the hosts file. Have you tried re-starting your browser and / or system?

Share:
31,342
Parastar
Author by

Parastar

Updated on May 12, 2020

Comments

  • Parastar
    Parastar about 4 years

    I'm trying to block a website using the hosts file using this tutorial : http://hackspc.com/how-to-block-a-website/

    but It doesn't work, the website I'v blocked In this case facebook still shows up, please can anyone help me out here?

  • AlainD
    AlainD almost 4 years
    You should edit %windir%\system32\drivers\etc\hosts in a text editor running with Administrator access rights. As @Pekka points out, block the site with both timewaster.com and www.timewaster.com. Tou may need to restart the browser, but you shouldn't need to restart the whole system (though this is probably simplest).