What Is Pi-hole and Why Every Smart Home Needs One
Pi-hole turns a £40 Raspberry Pi into a network-wide ad blocker that protects every device on your home network. Here's how to set it up.

<a href="https://en.wikipedia.org/wiki/Pi-hole">Pi-hole is a tiny piece of software, usually running on a Raspberry Pi, that blocks ads and trackers for every single device on your home network. Phones, laptops, smart TVs, robot vacuums, doorbells, fridges - anything that talks to the internet via your router gets the same protection automatically, with no apps to install on each device.
What does Pi-hole actually do?
DNS in plain English
Pi-hole is a DNS sinkhole. Every time a device on your network wants to load something - a webpage, an app screen, a smart bulb's cloud check-in - it first asks a DNS server: "what is the IP address for this domain?". Pi-hole sits between your devices and the wider internet and intercepts those questions.
If the domain being requested is a known ad network, tracker, or telemetry endpoint (think doubleclick.net, googlesyndication.com, analytics.example), Pi-hole answers with a fake address that goes nowhere. The ad never loads. The tracker never sees you. If the domain is anything else - your bank, your email, the actual page content - Pi-hole forwards the question to a real DNS server (Cloudflare, Quad9, your ISP, whatever you choose) and the page loads normally.
Why does every smart home need a Pi-hole?
Privacy, performance, and a window into what your devices are doing
shield
Block ads on every device
Smart TVs, mobile apps, and games can all be hard or impossible to ad-block individually. Pi-hole stops the ads at the DNS layer, before they even reach the device.
eye
See what your IoT junk is calling home
Smart bulbs, doorbells and TVs phone home constantly. Pi-hole's query log shows you exactly which domains and how often - often eye-opening for cheap or no-name brands.
zap
Faster page loads
Most ad and tracker scripts add 200ms–2s of latency per page. Blocking them at DNS makes the entire web feel snappier, especially on mobile data and older devices.
battery
Less data, lower power
Fewer requests means less mobile data, less battery on phones, and less cellular bandwidth on smart hubs that travel with you.
lock
Block telemetry you cannot opt out of
Many devices ignore privacy settings or send data anyway. Pi-hole is the only reliable way to enforce "no" at the network boundary.
layout
One place to manage it all
A web dashboard shows top-blocked domains, top requesters, and live queries. You can blocklist or allowlist anything in two clicks.
What kit do you need?
A complete £55 shopping list
You can run Pi-hole on almost anything that runs Linux - a spare laptop, a NAS, a Docker container, a virtual machine, an old desktop. The Raspberry Pi is the standard recommendation because it is small, silent, and uses about £4 of electricity a year. If you already have a Pi running Home Assistant, you can install Pi-hole on the same machine in five minutes.
Raspberry Pi 4 (2GB) or Raspberry Pi 5 (2GB)
Pi-hole barely uses any resources. A 2GB Pi 4 is more than enough; a Pi Zero 2 W will also work but is fiddlier. Around £35–£50.
Official 5V power supply (USB-C for Pi 4/5)
Don't use a random phone charger - undervoltage causes flaky DNS. £8–£12.
MicroSD card, 16GB or 32GB, A1 or A2 rated
Get a known-good brand: SanDisk Extreme, Samsung Evo Plus. Cheap no-name cards die. £6–£10.
Ethernet cable
Always run Pi-hole over Ethernet, not Wi-Fi. DNS goes through it constantly - Wi-Fi drops will take down your whole network's internet. £3.
Pi case (optional but recommended)
Even a £4 plastic case keeps the dust out and the heat down. £4–£15.
Step 1: How do you flash Raspberry Pi OS to the SD card?
10 minutes
Download Raspberry Pi Imager
Free official tool from raspberrypi.com. Available for Windows, Mac, and Linux.
Choose the right OS
Pick Raspberry Pi OS Lite (64-bit). Lite means no desktop - Pi-hole is headless, you do not need one.
Click the gear icon for advanced settings
This is the step almost everyone skips. Set a hostname (e.g. `pihole`), enable SSH, set a username and password, and set your Wi-Fi only as a fallback. You will SSH in later - there is no monitor.
Write the image
Insert the SD card, click Write. Takes 3–5 minutes depending on card speed.
Step 2: How do you find the Pi on your network?
5 minutes
Find the Pi's IP address
Open your router's admin page and look at the connected devices list - the Pi will appear as `pihole` or `raspberrypi`. Note the IP (it usually looks like `192.168.1.x`).
Reserve that IP
While you are in the router, find the DHCP reservation or static lease section and pin the Pi's MAC address to its current IP. Pi-hole's job is being a fixed point on your network - it cannot move.
SSH into the Pi
From your Mac/Linux terminal: `ssh [email protected]` (or whatever you set the username to). On Windows, use PowerShell or PuTTY. Enter the password you set in the Imager.
Step 3: How do you install Pi-hole?
5 minutes
curl -sSL https://install.pi-hole.net | bash
Network interface: eth0
The Ethernet port. Never pick wlan0.
Upstream DNS: Cloudflare (1.1.1.1) or Quad9 (9.9.9.9)
Both are fast and privacy-respecting. Avoid Google (8.8.8.8) if privacy is your goal.
Blocklists: keep the default
StevenBlack's Unified Hosts is excellent and ships pre-selected. You can add more later.
Install web admin interface: Yes
This is where you'll spend all your time. The dashboard is the best part.
Install web server (lighttpd): Yes
Required for the dashboard.
Log queries: Yes
You'll want to see what your devices are doing. You can disable or anonymise later if you want.
Privacy mode: 0 (show everything)
Easiest for learning what your network is up to.
When the installer finishes, it prints two things you must save: the dashboard URL (something like http://192.168.1.x/admin) and the admin password. If you missed it, run pihole -a -p to set a new one.
Step 4: How do you point your network at Pi-hole?
The step that actually turns on the magic
Log into your router admin page
Usually `192.168.1.1` or `192.168.0.1`. The login is normally on a sticker on the router itself.
Find the DHCP or LAN settings
Look for "DNS server" - sometimes called "Custom DNS" or "Manual DNS". It is normally set to "Use ISP" or auto.
Set Primary DNS to your Pi-hole's IP
Use the static IP you reserved in Step 2.
Leave Secondary DNS blank or set to the same Pi-hole IP
Critical: do NOT add a public DNS like 1.1.1.1 as secondary. Devices will randomly ignore the Pi-hole and you will think it is broken. If you want redundancy, run a second Pi-hole.
Save and reboot any device that has been on the network
Phones, laptops and TVs cache DNS settings until they reconnect. Reboot them once for a clean start.
Step 5: How do you verify it's actually working?
Two-minute confidence check
Open the Pi-hole dashboard at http://<pi-ip>/admin, log in, and watch the live query log on the front page for a few seconds. If you see queries scrolling past, traffic is reaching the Pi-hole - you're done with the network plumbing.
For an end-to-end test, visit a known ad-heavy site (a tabloid news site is a good one) on a device that should be using Pi-hole. The page should load noticeably faster, with fewer or no banner ads. Visit the dashboard's Query Log tab and you'll see hundreds of blocked requests for that single page load.
Which common issues come up and how do you fix them?
The 90% of problems people actually hit
Q01Some sites have broken images or weirdly missing buttons
Q02Block percentage is suspiciously low (under 5%)
Q03YouTube ads still play
Q04DNS is slow now
Q05Should I run two Pi-holes for redundancy?
Q06Is Pi-hole legal?
How does Pi-hole compare to the alternatives?
When something else fits better
| Pi-hole (self-hosted) | AdGuard Home (self-hosted) | NextDNS (cloud) | uBlock Origin (browser only) | |
|---|---|---|---|---|
| Upfront cost | ~£55 hardware | ~£55 hardware | £0 | £0 |
| Ongoing cost | £0 / year | £0 / year | £0 (up to 300k queries) – £17 / year | £0 / year |
| Network-wide | Yes | Yes | Yes | No (browser only) |
| Detailed query log | Yes | Yes | Yes | No |
| Setup time | ~30 min | ~30 min | ~10 min | ~1 min |
| Best for | DIYers, smart homes | Encrypted DNS built-in | No hardware, travels with you | Web ads on a laptop only |
Use uBlock Origin in the browser anyway, even if you have Pi-hole - it catches a different category of stuff (page-level annoyances, cookie banners, social widgets) that DNS blocking cannot touch. The two are complementary, not competing.
Where should you go next?
Three good follow-ups once Pi-hole is humming
Add Unbound for fully recursive DNS
Pi-hole forwards to Cloudflare/Quad9 by default. Adding Unbound makes Pi-hole resolve DNS itself, removing the upstream provider entirely. About 10 extra minutes of config.
Add a second Pi-hole
Once a household relies on Pi-hole, a single failure is painful. A second one - even a cheap Pi Zero 2 W - eliminates the single point of failure.
Combine with Home Assistant
Run Pi-hole and [Home Assistant on the same Pi](/blog/home-assistant-raspberry-pi-setup/). Use HA to alert you when Pi-hole goes down, or to graph blocked-query stats next to your energy data.
What's the bottom line?
Why this is one of the highest-leverage smart home builds