Generates a host list of first-party trackers for ad-blocking.
Go to file
2019-11-10 23:22:21 +01:00
.gitignore Initial commit 2019-11-10 18:14:25 +01:00 Loosely error-proofed subdomain collection 2019-11-10 23:22:21 +01:00 Added progressbar and ETA 2019-11-10 21:59:06 +01:00 More error-proofing 2019-11-10 23:07:21 +01:00 Added progressbar and ETA 2019-11-10 21:59:06 +01:00 Initial commit 2019-11-10 18:14:25 +01:00
websites.list Updated website list 2019-11-10 23:16:18 +01:00


Generates a host list of first-party trackers for ad-blocking.

DISCLAIMER: I'm by no way an expert on this subject so my vocabulary or other stuff might be wrong. Use at your own risk.

What's a first-party tracker?

Traditionally, websites load trackers scripts directly. For example, and both load to track their users. In order to block those, one can simply block the host

However, to circumvent this easy block, tracker companies made the website using them load trackers from The latter being a DNS redirection to, directly pointing to a server serving the tracking script. Those are the first-party trackers.

Blocking doesn't work any more, and blocking * isn't really possible since:

  1. Most ad-blocker don't support wildcards
  2. It's a DNS redirection, meaning that most ad-blockers will only see

So the only solution is to block every subdomains known, which is a lot. That's where this scripts comes in, to generate a list of such subdomains.

How does this script work

It takes an input a list of websites with trackers included. So far, this list is manually-generated from the list of clients of such first-party trackers (latter we should use a general list of websites to be more exhaustive).

It open each ones of those websites (just the homepage) in a web browser, and record the domains of the network requests the page makes. It then find the DNS redirections of those domains, and compare with regexes of known tracking domains. It finally outputs the matching ones.


Just to build the list, you can find an already-built list in the releases.

  • Bash
  • Python 3.4+
  • Firefox
  • Selenium
  • seleniumwire
  • dnspython
  • progressbar2

And then just run


Adding websites

Just add them to websites.list.

Adding first-party trackers regex

Just add them to