Anyone with kids and a tablet knows the drill: a free game, and every thirty seconds an ad. Sometimes for another game, sometimes for something you really don’t want your kids to see. Add websites that are one tap away from an innocent search, and apps that quietly phone home to a dozen tracking companies.
At home I solve most of this with one small device: a Pi-hole on a Raspberry Pi. In this post I’ll show exactly how it’s set up, what it blocks (I tested it), and just as important, what it can’t do.
What Pi-hole does
Every device on your network constantly looks up names: before a game can show an ad from ads.example-network.com, it has to ask a DNS server for that name’s IP address. Pi-hole is that DNS server. It answers normally for everything, except for names on its blocklists. For those it answers 0.0.0.0: nowhere. The ad never loads, the tracker never reports, the website never opens.
Because it works at the network level, it protects every device at once: tablets, phones, consoles, smart TVs, without installing anything on them. And it works inside apps and games, where browser ad blockers can’t reach.
My setup
- Hardware: a Raspberry Pi 3 B+ (yes, from 2018). With over 600,000 blocked domains it uses about 16% of its memory and is bored most of the day.
- Software: Pi-hole v6, forwarding allowed lookups to Cloudflare (
1.1.1.1). - Network: the router hands out the Pi-hole as the only DNS server, so every device uses it automatically.
- Privacy: query logging is switched off. I want to filter, not to read along with what my family does online.
The key idea: strict by default
Pi-hole can apply different blocklists to different groups of devices. Most guides set up a special group for the kids’ devices. I did it the other way around:
- Every device Pi-hole doesn’t know lands in the Default group, which gets the strictest filtering.
- The adults’ own devices are added by name to a lighter group that only blocks ads and trackers.
Why this way? Because the risky devices are exactly the ones you forget: a new tablet from a birthday, a friend’s phone, a console, a smart TV. And modern phones and tablets use a private Wi-Fi address that differs from the hardware address, so you can’t reliably recognize a device anyway. With strict-by-default, anything new is protected from the first minute, and only devices I consciously add get more freedom.
| Group | Who | Blocklists |
|---|---|---|
| Default (strict) | Every unknown device: kids’ tablets and consoles, guests, new devices | StevenBlack hosts, HaGeZi Ultimate, HaGeZi NSFW, HaGeZi Gambling, HaGeZi DNS bypass, and YouTube |
| Normal | The adults’ named devices | HaGeZi Multi (ads, trackers, malware) |
The blocklists
All lists except one come from HaGeZi’s DNS blocklists: well maintained, updated several times a day, and with very few false positives.
- StevenBlack hosts and HaGeZi Ultimate: ads, trackers, malware and phishing. Ultimate is HaGeZi’s most aggressive level, and it’s what catches the ad networks inside games.
- HaGeZi NSFW: adult content.
- HaGeZi Gambling (medium): casinos and betting, including the Dutch ones. The full list is seven times bigger; medium covers everything I tested and keeps the Pi fast.
- HaGeZi DoH/VPN/Proxy bypass: encrypted DNS services, VPNs and proxies. More on why below.
Adding them is a matter of pasting the URL under Lists in the Pi-hole interface, assigning the right groups and running Update Gravity:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/adblock/ultimate.txt
https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/adblock/nsfw.txt
https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/adblock/gambling.medium.txt
https://cdn.jsdelivr.net/gh/hagezi/dns-blocklists@latest/adblock/doh-vpn-proxy-bypass.txt
YouTube is blocked for the strict group with two regex rules under Domains, so it doesn’t become an endless video feed on the kids’ devices:
(\.|^)youtube\.com$
(\.|^)googlevideo\.com$
Ads in mobile games
Free games earn money through advertising SDKs: libraries from ad networks that fetch ads from the network’s own servers. Those servers have recognizable names, and that is exactly what DNS blocking is good at. I tested the big ones from a device in the strict group:
| Ad network | Used in | Result |
|---|---|---|
| Google AdMob | A huge share of Android and iOS games | ✓ Blocked |
| Unity Ads | Games built with Unity | ✓ Blocked |
| AppLovin | Many casual and puzzle games | ✓ Blocked |
| ironSource | Mobile games, ad mediation | ✓ Blocked |
| Vungle (Liftoff) | Video ads in games | ✓ Blocked |
| Chartboost | Ads for other games | ✓ Blocked |
| InMobi | Mobile ads | ✓ Blocked |
| Meta Audience Network | Ads in apps | ✓ Blocked |
| Adjust, Branch, Firebase Analytics | Tracking and attribution | ✓ Blocked |
Before I added the stricter lists, the lighter ads-only list let Vungle, Chartboost, InMobi and Adjust through. The difference between blocklists is real, so test with the networks that matter to you.
What your kids will notice Games with rewarded ads (“watch a video for 50 extra coins”) will say no ad is available. Most games simply carry on; the occasional game refuses to work without its ad server. For those you can allow a single domain, which you find in Pi-hole’s query log (temporarily switch logging on while testing).
Results: what is blocked and what still works
| Category | Tested with | Strict group |
|---|---|---|
| Game ads | AdMob, Unity Ads, AppLovin, ironSource, Vungle, Chartboost, InMobi | ✓ Blocked |
| Adult content | Large adult websites | ✓ Blocked |
| Gambling | International and Dutch casino and betting sites | ✓ Blocked |
| DNS bypass | Google, Cloudflare, Quad9 and OpenDNS encrypted DNS | ✓ Blocked |
| YouTube | youtube.com | ✓ Blocked |
| Games and stores | Roblox, Minecraft, Nintendo, PlayStation, App Store, Play Store | Works |
| School and info | Wikipedia | Works |
You can test this yourself from any computer: ask your Pi-hole directly and look at the answer. 0.0.0.0 means blocked.
nslookup googleads.g.doubleclick.net 192.168.0.37
nslookup www.roblox.com 192.168.0.37
Why block encrypted DNS?
Pi-hole only works if devices actually ask it. Browsers and apps increasingly use DNS over HTTPS: they send their lookups encrypted to Google or Cloudflare instead, straight past your Pi-hole. Sometimes that’s a setting a curious kid finds, sometimes the app does it on its own.
The bypass list blocks the names of those encrypted DNS services, plus well-known VPN and proxy services. Pi-hole also answers the special domains that Firefox and Apple’s iCloud Private Relay check first, so those fall back to normal DNS by themselves.
What Pi-hole can’t do
DNS filtering is a strong first layer, not complete parental control. Be honest with yourself about the gaps:
- Mobile data: on 4G or 5G a phone doesn’t use your home network at all. Use the parental controls built into the device (Screen Time on iOS, Google Family Link on Android) for phones that leave the house.
- Hard-coded DNS servers: a device can ask
8.8.8.8directly by IP address, and no blocklist stops that. Close that gap in your router: only allow DNS traffic (port 53, and port 853 for DNS over TLS) to the Pi-hole. - Content inside allowed apps: chat in an online game, or a video inside an app that is allowed, can’t be filtered by name. Age settings in the game or platform matter there.
- Ads from the same domain as the content: some platforms serve ads from their own servers. DNS can’t separate those from the content without blocking both.
And the most important layer isn’t technical at all: talking with your kids about what they see online. The Pi-hole just makes sure those conversations are about the exceptions instead of every thirty seconds.
Getting started
- Install Pi-hole on a Raspberry Pi (any model from the 3 onwards is enough) or in a container, following the official documentation.
- Set the Pi-hole as the only DNS server in your router’s DHCP settings.
- Add the strict blocklists to the Default group.
- Create a lighter group for the adults’ devices and add those devices by name under Clients.
- Run Update Gravity and test with
nslookup, from a device in each group. - In the router, block outgoing DNS that doesn’t come from the Pi-hole.
