One Android setting blocks ads without installing anything
The short version
Android has had an ad blocker sitting in Settings since 2018. It's one text field, it needs no app, but it won't touch YouTube.
Android has had an ad blocker in its Settings app since 2018. Nobody calls it that and it isn’t labelled that way, so most people scroll straight past it on the way to changing their ringtone.
It’s called Private DNS, and I run it on my own Pixel. You don’t install an app and you don’t make an account. You type one line into a text field, and a large share of the ads inside your apps and on websites stop loading, on Wi-Fi and on mobile data alike.
Settings → Network & internet → Private DNS
○ Off
○ Automatic
● Private DNS provider hostname
dns.adguard-dns.com
That’s the path on a Pixel. On a Samsung it’s under Connections, then More connection settings, and on anything else you can type “Private DNS” into the search bar at the top of Settings. Pick the third option, type the hostname exactly as written and save, and any phone on Android 9 or newer will take it.
Before your phone can load anything, it has to look up where that thing lives, the same way a taxi driver needs an address and not just the shop’s name. Normally your telco answers those lookups, whether that’s Singtel, StarHub or M1. This setting hands the job to AdGuard, a company that makes ad blockers and runs a free lookup service. It refuses to answer for any name on its public list of ad and tracking servers, which ran to a little over 180,000 lines when I looked this month.
The ad isn’t being hidden on your screen. Your phone asks where it lives, gets told nowhere, and never fetches it.
It won’t touch YouTube, which is what the thirty-second videos about this trick leave out. The block only works on ads that come from a separate ad server, and that covers most banners in free apps and most ad slots on news sites. YouTube sends you the advert from the same servers as the video you wanted, and Instagram, TikTok and Facebook do the same with sponsored posts, so the only way to block those would be to block the whole app.
Three things will break, and all of them are easy to live with. Sponsored links at the top of Google stop opening when you tap them, so scroll down to the ordinary result. “Watch an ad for a reward” buttons in games may spin forever. And public Wi-Fi with a login page, the kind you get at airports and hotels, can leave you with no connection at all. When that happens, switch Private DNS back to Automatic, sign in, then switch it on again.
You’re also choosing who sees your lookups. Whoever answers them can see the name of every site your phone reaches for, though not what you did there. By default that’s your telco, and after this change it’s AdGuard, a company registered in Cyprus.
Do your own phone now, then borrow your parents’ phones this weekend and do the same. Fewer ads on their screens means fewer fake “your phone has a virus” banners for them to tap, which is a better return on two minutes than most things you’ll do for them this year.
iPhones don’t have this text field. The same service works there through a small settings profile from AdGuard’s site, which is a few more taps. The other hostnames, including a family one that blocks adult sites on a child’s phone, are listed here.
Questions people ask about this
- How do I block ads on Android without installing an app?
- Open Settings, go to Network & internet, then Private DNS. Choose Private DNS provider hostname, type dns.adguard-dns.com and save. Ads and trackers served from separate ad servers stop loading on both Wi-Fi and mobile data. It works on Android 9 and newer.
- Does Private DNS block YouTube ads?
- No. YouTube sends adverts from the same servers as the videos, and Instagram, TikTok and Facebook do the same with sponsored posts. A DNS service can only say yes or no to a server name, so it cannot block those ads without blocking the app.
- What breaks when you turn on an ad-blocking Private DNS?
- Sponsored links at the top of Google stop opening, some watch-an-ad-for-a-reward buttons in games stop loading, and public Wi-Fi networks with a login page can fail to connect. For the last one, switch Private DNS to Automatic, sign in, then switch it back.