AdGuard for Android and AdGuard Home provides a DNS ad blocking feature. To learn more about the principle of DNS filtering, read this KB article. Compared to the traditional ad blocking, DNS filtering is more "crude" and allows less customization. It doesn't support the complex syntax we use in our filters, but it does support simplified syntax that allows you to block certain domains.
DNS filtering supports three types of rules:
Basic filtering rules, which is the same as AdGuard's basic rules, but with a limited set of modifiers supported:
“Hosts” rules, which is basically the same as
||example.org^- block access to the example.org domain and all its subdomains
@@||example.org^- unblock access to the example.org domain and all its subdomains
example.org- block access to the example.org domain, but not its subdomains
0.0.0.0 example.org- AdGuard will now return 0.0.0.0 address for the example.org domain (but not its subdomains). Other IP addresses can be specified.
/REGEX/- block access to the domains matching the specified regular expression
126.96.36.199- block access to all domains whose CNAME response returns this IP address
||example.TLD^- block access to "example" domains across all TLDs and all their subdomains
://example.- block access to domains that begin with "example."
.example.org- only block access to the subdomains of example.org (incl.
www.), not its main domain
||com^- block access to the .com top-level domain
! Here goes a comment- just a comment
# Also a comment- just a comment
! Title:- the title that'll be used for the filterlist in AdGuard's settings (
# Title:won't work).
Based on the examples above, you can create rules for DNS filters. If you have any questions, feel free to post them on our forum.