-1

I know how to block websites in the host file and it works with others, but with YouTube i just can't get it to work. What am I missing?

127.0.0.1 youtube.com
127.0.0.1 www.youtube.com
  • well i want to block youtube and after applying these settings, running -flushcache and restarting youtube still isn't blocked – kay Jun 6 '16 at 12:31
0

Map 127.0.0.1 loopback address to youtube.com or others except localhost may cause some problems.

So map any unreachable IPv6 address is more better such like:

200:2:253d:369e::    youtube.com
2

You may need to flush the cache by running

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Also, the entries in the hosts file need to be DNS names, not URLs (meaning the last two lines are wrong).

  • did that, also restarted safari, still not working – kay Jun 6 '16 at 12:05
0

You need to restart the entire computer, not just Safari or flushing cache.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .