Facebook has repeatedly shown to be untrustworthy in their handling of privacy, their IPO was an over-inflated/over-hyped scam, and their business model is shady at best. I block all Facebook domains at the DNS level so they can’t get their grubby hands on any of my data, browsing habits, etc.
To block all Facebook domains, “Like” buttons, cookies, etc on the web, add the following to /etc/hosts:
# Block Facebook
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 static.ak.fbcdn.net
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
Google’s probably the next-worst offender of “get/sell ALL the user data!”, but at least they’re providing services I use (search, mail, Android, docs, etc). Nothing in life is free, eh?
Update: Commenter Stephen Jakubiec points out that redirecting to 0.0.0.0
is a more robust way of achieving the desired effect, as it doesn’t have the unwanted side effect of redirecting Facebook requests to your local webserver (if you have one running). In case you’re daft, here’s what you need to change:
# Block Facebook
0.0.0.0 www.facebook.com
0.0.0.0 facebook.com
0.0.0.0 static.ak.fbcdn.net
0.0.0.0 www.static.ak.fbcdn.net
0.0.0.0 login.facebook.com
0.0.0.0 www.login.facebook.com
0.0.0.0 fbcdn.net
0.0.0.0 www.fbcdn.net
0.0.0.0 fbcdn.com
0.0.0.0 www.fbcdn.com
0.0.0.0 static.ak.connect.facebook.com
0.0.0.0 www.static.ak.connect.facebook.com
Update: Also see this curated list which seems to be updated frequently: http://someonewhocares.org/hosts/zero/
Done, do I need to restart network services or anything? Added them and still saw sites showing me the ‘Like’ button… Its not supposed even to be there, yeah?
You shouldn’t need to restart, but the DNS might be cached. I just had a look around on a few blogs and I didn’t see any “Like” buttons, so I think mine’s working.
Is it possible to block Facebook domains etc on Android?
Yeah, it should be, but I haven’t tried blocking just Facebook on Android. I use the AdAway application from the Google Play Store to block all ad servers.
I generally block with 0.0.0.0 as it will give an immediate failure to load.
Whereas 127.0.0.1 will fill your error logs with 404s (among others) if you’re running LAMP (MAMP, etc).
Just my two cents there Alan.
Hey, Stephen. That’s a great tip actually, I’ll add an addendum to point that out. 😀
That actually redirects me to my localhost default page in ubuntu 12.04, very confusing
Yep, a reader pointed this out… you should actually use
0.0.0.0
if you’ve got a web server running locally. 🙂Still doing that, strange!!
anything else in the file /etc/hosts?
0.0.0.0 redirects to localhost, someone tried to fb with my machine and was redirected to localhost, Funny, 0.0.0.1 works just fine