Block ads on iPhone without an app

No iPhone setting blocks ads out of the box. But iOS accepts a small file that sends every name lookup to an ad-blocking DNS, for Safari and for apps alike. Here’s how it works and what it removes.

Why a file, and not just a setting

iOS lets you change the DNS by hand, but one Wi-Fi network at a time, unencrypted, and never on mobile data (Apple). For the whole device and encrypted, Apple has offered a configuration profile since 2020 (Apple, WWDC 2020). Installed by hand, it also covers mobile data (Apple).

The file holds no program. It only tells iOS which server to ask, and iOS shows you what it will change before installing it.

Install the setting

  1. On the iPhone, open the AdHole DNS page in Safari and tap “Install the setting”. Allow the download.
  2. Open Settings and tap “Profile Downloaded” at the top. Tap Install and enter your passcode. iOS says “Unsigned”: the file carries no signature, which stops nothing.
  3. In Settings → General → VPN & Device Management → DNS, check that AdHole DNS is ticked.

Then go back to the page: its test button tells you whether the iPhone really goes through the filter. AdHole DNS is free, needs no account and keeps no site names.

What it removes, and what stays

The filter works on server names. It removes what comes from an ad network, in Safari and in apps alike: banners, full-page ads, the videos in many games, and a good share of the tracking.

It leaves what comes from the same server as the content: ads in the YouTube app, and Twitch, Netflix and Prime Video ads. It won’t hide the space a blocked ad leaves, and it won’t reject cookie banners.

If something stops working

A site or app won’t open? The profile comes off in ten seconds: Settings → General → VPN & Device Management → AdHole DNS → Remove Profile. The iPhone then goes back to its network’s DNS.

Before iOS 26, iOS doesn’t route around an encrypted DNS that has stopped answering. The setting asks iOS to check that our server answers when the network changes and, since iOS 26, allows it to fall back to the network’s DNS on failure; iOS makes that call. If no site opens at all, remove the profile.

Sources checked on November 1, 2026, linked in the text.