Pi-hole
Network-wide DNS ad blocker that filters advertisements and tracking domains for every device on your network. No app installation needed on phones, TVs, or smart home devices
Quick Start
docker run -d --name pihole -p 53:53/tcp -p 53:53/udp -p 80:80 -e TZ=Europe/London -v pihole:/etc/pihole -v dnsmasq:/etc/dnsmasq.d --restart=unless-stopped pihole/pihole:latest Overview
Pi-hole is a DNS sinkhole that blocks advertising and tracking domains before they reach any device on your network. Instead of installing a browser extension on every device, you configure your router to send DNS queries through Pi-hole. Any request to a domain on the blocklist returns a null response, and the ad or tracker never loads. Smart TVs, phones, tablets, smart speakers, and IoT devices all get the blocking without any software installed on them.
The query log is one of Pi-hole’s most revealing features. It shows every DNS request from every device on your network in real time — the domain, which device asked for it, whether it was blocked, and how fast it resolved. Many people who set up Pi-hole to block ads discover it also exposes how frequently their devices contact manufacturer telemetry servers, ad networks, and data brokers in the background.
Custom local DNS is a secondary use case that matters in self-hosted setups. You can create DNS entries that map hostnames like grafana.home or nextcloud.home to internal IP addresses. This gives your self-hosted services readable URLs on your local network without needing to remember port numbers or configure hosts files on every machine.
The limits are worth understanding. DNS blocking cannot remove ads that are served from the same domain as legitimate content — YouTube serves its ads this way, which is why Pi-hole does not block them. Apps that hardcode DNS-over-HTTPS connections to specific resolvers bypass Pi-hole entirely, which affects some browsers and mobile apps by default.
Setting Pi-hole as your network DNS requires access to your router’s DHCP settings. Most consumer routers support this, but the exact steps vary.
Pi-hole: Pros & Cons
| Pros (The Wins) | Cons (The Friction) |
|---|---|
| Network-wide blocking: Every device protected without installing software on each. | Inline ads survive: YouTube and same-domain ads cannot be DNS-blocked. |
| Full query visibility: See every DNS request from every device, blocked or not. | Router config required: Must set Pi-hole as DNS server on your router. |
| Local DNS entries: Map hostnames to local IPs for self-hosted services. | DoH bypass: Apps using DNS-over-HTTPS can skip Pi-hole entirely. |
| 59k stars: Nearly a decade of community blocklist maintenance. | Network risk: Misconfigured DNS breaks internet for the whole network. |
Use Cases
Specific ways to use Pi-hole for your workflow.
Deployment Strategy
Recommended ways to host Pi-hole in your own environment.