ClearAd
How-to

Private DNS hostnames for blocking ads on Android: what each provider filters

Bizora Technologies · Updated · 8 min read

On this page
  1. The hostnames
  2. How to set it
  3. Which one should you choose?
  4. What Private DNS cannot do
  5. Troubleshooting
  6. Frequently asked questions
Short answer. To block ads with Android Private DNS, enter a filtering hostname such as dns.adguard-dns.com (AdGuard default) or adblock.dns.mullvad.net (Mullvad ad and tracker blocking) under Settings, Private DNS. Cloudflare 1.1.1.1 and Google DNS do not block ads, and Quad9 blocks malware, not ads.
Key takeaways
  • AdGuard and Mullvad hostnames below were read from the providers' own pages on 24 October 2026.
  • A hostname that only secures DNS (Cloudflare, Quad9, Google) will not remove ads.
  • NextDNS needs a personal configuration ID.
  • Private DNS needs Android 9 or newer, and the hostname must be typed exactly.

People search for a "Private DNS ad blocker code" because Android's Private DNS field asks for a hostname, and most guides give you a different one. Some of those hostnames block ads. Many do not. This page lists the common ones, what they filter, and where we checked each.

The hostnames

ProviderHostname to typeWhat it filters
AdGuard DNS (default)dns.adguard-dns.comAds and trackers
AdGuard DNS (family)family.adguard-dns.comAds, trackers and adult sites
AdGuard DNS (non-filtering)unfiltered.adguard-dns.comNothing; encryption only
Mullvad (ad blocking)adblock.dns.mullvad.netAds and trackers
Mullvad (no filtering)dns.mullvad.netNothing
NextDNSyour-id.dns.nextdns.ioWhatever you pick in your NextDNS settings; needs a free account for the ID
Cloudflareone.one.one.oneNothing; fast and private lookups
Quad9dns.quad9.netKnown malware domains, not ads

How to set it

  1. Open Settings and search for Private DNS.
  2. Select Private DNS provider hostname.
  3. Type the hostname exactly, with no https:// and no trailing slash.
  4. Tap Save. The phone connects and shows an error if the hostname is wrong or the network blocks it.

Which one should you choose?

  • Just want fewer ads: AdGuard default or Mullvad ad blocking.
  • Want to edit what is blocked: NextDNS, with your own settings.
  • Want a kids-safe phone: AdGuard family (it also blocks adult sites).
  • Want privacy but not blocking: Cloudflare or Mullvad non-filtering.

What Private DNS cannot do

The setting is all or nothing. You cannot leave one app out, you see no counts, and it cannot remove ads that come from the same server as the content. If an app breaks you have to set Private DNS back to Automatic. For those cases a local ad blocker app is the better tool; see Private DNS vs an ad blocker app.

ClearAd Recently blocked list showing blocked ad domains with an Allow button for each
With an ad blocker app you can see what was blocked and tap Allow when something breaks.

Troubleshooting

  • "Couldn't connect" under Private DNS: the hostname has a typo, or the Wi-Fi blocks encrypted DNS on port 853. Try mobile data, or set Automatic.
  • Ads still load: you picked a non-filtering hostname, or the app uses its own DNS.
  • Some sites will not open: the filter blocked something the site needs. Switch to Automatic to check, then consider an app that lets you allow single addresses.
  • You use a normal VPN: the VPN usually overrides Private DNS while it is connected.

Frequently asked questions

What is the Private DNS hostname for blocking ads?

dns.adguard-dns.com (AdGuard) and adblock.dns.mullvad.net (Mullvad) both block ads and trackers. Type it under Settings, Private DNS, Private DNS provider hostname.

Does 1.1.1.1 block ads?

No. Cloudflare's standard 1.1.1.1 service secures and speeds up DNS but does not filter ads.

Does Private DNS work on Android 8?

No. It needs Android 9 or newer.

Block ads in your apps with ClearAd

No root. 15 free minutes every day. Blocks most ads, not all. Installed from this site as an APK.

ClearAd home screen with protection on: green shield, time left today and 7 blocked requests

Written by the ClearAd team at Bizora Technologies. We build the app and test every claim on an Android 17 emulator before we publish it. Found a mistake? Tell us and we will correct it.