Block Facebook From Your Computer

block-facebook-from-your-computer

April 10, 2016 / Updated: April 14, 2016 / Lena Shore
Filed under: , ,

UPDATE: It’s not just a time waster. It’s slowing you down.

block-facebook-from-your-computerWhen I first wrote this article a couple years ago, it took 3-4 rules to block Facebook, now takes about 30. Facebook has their fingers in more pies I guess.

This last time I blocked it, I noticed something interesting. My browser speed improved. I was blaming Firefox and it’s add-ons. I would use the browser for a little while and it would become sluggish, stop loading, and error out with “unresponsive scripts”. I expected bad behavior when I had Facebook open – but even when I didn’t have any Facebook pages open it would still crash and burn.

Since I blocked Facebook from accessing my computer, my browser problems went away. I assume there is no small number of scripts related to Facebook and it’s partners tracking your activity and clogging things up. Another reason to block Facebook.

I hope Facebook burns in hell.

Time Waster

My name is Lena and I’m a Facebook addict.

I hate to admit it, but I waste more time on Facebook than I’d like.  I need to stop. I have good intentions, but they never seem to do anything but pave my way to hell. I go to Facebook instead of making tough business decisions or when there is a lull between projects. What do I have to show for it? More cat pictures.

You may share a similar problem with Facebook or other websites. So, instead of failing my willpower attempt or paying a therapist big bucks to discover “why” I can’t control myself, I just fixed the problem at the root. I blocked Facebook from my work system and now only access it from my iPhone or iPad on my personal time.

Here are some different ways you can accomplish this yourself:

  • Edit your hosts file using the Terminal. This was the one I felt was best for me. Doing it this way requires no plugins to install for each browser you might use.
  • Use an extension for your browser.  Leechblock looked like a good one.

I chose to edit my hosts file on my Macintosh. If you’d like to do this on your PC, you can google it and find all kinds of tutorials for your particular system.

Editing the localhosts file is in that perfect point on the swing; isn’t too hard to do, it’s easy to undo – and yet it is not so easy that I will actually bother undoing it. A bonus is you can do this on your employee computers and they will probably never know how you did it… and also be afraid to even tell you they noticed their favorite website is blocked.

How to modify your hosts file on your Macintosh

  • Launch your Terminal application. Go to Applications –> Utilities –> Terminal
  • Enter the following command: sudo nano /private/etc/hosts
  • Enter your administrator password and hit enter (It won’t show anything being typed and that’s okay)
  • Note the screen that pops up below:

terminal-block-facebook

  • Use your arrow keys to navigate to the bottom of the list.
  • You will now add new lines below the last line. In the example above I have added four new lines pertaining to facebook.com. You can copy them exactly.

# Block Facebook
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
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.fbcdn.net
127.0.0.1 static.ak.connect.facebook.com
127.0.0.1 connect.facebook.net
127.0.0.1 www.connect.facebook.net
127.0.0.1 apps.facebook.com
# Block Facebook IPv6
#fe80::1%lo0 localhost
::1 facebook.com
::1 www.facebook.com
::1 login.facebook.com
::1 www.login.facebook.com
::1 fbcdn.net
::1 www.fbcdn.net
::1 fbcdn.com
::1 www.fbcdn.com
::1 static.ak.fbcdn.net
::1 static.ak.connect.facebook.com
::1 connect.facebook.net
::1 www.connect.facebook.net
::1 apps.facebook.com
::1 edge-star6-shv-02-ams2.facebook.com

  • Click Command + o (That’s the letter O, not zero)
  • Click Enter
  • Click Control + x and the Y when prompted.
  • For good measure you may need to restart your computer system.
  • No more Facebook! To reverse changes just delete what you did and save your file again.

How does this work?

  • 127.0.0.1 is your localhosts IP address. You could change this to be another URL if you wanted (like google.com or yourwebsite.com or lenashore.com)
  • The asterisk in front of *.facebook.com is wildcard and will block any subdomains. Www.facebook.com and facebook.com are just variations of the same site to ensure they are blocked.

Archives

Categories