How to block your own access to a website

You might need to do this if you are hurting your own productivity by visiting a website. ;)

The simplest way to block access to a website from your computer is to edit your hosts file.  The hosts file is a hold-over from the early days of the internet–before we had the DNS system.  Anyway, navigate to

c:\windows\system32\etc on Windows, or /etc/ on Mac OS X, and edit the text file there called “hosts”.

Add a line at the bottom which is “”.

Save the file.  When your browser tries to go to, it attempts to connect to your local machine (at IP address to serve up the site.  Because you don’t have the site on your local machine (aka your computer), nothing shows up. It’s as easy as that.

2 Responses to “How to block your own access to a website”

  1. Henna Says:

    This is hilarious - blocking your own access.. Can’t you just as easily unblock it?

    And what we want to know is what YOU’RE unblocking.. facebook perchance?

  2. ramesh Says:

    yeah, i found that while googling and blocked facebook from a lazy intern’s computer…

Leave a Reply