sodcalculator

10 Tech How-To

Private DNS Ad Blocking: Android & iPhone Setup

Guide 10-50740 · Updated · Step by step

Private DNS ad blocking lets you block ads, trackers, and malicious domains at the network level, before they ever reach your browser or apps. It works on both Wi-Fi and cellular data, covers every app, and requires no root or jailbreak. This guide walks you through setting it up on Android and iPhone, using the built-in Private DNS (Android) and DNS-over-HTTPS/TLS (iPhone) features.

What You’ll Need

  • An Android device running Android 9 or later, or an iPhone running iOS 14 or later.
  • A DNS provider that offers ad-blocking. Free, reliable options include NextDNS, AdGuard DNS, and Cloudflare (with the 1.1.1.1 app for ad blocking). You’ll need the provider’s DNS server addresses or hostname.
  • For iPhone: the provider’s configuration profile (usually a .mobileconfig file) or the ability to enter DNS settings manually in Wi-Fi settings (for DNS-over-TLS).

Step-by-Step

Android (using Private DNS)

  1. Get your DNS hostname. For NextDNS, go to nextdns.io, create a free account, and note your unique DNS-over-HTTPS endpoint (e.g., abc123.dns.nextdns.io). For AdGuard DNS, use dns.adguard.com (standard ad blocking) or dns.adguard-dns.com (family protection).
  2. Open Settings. On your Android device, go to Settings > Network & internet > Private DNS (the exact path may vary by manufacturer; look for “Private DNS” or “DNS” in the network settings).
  3. Select “Private DNS provider hostname”. Tap the option that lets you enter a hostname (not just IP).
  4. Enter the hostname. Type the DNS provider’s hostname exactly as given (e.g., abc123.dns.nextdns.io or dns.adguard.com). Do not include https:// or any path.
  5. Save. Tap Save or OK. Your device will now use that DNS server for all connections.
  6. Verify. Open a browser and visit a site that shows ads, or check your DNS provider’s dashboard (if available) to confirm queries are coming through.

iPhone (using DNS-over-HTTPS or TLS)

  1. Get the configuration profile. For NextDNS, go to nextdns.io on your iPhone, sign in, and download the iOS configuration profile from the setup page. For AdGuard DNS, visit adguard-dns.com and download the iOS profile for your plan.
  2. Install the profile. Open the downloaded .mobileconfig file (usually in the Files app or Safari downloads). Go to Settings > General > VPN & Device Management, tap the profile, then tap Install. Enter your passcode if prompted.
  3. Enable the profile. After installation, go to Settings > General > About > DNS Settings (or VPN & Device Management > the profile). Tap Enable to activate the DNS configuration.
  4. Alternative for Wi-Fi only: If you prefer not to use a profile, you can set DNS manually for a specific Wi-Fi network: go to Settings > Wi-Fi, tap the info (i) next to your network, scroll to Configure DNS, switch to Manual, and add the DNS server IPs (e.g., for AdGuard: 94.140.14.14 and 94.140.15.15). This only affects that Wi-Fi network, not cellular.
  5. Verify. Visit a site with ads, or check your provider’s dashboard. On iOS, you can also go to Settings > General > About > DNS Settings to see the active configuration.

Common Mistakes

  • Entering an IP instead of a hostname on Android. Android’s Private DNS feature requires a hostname for DNS-over-TLS; entering an IP may not work. Use the provider’s hostname (e.g., dns.adguard.com).
  • Forgetting to enable the profile on iPhone. Installing the profile is not enough; you must also tap Enable in the DNS settings.
  • Using a hostname with “https://”. The Private DNS field expects only the hostname, not a URL. Including the scheme will cause a connection failure.
  • Setting DNS only for Wi-Fi on iPhone. Manual DNS in Wi-Fi settings does not affect cellular data. Use the profile for full coverage.
  • Not testing after setup. Some devices cache DNS; a quick reboot or toggling airplane mode can help ensure the new settings take effect.

Tips

  • Choose a provider with customization. NextDNS lets you create blocklists, allowlists, and set privacy policies. AdGuard DNS offers preset filtering levels.
  • Check your provider’s logging policy. Some keep logs; others don’t. Pick one that matches your privacy expectations.
  • Use a provider with a dashboard. Seeing query logs can help you understand what’s being blocked and fine-tune settings.
  • For Android, consider the provider’s app. Apps like NextDNS or AdGuard offer more control (e.g., per-app settings) than the built-in Private DNS, but require a persistent notification.
  • Keep your DNS settings updated. If you change providers, remember to update both your phone and any other devices on your network.

Troubleshooting

  • DNS not working after setup. First, check that you entered the hostname correctly. Then try toggling Airplane mode or restarting your device. If it still fails, remove the profile (iPhone) or set Private DNS to “Off” (Android) and re-add it.
  • Internet stops working entirely. This usually means the DNS server is unreachable or the hostname is wrong. Temporarily set DNS to automatic to restore connectivity, then double-check the hostname.
  • Ads still appear. Some apps use hardcoded IP addresses or certificate pinning, bypassing DNS. Also, some ads come from the same domain as the content (e.g., YouTube ads). Consider a more aggressive blocklist or a content blocker app.
  • iPhone profile won’t install. Make sure you’re using Safari or the Files app, and that your device is unlocked. If you see “Profile Installation Failed,” try downloading the file again.
  • Private DNS option missing on Android. Some manufacturers hide it. Look under Settings > Network & internet > Advanced. If it’s truly absent, use the provider’s app instead.

Frequently Asked Questions

Will this slow down my internet?

Usually no. DNS lookups are tiny, and modern DNS providers are fast. You may even see a slight speed increase because ads and trackers are blocked before they load.

Does it work on cellular data?

Yes. On Android, Private DNS applies to all networks. On iPhone, the configuration profile applies to both Wi-Fi and cellular. Manual Wi-Fi DNS does not cover cellular.

Can I use it with a VPN?

It depends. Some VPNs override DNS settings. If you use a VPN, check its settings to see if it has its own DNS or allows custom DNS. You may need to configure DNS within the VPN app.

Will it block ads in apps like YouTube?

Most ad-blocking DNS will not block ads served from the same domain as the video content (e.g., YouTube ads). It will block many third-party trackers and banner ads in other apps.

Is it safe to use a third-party DNS?

Yes, as long as you choose a reputable provider. They see your DNS queries, so review their privacy policy. The encryption (DoT/DoH) prevents your ISP from seeing them, but the provider itself sees them.

How do I turn it off?

On Android, go to Private DNS and select Off. On iPhone, go to Settings > General > VPN & Device Management, tap the DNS profile, and choose Remove Profile (or disable it in DNS settings).

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →