What is DNS filtering
DNS filtering is a mechanism for blocking access to certain content on the Internet. When you go to a website, your browser sends the website name (for example, google.com) to a DNS server. The DNS server answers with the IP address of the server hosting this website.
In particular, DNS filtering is used to block access to ad servers or malicious websites. Simply put, a filtering DNS server does not send back their IP addresses. If you want to learn more about how DNS filtering works, read the AdGuard DNS Knowledge base article.
DNS filtering is available in AdGuard apps for Windows, Mac, Android, and iOS.
Filters and filtering rules
Filtering rules tell DNS servers which domains to block and which to allow. They are strings written using a specific syntax. A group of rules is called a filter.
For instance, the AdGuard DNS filter has about 50K rules that block requests to advertising and tracking domains. It is preinstalled in all AdGuard products that support DNS filtering. To find and enable this filter:
- in AdGuard for Mac: Preferences → DNS → Filters → enable AdGuard DNS filter
- in AdGuard for Windows: Settings → DNS Protection → Open DNS filters editor → check the DNS Filter box
- in AdGuard for iOS: enable Advanced Mode in Settings, then go to Protection → DNS Protection → DNS filtering → DNS filters, and enable the AdGuard DNS filter
- in AdGuard for Android: Settings → DNS Filtering → DNS requests blocking → enable AdGuard DNS filter
User rules and filters
You can customize DNS filtering in the AdGuard products by adding rules and filters – third-party and your own. But be careful, as adding inaccurate rules or too many filters can cause some sites to malfunction.
How to add third-party DNS filters and where to find them
To add a new filter, enter a link to it or import it from your device, and AdGuard will detect it automatically. To find the input field, follow these instructions:
- in AdGuard for Mac: Preferences → DNS → Filters → the plus icon at the bottom-left corner
- in AdGuard for Windows: Settings → DNS protection → Open DNS filters editor → the plus icon at the bottom-left corner
- in AdGuard for iOS: Protection → DNS Protection → DNS requests filtering → DNS filters → Add filter
- in AdGuard for Android: Settings → DNS Filtering → DNS requests blocking → + New DNS Filter
A rich collection of filters is available at filterlists.com. You can search it by name, description, language, and tags.
How to add your own rules
Along with DNS filters, you can use your own rules to fine-tune your DNS filtering. All AdGuard apps have a special section for custom rules. Depending on the product, it is usually located in the DNS Filtering or DNS Protection tab.
The AdGuard apps for Apple devices have Blocklist and Allowlist sections. You can add to these sections the domains that should be blocked or excluded from filtering. The Blocklist also supports a more complex DNS filtering rule syntax.
There are two ways to add your own rules:
- Manually. Be sure to review the rule syntax.
- Import them to your device. For example, you may want to block the same ads on all your devices that use AdGuard. Or if someone has shared their filtering list with you.