Pi-hole, or How to Block Trackers on the Smart TV You Can't Install Anything On
Browser extensions are great, but they only protect the browser. Your TV, your game console, the cheap smart plug, the weather app on your partner's phone: none of them run uBlock Origin. They all do something, though, before they talk to any server. They look up a domain name. Pi-hole sits right at that moment.
Here's the idea. Pi-hole is a DNS server you run on your own network, traditionally on a Raspberry Pi (hence the name) but any small always-on Linux box or a Docker container works. You point your router or your devices at it. Every time something on your network asks "where is this domain?", Pi-hole checks it against blocklists. If it's a known ad or tracking domain, Pi-hole answers with nothing useful and the request dies there. If it's fine, Pi-hole passes the question along to a real resolver and caches the answer.
That's it. No software on the devices, no certificates, nothing to break inside apps. And because it works at the DNS level, it covers everything that uses your network's DNS.
What you get
The obvious win is fewer tracker connections from devices you otherwise have no control over. Smart TVs in particular phone home a lot, and Pi-hole will show you exactly how much. That's the part I find most useful, honestly: the query log. Watching which devices look up which domains, and how often, is an education. You'll notice things you didn't know your gadgets were doing.
It's also open source, free, and has been around long enough to have a large community and well-maintained blocklists. Version 6, released in early 2025, was a big cleanup. The web interface and a new REST API are now built into Pi-hole's own engine (FTL), so it no longer needs a separate web server and PHP, and the settings moved into a single commented config file at /etc/pihole/pihole.toml. If you're reading an older tutorial that talks about lighttpd, that's why it doesn't match what you see.
Pi-hole dashboard showing total queries, percentage blocked and the top blocked domains
What it can't do
DNS blocking is blunt. It can only block entire domains. If ads come from the same domain as the content (YouTube is the classic example), Pi-hole can't separate them. Same goes for sponsored posts in social media apps. Keep a content blocker in your browser for that.
Some devices ignore your DNS settings. Certain apps and devices use hardcoded DNS servers or their own encrypted DNS, and those requests go straight past Pi-hole. You can fight that with firewall rules on a capable router, but it's extra work.
Blocklists can break things. A shopping link from an email might not open because the tracking redirect is blocked. An app might misbehave. You'll occasionally need to allowlist a domain, and if other people live with you, you're now their help desk. I'd start with the default list and add more only if you want to, not five huge lists on day one.
It's also a single point of failure. If the Pi dies or the SD card corrupts, nobody in the house can resolve anything. Many people run a second Pi-hole, or at least know how to switch the router back to normal DNS quickly.
And it's not encryption. Pi-hole still forwards your allowed lookups to an upstream resolver, in the clear unless you set something up. Pi-hole's own documentation has a guide for pairing it with unbound, a recursive resolver that asks the authoritative DNS servers directly instead of sending everything to one big provider. The tradeoff, per that guide, is that the first lookup for an unfamiliar domain can be noticeably slower before caching kicks in.
Getting started
The official install is a one-line script, or you can use the official Docker image. After that, the important step is telling your network to use it, usually by changing the DNS server your router hands out via DHCP. If your router won't let you change that, Pi-hole can act as the DHCP server itself.
One thing I'd do right away: set a strong admin password (the installer gives you one, and pihole --help lists the command to change it), and don't expose the admin page or the DNS port to the internet. Pi-hole is for your local network only.
If you're looking for one self-hosting project to start with, this is a good one. It's useful the same day, it teaches you how DNS works, and if something goes wrong the fix is usually to point the router back at your old DNS while you sort it out.

Comments