Have you noticed that you spend quite a bit of time on time consuming sites, such as youtube, reddit, Hacker news, CNN.com and etc.? I certainly did. When it comes to productivity, such websites don’t help at all. But now that you think of it, maybe it’s worth to block them completely?

Blocking websites with hosts files

Linux has a host file at /etc/hosts, Windows have one as well (but it’s hidden somewhere in Windows folder).

You simply need to add entries in such manner:

127.0.0.1 example.com

127.0.0.1 is your internal localhost IP address and instead of example.com you enter your time consuming site. Add as many entries as you need.

Just as an example, here’s my /etc/hosts file:

127.0.0.1 localhost
127.0.0.1 reddit.com
127.0.0.1 twitter.com
127.0.0.1 news.ycombinator.com

And when you’re done, you won’t be able to access these sites that easily (but you will still be able to do that by using certain methods).

And that’s it! This change is easily to apply and easy to revert. It blocks access to your most time consuming websites and reminds you your decision not to visit them.