Binary Code

A whole lot of nought thought by Chris Cummer

Blocking Facebook

While I do have a Facebook account (because it’s damned near impossible to delete one; it certainly isn’t possible via the Facebook site itself), for the most part I try to run invisible to Facebook. This is not as easy as it seems so below is my process for doing so.

I make no claims that this is bulletproof; if you have better suggestions, please share.

First, I installed the FacebookBlocker blocker browser extension. It seems to work well.

Then I installed the Ghostery browser plugin. Where FacebookBlocker is a scalpel, Ghostery is a big, heavy club… and every website is a juicy watermelon. I like Ghostery.

Perhaps most dramatically I’ve added the following to my /etc/hosts file:

# Kill all the facebook
127.0.0.1 static.ak.fbcdn.net
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 www.static.ak.fbcdn.net
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.connect.facebook.com
127.0.0.1 www.static.ak.connect.facebook.com
127.0.0.1 m.facebook.com
127.0.0.1 touch.facebook.com
127.0.0.1 connect.facebook.net
127.0.0.1 api-read.facebook.com

It effectively routes all HTTP calls to Facebook-owned domains that I’m aware of to localhost, which means Facebook content doesn’t even get loaded.

It has the added effect of making Facebook hard to get to for me, personally. If I want to browse Facebook via a browser on my laptop then I have to actively launch the terminal, comment out those lines, and then reload the site. That’s usually enough of a PITA to curb any incentive I might have had to go visit.

Finally, I’ve deleted Facebook’s apps off of all my devices except one. And it’s very slow on that one.

Net result: I go onto Facebook perhaps once a week and whenever I see the Facebook sharing icon on another website, it’s always one hosted locally to that site instead of being served from Facebook’s CDN.