Skip to content

Guide · Open source

How to use anti-AD: DNS ad and tracker blocklist guide

Updated · written with AI from the project's own documentation and checked against our catalogue data

anti-AD is an open-source list of internet domains that serve ads or send tracking and analytics data, aimed mainly at Chinese-language sites and apps. It is built for DNS-level blocking, so it works on a home router or DNS server and can cover apps and TV boxes as well as browsers. This guide shows you how to choose the right file for your tool and how to load it, so you know what to expect after you finish.

anti-ADprivacy-protection-tools/anti-AD · ★ 10.9k · MIT

Quick start

  1. 1Confirm your tool's format. Check that your DNS, proxy or ad-filter tool accepts one of the anti-AD formats listed in the README.
  2. 2Choose the matching file. Use the file table to pick the file for your tool, such as anti-ad-domains.txt for Pi-hole or mihomo.mrs for mihomo.
  3. 3Check the minimum version. For sing-box, use 1.10.0 or newer. For mihomo, use 1.18.7 or newer, since those binary formats need them.
  4. 4Get the file. Clone the repository with git clone https://github.com/privacy-protection-tools/anti-AD, or download the single file from the raw or official link.
  5. 5Load it into your tool. Add the file as a blocklist or rule source using your tool's own settings. Do not use the AdGuardHome regex file in AdGuard or uBlock Origin.
  6. 6Add allow rules if needed. If a site breaks, add your own allow rule for it, since some contested domains may have other uses.

Check that your tool accepts an anti-AD format

anti-AD does not run on its own. You need a DNS, proxy or ad-filter tool that accepts one of the formats the project publishes. The README lists AdGuardHome, dnsmasq, Pi-hole, Surge, Clash, mihomo, SmartDNS and sing-box.

Because anti-AD works at the DNS level, it blocks requests to ad and tracking domains rather than hiding page elements. If you want per-page cosmetic filtering inside a browser, this list is not the right tool.

  • Network-wide blocking on a router or DNS server: AdGuardHome, dnsmasq, Pi-hole or SmartDNS
  • Proxy-based rule files: Surge, Clash or mihomo
  • Newer proxy core: sing-box

Pick the right file for your tool

The project publishes one file per tool. Each row below matches a file name in the README table. Use the raw link from the repository or the official anti-AD.net link, which the README says is faster and more stable.

  • adblock-for-dnsmasq.conf: dnsmasq and derived versions
  • anti-ad-easylist.txt: AdGuardHome (DNS filtering)
  • anti-ad-adguard.txt: AdGuard, matches the domain part of a whole URL
  • anti-ad-domains.txt: Pi-hole or other tools, with an optional whitelist
  • anti-ad-surge.txt or anti-ad-surge2.txt: Surge or other tools; the surge2 file uses DOMAIN-SET format, which the README says performs better
  • anti-ad-clash.yaml: Clash Premium-style tools, with an optional whitelist
  • anti-ad-smartdns.conf: SmartDNS, with an optional whitelist
  • anti-ad-sing-box.srs: sing-box, a binary file that needs version 1.10.0 or newer
  • mihomo.mrs: mihomo, a binary file that needs version 1.18.7 or newer

Download the list or clone the repository

To get all files at once, clone the repository with the command below. The README gives this as the install method. You can also download a single file from the raw or official links in the file table.

Check that your tool's version meets the minimum for the binary formats (sing-box 1.10.0 and mihomo 1.18.7). Older versions will not load those files.

git clone https://github.com/privacy-protection-tools/anti-AD

Add the list to your tool

Point your tool at the file you chose as its blocklist or rule source. The exact menu or config key depends on the tool, so follow that tool's own documentation. anti-AD does not provide a separate setup program.

The easylist file uses regular-expression rules intended for AdGuardHome. The README warns not to use it in AdGuard or uBlock Origin, which can match URL paths, because specific URLs may be blocked by mistake.

  • Use anti-ad-easylist.txt only in AdGuardHome
  • Use anti-ad-domains.txt, the Surge, Clash or SmartDNS files, or the dnsmasq file for your DNS or proxy tool

Handle false positives and contested domains

Some domains may be tied to ads or tracking but also have other uses, so blocking them can cause side effects. The project documents some of these in a separate discretion list. The README says you can add your own allow or block rules as needed.

If you see a wrong block, the README asks you to open an issue on GitHub. The project's issue page is the place to report false positives, bugs or other problems.

  • Read the contested-domains notes in the README's discretion section
  • Add your own allow rules for sites you need
  • Report false positives through a GitHub issue

What people use it for

  • Blocking ads and tracking domains across every device on a home network through AdGuardHome or Pi-hole
  • Cutting ads in apps and TV boxes that cannot run browser extensions, because filtering happens at the DNS level
  • Loading a ready-made rule file into Surge, Clash or mihomo for proxy-based blocking
  • Reducing data collection from Chinese-language sites and apps through a list built for that audience

Frequently asked questions

Is anti-AD free to use?

anti-AD is released under the MIT licence, according to the project summary. The README describes it as a fully open-source project, and the rules come from upstream lists and user issues.

What do I need before installing anti-AD?

The README lists one prerequisite: a DNS, proxy or ad-filter tool that accepts one of the listed formats. Without a compatible tool, the files have nothing to load into.

Which anti-AD file works with Pi-hole?

The README points Pi-hole users to anti-ad-domains.txt. It also lists an optional whitelist for that file in the dead-horse repository.

Can anti-AD block ads inside a browser?

The README describes DNS-level blocking, not element hiding. It can block ad domains for browsers and apps, but it does not remove ad elements from web pages.

Why does a site stop working after I add anti-AD?

Some contested domains may have other uses, and the README notes that users may need to add their own allow rules. You can also report a wrong block through a GitHub issue.

How does anti-AD compare with other blocklists like EasyList or AdGuard Filters?

The project lists neohosts, AdGuard Filters, Pi-hole blocklists and EasyList as comparable projects. anti-AD's own description says it merges several existing hosts and filter lists, removes duplicates and dead domains, and outputs tool-specific formats.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

anti-AD suits people who run a home router, DNS server or proxy tool such as AdGuardHome, Pi-hole, Surge, Clash or mihomo and mainly use Chinese-language sites and apps. It is a poor fit if you want per-page element hiding in a browser, or if you need a guarantee that no legitimate site is ever blocked.

Install options & downloads