Windows – Editing hosts file to block sites not working

hosts-filewindows 7

I put these lines in my C:\Windows\System32\drivers\etc\hosts file:

And I still manage to access these websites.

I restarted my computer, cleared the cache, different browsers, nothing works.

I am not using proxies. I use Windows 7/64 bit.

I flashed my DNS: ipconfig /flushdns and when I ping the I get reply from

What else can I do? Maybe there are some programs to modify the hosts and would work with them.

Best Answer

  • To block sites you need to list all the domain-names, for sites like facebook and youtube that's a really big list of names and ip-addresses. I'll copy the code that I used for blocking youtube beneath.

    Subdomain   IP Address   2607:f8b0:4009:803:0:0:0:200e   2607:f8b0:4001:c1d:0:0:0:81   2607:f8b0:4001:c1d:0:0:0:66   2607:f8b0:4009:803:0:0:0:200e   2607:f8b0:4009:803:0:0:0:200f   2607:f8b0:4009:803:0:0:0:200e   2607:f8b0:4001:c1d:0:0:0:66   2607:f8b0:4001:c1d:0:0:0:81   2607:f8b0:4002:811:0:0:0:2004
  • Related Question