
How to block a website in OS X.
March 14, 2007Everyone has those websites they can’t live without. For me, it’s the Ambrosia Software boards, and probably Wikipedia. Some people like their MLB.com, or Pandora.com, or whatever. However, there are definitely places that no human being should ever visit. You know what I’m talking about; that website all your friends think is hilarious to put on your screen and turn the monitor off, leaving you a nice surprise for when you return.
I was not too happy about that, let me tell you. My roommate (at the time) had a windows computer, and blocked said unpleasant websites with his devil magic, but I was having trouble finding out how to do it in a less sacrilegious way, on my iMac. Needless to say, after much swearing and running around, a pal and I managed to do it in a relatively simple manner. I think it is very important that this makes its way around the internets. For the sake of the children, if nothing else.
Without further ado, I give you how to block a website in OS X, with accompanying pictures. (Edit: This was linked from a friend’s blog, but he deleted it… so I’m just gonna salvage it.)
“Your objective is to modify a hidden “hosts” file within the HD. It’s traditionally one of those “don’t mess with me” folders, and with good cause. But if you’re real careful while you’re pokin’ around, everything will be fine. A quick line in Terminal allows you to write over the file. With a few keystrokes in TextEdit, we won’t be seeing that naughty site for a long time.
Observe:
1. Close out any and all browsers.
2. Open the application Terminal, type “sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit” and hit enter. This “unlocks” your hidden files so that they can be modified. You’ll be prompted for your computer’s password; type it in and hit enter. Just so you aren’t alarmed, as you type your password, the letters won’t show up. If you mess up typing the password, just quit Terminal, open it back up, and try again.
Entering into Terminal
3. TextEdit will be launched. Go to File=>Open. In the search bar, type “/etc/hosts” It will pop up in a secondary window. Hit enter to open the highlighted file.
Search Bar
Looking for “hosts”
Untouched hosts file
4. Now, slowly pull out the Charlie Horse without touching the edges (j/k). But seriously, don’t make any changes except for this simple mod. At the very bottom of the document, type the IP address “0.0.0.0″ followed by any and all variations of the evil domain (evildomain.com, www.evildomain.com).
5. Save and quit TextEdit and Terminal.
badda-bing, i suppose.
Of course, this can all be bypassed by using Internet Explorer, which I understand has an option for blocking specific domains. But I doubt anyone will go that route.
Toodles.
/end tutorial”
Any questions? Feel free to leave a comment, I’ll get back ASAP.