Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Blubble

macrumors newbie
Original poster
Mar 13, 2012
2
0
Hello everyone,

After years of struggling with my internet addiction I decided to completely block the websites that ruined my productivity the most. The best trick I found for doing that was to edit the hosts file (note: I use OS X 10.6.8) with the line:

127.0.0.1 www.example.com


However I have been unable to block Youtube, the mother of all time-wasting sites. I tried all forms of the URL, I double checked several times, but it still doesn't work, whereas all other websites do. I use Chrome, but the blocking doesn't work on Safari either so I am confident that the issue does not lie with the browser itself.

Any tips? I can't tell whether this issue is with OS X or the website itself.
 
Last edited:
Hello everyone,

After years of struggling with my internet addiction I decided to completely block the websites that ruined my productivity the most. The best trick I found for doing that was to edit the hosts file (note: I use OS X 10.6.8) with the line:

127.0.0.1 www.example.com


However I have been unable to block Youtube, the mother of all time-wasting sites. I tried all forms of the URL, I double checked several times, but it still doesn't work, whereas all other websites do. I use Chrome, but the blocking doesn't work on Safari either so I am confident that the issue does not lie with the browser itself.

Any tips? I can't tell whether this issue is with OS X or the website itself.

The hosts file you need to edit is /private/etc/hosts.

An alternative would be to consider setting up a dns based filter scheme. This would allow you to set your own blacklist as well as block entire categories of questionable content such as phishing sites, malware sites, games or whatever you think you need to live without. Then of course you have to practice some self control not to undo your dns settings. One provider is opendns.
 
The hosts file you need to edit is /private/etc/hosts.

An alternative would be to consider setting up a dns based filter scheme. This would allow you to set your own blacklist as well as block entire categories of questionable content such as phishing sites, malware sites, games or whatever you think you need to live without. Then of course you have to practice some self control not to undo your dns settings. One provider is opendns.

Thank you for your reply. Your solution is elegant, however I discovered that I cannot switch to opendns due to the internet access policy of the place where I live. So for now I am stuck with the host file.

I looked at the file again and it is indeed /private/etc/hosts. As I said before, all other sites seem to work, it's just Youtube that remains stubbornly accessible. :D

EDIT: I have done some more tinkering and solved the problem on my own. Thanks for your time.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.