How to block porn on your Android phone
For your own phone, not a kid's. Hostnames tested on 16 October 2026.
Last checked . Hostnames tested live by us. Menus from Google's and Samsung's guides for Android 17 and One UI 8.5.
The short answer
Open Settings > Network & internet > Private DNS. On a Samsung it's Settings > Connections > More connection settings > Private DNS. Choose Private DNS provider hostname, type family.cloudflare-dns.com and tap Save. That one setting stops every app on your phone from reaching adult sites, on Wi-Fi and on mobile data.
Before you start
Android has no adult filter for an adult's own phone, so this guide uses Private DNS: one setting that filters every app, on Wi-Fi and mobile data. It takes about 5 minutes.
Step 1: Turn on Private DNS (2 minutes)
On a Pixel or most Android phones:
- Open Settings > Network & internet > Private DNS. If you can't find it, search Settings for "Private DNS".
- Choose Private DNS provider hostname.
- Type one of the hostnames below, exactly as written.
- Tap Save.
On a Samsung Galaxy, the setting lives at Settings > Connections > More connection settings > Private DNS. The rest is the same.
| Hostname to type | Run by | What we saw in our test |
|---|---|---|
family.cloudflare-dns.com |
Cloudflare | Blocked all 42 adult sites. Locks Google SafeSearch |
family.adguard-dns.com |
AdGuard | Blocked all 42. Locks SafeSearch and YouTube Restricted Mode. Also blocks ads |
adult-filter-dns.cleanbrowsing.org |
CleanBrowsing | Blocked all 42. Locks SafeSearch |
Not sure? Start with Cloudflare's. If YouTube is part of your nights, pick AdGuard's, the only one in our test that put YouTube into Restricted Mode.
Worth knowing. Type a name, never a number. Private DNS only takes a hostname, so
1.1.1.3won't work there even though it's the same filter. Andsecurity.cloudflare-dns.comlooks right but only blocks malware. Adult sites sail through it.
Worth knowing. If your phone says "No internet access" right after you save, check the spelling first. Android cuts the connection when it can't reach your filter, instead of quietly letting everything through. That's annoying for ten seconds and exactly what you want at 1am.
Step 2: Stop Chrome from going around it
Chrome has its own secure DNS setting. Left on its default, it keeps using your filter. That's on purpose: Chrome's engineers built it to keep family filters working.
The trap is picking a provider yourself. In Chrome, open Settings > Privacy and security > Use secure DNS and make sure it isn't set to Google, Cloudflare (1.1.1.1) or a custom provider. Any of those sends your lookups around the filter.
Step 3: Blur what gets sent to you (30 seconds)
If you use Google Messages, open its settings and go to Protection & safety > Manage sensitive content warnings. Turn it on and nude images people send you arrive blurred. It runs on your phone, and for adults it's off until you switch it on.
Step 4: Make it hard to undo
Here's the honest part. Android has no passcode lock for Private DNS. Anyone holding your phone, including you at 1am, can switch it off in a few taps.
So the goal isn't a wall. It's making "off" slower than the urge.
- Pick the long hostname.
adult-filter-dns.cleanbrowsing.orgis a pain to type from memory. Switching it off takes seconds, but putting it back the next morning means looking it up again, and that small hassle is what stops "just for tonight" from turning into every night. - Tell one person you did it. Researchers who followed more than 8,000 people using a blocker found they slowly loosened their settings, each time planning to tighten them again soon. A friend who texts "still on?" once a week makes soon come sooner. If there's nobody you'd tell, write the date you set it up on a sticky note on your desk.
- Keep the phone out of bed. No setting beats a charger on the other side of the room.
What this won't catch
Private DNS is strong, but it has a few blind spots worth knowing.
- Reddit and X stay open. So do Telegram and Discord. A filter judges a whole site, and these sites are mostly not adult. None of the filters we tested touched them. If one of them is where your nights go, delete the app for a month.
- Apps that bring their own DNS. A few apps and browsers look up addresses their own way and skip Private DNS.
- VPN apps. How Private DNS behaves with a VPN running depends on the phone and the VPN. Assume a VPN can switch your filter off.
- Some networks block it. Some carriers and Wi-Fi networks block the connection Private DNS uses. Your phone then shows "No internet access", and the tempting fix is turning the filter off. Switch networks instead.
What a blocker can't do
A filter turns a door into a wall. It can't tell you what to do while you're standing there.
That moment, the site won't load and the urge is still there, is the one that actually changes the habit. Urges rise and then ease, often within minutes. Urge surfing is a way to stay with one until it does, with your headphones in and the phone face down. And if you keep ending up in the same spot at the same hour, this explainer on the habit loop shows why.
Sherpa, the app we're building, is made for that moment. It's a few weeks out.
One thing to try tonight: before you get into bed, put the phone on your desk and leave it there.
Questions people ask
- What's the Private DNS code to block adult sites?
Type
family.cloudflare-dns.com,family.adguard-dns.comoradult-filter-dns.cleanbrowsing.orginto Private DNS provider hostname. All three blocked every adult site in our October 2026 test.- Does Private DNS work on mobile data?
Yes. Google says your phone uses it on every network that allows it, mobile data included. If a network blocks it, you'll see "No internet access" rather than an unfiltered connection.
- How do I block porn on a Samsung phone?
Go to Settings > Connections > More connection settings > Private DNS, choose Private DNS provider hostname and type one of the hostnames above.
- Can I put parental controls on my own Android phone?
Not Google's. Family Link is built for kids. Private DNS does the job on an adult's phone, and it covers more than most parental controls do.
- Why does my phone say "Private DNS blocked by work policy"?
An employer or school manages your phone and has locked that setting. You can't change it yourself. A family filter on your home Wi-Fi still works when you're on that network.
- How do I block porn permanently on Android?
No phone setting is permanent, and anything you can turn on you can turn off. What works is making "off" slower than the urge, which is what Step 4 is for.