Thursday, July 13, 2006

First-aid for net-surfing addiction

If you find yourself surfing to the same sites over and over out of reflexive instinct here is a solution.

Edit your hosts file.

What is the hosts file? It is a local DNS resolution file that your browser looks into first, before actually going out onto the internet to do the DNS resolution. It works the same way on both Windows and Linux.

On Windows it is located here (the file has no extension):
%SystemRoot%\system32\drivers\etc\hosts

On Linux it is simply here:
/etc

Add lines similar to the following, to the bottom of your hosts file.
0.0.0.0 www.siteiamaddictedto.com
0.0.0.0 www.baneofmyexistence.com

The 0.0.0.0 null IP address is an invalid destination. Hence when you try to surf to the site that is responsible for the loss of your last three jobs and your last two divorces your browser will go, yes exactly, nowhere!

Poof! A bright future as a responsible adult is yours at last.

Internet Explorer already has a facility within the browser settings to block sites. However Firefox and other browsers do not have this. The hosts file is used by all browsers so all you have to do is set it here and it will apply to all of them.


No comments: