19

I have no Facebook account. How to block all Facebook elements (not only like-button, but everything Facebook) on the rest of the Internet. I worry being tracked by Facebook. I am using Firefox on Mac OS X.

15

You can add these lines to the file /etc/hosts on your computer to cut off access to all facebook content:

# Block Facebook
127.0.0.1 www.facebook.com
127.0.0.1 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
  • 3
    Another option would be to add those domain names in the NoScript add-on. – ale Dec 10 '10 at 18:40
  • 1
    Perhaps the content that you still see is not loaded from Facebook but rather from the site that you are on? If that is the case, editing /etc/hosts will still keep your Mac from sending any data to Facebook. – penguirl Dec 10 '10 at 20:48
  • @fyodor78 link to the site ? – Sathyajith Bhat Dec 10 '10 at 21:33
  • @Sathya, bradleymanning.org/category/activism – Arjan Dec 12 '10 at 22:53
  • @fyodor78 The small footer on the screenshot is rendered by HTML that is from the site itself. That HTML refers to the image http://static.ak.fbcdn.net/rsrc.php/z5/r/3_oEy-UyyDE.png but that can be cached for almost a year. So I guess it has been taken from your browser's cache. What if you first clear your browser's cache? – Arjan Dec 12 '10 at 23:01
6

Since IPv6 started going live, it has made @mckeed's response incomplete. "::1" is the default feedback loop for IPv6. It needs to be added to each Facebook entry in /etc/hosts. Here's what mine looks like:

# Block Facebook IPv4
127.0.0.1   www.facebook.com
127.0.0.1   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
::1 www.facebook.com
::1 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
4

Ghostery is available for Firefox and Safari, it blocks a laundry list of trackers including Facebook. If you want to you can tell it specifically what to block and what not to block.

3

This isn't a complete solution. If you have Adblock, then you can use the filter at http://adblockplus.org/en/subscriptions Scroll down to the "Miscellaneous" section and then subscribe to the "Antisocial" filter. That blocked it for me. Combined with mckeed's answer, this might block all of Facebook.

The antisocial filter blocks Twitter and other services too, so it might not be what you're looking for.

1

If you want only Firefox to be affected, you could add the domain list from mckeed's answer to a custom filter in Adblock.

1

Try FaceBookBlocker

How did we get here?

We’re beginning to feel overwhelmed by the frequency with which Facebook links are starting to appear on many of the sites we visit in our daily routines, so we decided to do something about it.

What does it do?

This browser extension stops Facebook social plugins—including those within iFrames—from running on sites other than Facebook itself. This includes ‘Like’ buttons, ‘Recommended’ lists, and should also stop any Facebook scripts from tracking your browsing history.

What about Facebook Connect?

Don’t worry: sites that use Facebook Connect for sign in purposes, or that use Facebook as a conduit for other functionality will continue to work as expected.

  • 1
    link to facebook blocker gives 404 – Ivanov Jan 10 '18 at 4:58
0

On Mac OS X, GlimmerBlocker can work as a proxy for all your browsers. It blocks Facebook by subscribing to the right filter:

Title: Facebook 'Like' Disabler

Author: Adam Stamper

Description: This filter prevents autoloading of 'Like' buttons & other social gadgets from Facebook servers. Instead a link appears to let you enable each gadget, giving you control over how much Facebook knows about your web usage.

URL: http://visuao.net/facebook/glimmer.xml

Note that GlimmerBlocker does not work for HTTPS sites, as the browser will then send encrypted traffic through the proxy.

0

With uBlock Origin, AdBlock Plus, or any other browser extension that can use AdBlock Plus filter lists, you can install the Anti-Facebook Filters, which aims to block Facebook content on non-Facebook websites.

You might also want to look at the Fanboy Annoyance Block List, which aims to...

...Block Social Media Content, In page Pop-Ups and other annoyances; thereby substantially decreasing web page loading times and uncluttering them.

Aside from social media content, it also blocks in-page popups, newsletters, unnecessary links, self promos and other content that clutters sites unnecessarily.

You could install the Fanboy Ultimate List, which combines the Annoyances block list with EasyPrivacy (blocks trackers), and EasyList (main ad blocking list). Note that you don't need to install the Annoyances block list if you already have the Ultimate list installed.

protected by Community Jan 28 '18 at 22:47

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.