1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How do I block domains using the hosts file on Windows?

Discussion in 'Main Forum' started by Chloe, Sep 12, 2018.

  1. Chloe

    Chloe Guest

    I used to block domains on Windows using the hosts file like the following:

    127.0.0.1 www.cnn.com


    However, now it is not working and the domains are resolving.

    $ nslookup www.cnn.com
    Non-authoritative answer:
    Server: cdns01.comcast.net
    Address: 2001:558:feed::1

    Name: turner-tls.map.fastly.net
    Addresses: 2a04:4e42:1c::323
    151.101.117.67
    Aliases: www.cnn.com

    >ping www.cnn.com

    Pinging turner-tls.map.fastly.net [2a04:4e42:1c::323] with 32 bytes of data:
    Reply from 2a04:4e42:1c::323: time=16ms


    I don't know what changed. How can I continue to block domains using the hosts file on Windows? Why did Windows suddenly stop using the hosts file?

    >icacls \Windows\system32\drivers\etc\hosts
    \Windows\system32\drivers\etc\hosts NT AUTHORITY\SYSTEM:(I)(F)
    BUILTIN\Administrators:(I)(F)
    BUILTIN\Users:(I)(RX)
    APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:(I)(RX)

    Successfully processed 1 files; Failed processing 0 files

    C:\Users\Chloe>ipconfig /flushdns

    Windows IP Configuration

    Successfully flushed the DNS Resolver Cache.

    C:\Users\Chloe>nslookup www.cnn.com
    Server: cdns01.comcast.net
    Address: 2001:558:feed::1

    Non-authoritative answer:
    Name: turner-tls.map.fastly.net
    Addresses: 2a04:4e42:1c::323
    151.101.117.67
    Aliases: www.cnn.com


    Windows 8.1

    Login To add answer/comment
     

Share This Page