Permanently Block Time-Wasting Web Sites
Is there a web site that’s utterly toxic to your mental state or ability to work? Maybe you grind your teeth over your ex’s weblog, which details every moment of her happy new life without you. Maybe you’ve lost hours of your life trolling eBay auctions and you simply can’t impulse-buy another autographed Neil Diamond record. Perhaps online backgammon can snatch away hours of your day at the office.
In this hack you can block sites at all times, until you explicitly release the restriction. This hack fakes your computer into thinking that those problem sites live on your hard drive — which obviously they don’t — and forces a Server Not Found error when your fingers impulsively type out that tempting, time-sucking URL. Here’s how.
Windows
1. Using Notepad or some other text editor, open the file named hosts, which is located in the following directory:
- Windows XP and Vista: C:\WINDOWS\SYSTEM32\DRIVERS\ETC
- Windows 2000: C:\WINNT\SYSTEM32\DRIVERS\ETC
- Windows 98\ME: C:\WINDOWS\
2. Add the following on its own line in the hosts file:
127.0.0.1 ebay.com games.yahoo.com evilex.com replacing the sites listed with the domains that you want to block.
Mac OS X
1. In Finder, from the Go menu, choose Go To Folder.
2. In the Go To Folder dialog, type /etc/.
3. From the /etc/ folder window, open the hosts file in a text editor.
4. Add the following on its own line in the hosts file:
127.0.0.1 ebay.com games.yahoo.com evilex.com replacing the sites listed with the domains that you want to block.
The Result
After you’ve completed the steps for your operating system, save the hosts file and quit your editor. Now when you visit one of your blocked sites, you get a Server Not Found error. (If you’re running a web server, at home as detailed in Hack 35, your own server’s files appear.)
The advantage of this method over Hack 7 is that the sites are blocked from every browser on that computer, not just Firefox. The downside is that when you decide it’s an OK time to browse eBay, you’ve got to manually comment out the following line in the hosts file by adding a # to the beginning of the line:
#127.0.0.1 metafilter.com flickr.com And that’s a deliberately huge pain that can help keep your wandering clicker in line when you’re under deadline.





















