Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Hosts file will not block websites, no matter what I do.  (Read 3186 times)

0 Members and 1 Guest are viewing this topic.

VeryFrustrated

    Topic Starter


    Newbie

    • Experience: Familiar
    • OS: Windows 10
    Hosts file will not block websites, no matter what I do.
    « on: September 25, 2020, 09:47:14 PM »
    Hi- I'm sort of your standard internet user, so I'm not super tech savvy but I'm familiar with blocking websites using the hosts file and have done so many times without difficulty. For some reason, it no longer seems to work. I'm trying to take a social media break, and I need to block the websites I usually go to in order to make it easy for myself. Including Facebook, Reddit, etc...

    I got the full GitHub list of domains and IPS for Facebook to block so it's not that I haven't included all the IPs.
    I've tried using both 127.0.0.1 and 0.0.0.0 ... nothing. I've tried changing the formatting. Nothing.

    I'm at my wits end. I'm so frustrated. What can I do?

    Thank you so much in advance.

    VeryFrustrated

      Topic Starter


      Newbie

      • Experience: Familiar
      • OS: Windows 10
      Re: Hosts file will not block websites, no matter what I do.
      « Reply #1 on: September 26, 2020, 11:50:45 PM »
      Bumping this; does anyone have any ideas?

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: Hosts file will not block websites, no matter what I do.
      « Reply #2 on: September 27, 2020, 04:14:40 AM »
      The HOSTS file cannot block IP addresses. You can use it to "block" Domains by causing the host name to map to the local loopback address.

      I'd expect a "127.0.0.1 www.facebook.com" line would probably get you most of the way to blocking facebook.

      Remember you need to reboot for the HOSTS file changes to take effect.
      I was trying to dereference Null Pointers before it was cool.