This article contains information on how to block Twitter on a single device, we recomend you use a Network Level Blocking Strategy with something like a PiHole if possible.
If you're using a laptop, or desktop computer the best way to block Twitter tracking is edit your hosts fileIf you want to just block Twitter ad tracking, add the following to your hosts file:
# —————————-
127.0.0.1 platform.twitter.com
127.0.0.1 ads.twitter.com
127.0.0.1 analytics.twitter.com
127.0.0.1 scribe.twitter.com
127.0.0.1 static.ads-twitter.com
127.0.0.1 twittad.com
127.0.0.1 www.ads-twitter.com
If you want to block Twitter entirely, add this below the information above:
Save the file and you're done. The lines that begin with a "#" are comments, you don't need them, but it helps you keep things organized. The "127.0.0.1" tells the computer to redirect any traffic to that domain, back to the local computer, preventing it from getting out.127.0.0.1 abs.twimg.com
127.0.0.1 api.twitter.com
127.0.0.1 abs-0.twimg.com
127.0.0.1 eip-tata.pbs.twimg.com
127.0.0.1 eip-tata.pbs.twimg.com.akahost.net
127.0.0.1 pbs.twimg.com
127.0.0.1 twimg.com
127.0.0.1 twitter.com
127.0.0.1 video.twimg.com
127.0.0.1 www.twitter.com
Unfortunately just using the hosts file isn’t enough to block Twitter tracking you across different websites. The reason is embedded tweets and voting scripts will still track you. You will need to use browser extensions to accomplish that.
If you're not comfortable editing your hosts file, here are some browser extensions, that will block Twitter tracking:
- Privacy Badger Extention
- A customizable tracking blocker that can be used to block multiple services including Twitter.<\li>
- Disconnect Extension
- Blocks multiple social media tracking services.<\li>
Twitter has some additional third party tracking that you need to address. Twitter allows you to sign in using your Google or Apple account. They do this by embeding content from these two subdomains:
accounts.google.com
appleid.cdn-apple.com
If you try to block these using your hosts file, you won’t be able to sign-in to your Google or iTunes Accounts. So you’ll have to install the Privacy Badger Extension
, visit Twitter, and then click the Privacy Badger icon, and block them manually (see screenshot below).
You should NEVER have the Twitter App installed on any phone you actually use, it tracks every call you make, every place you visit, every person you are near, and every website you visit. Additionally the amount of personal information that can captured using your phone's accelerometer is terrifying.
- Operational Security - Tips for maintaing online anonymity, and keeping people out of your personal life.