Raspberry Pi network server with ethernet cables

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.

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.

It is one of the highest-impact things you can build in a weekend. A £40 Pi, an SD card, and an hour of setup is enough to clean up the most annoying parts of the modern web for everyone in the house. This guide walks through what Pi-hole actually does, why it matters in 2026, the hardware you need, and a step-by-step setup that works on the first try.

What Pi-hole Actually Does

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.

Because this happens at the network level, it works on every device automatically. There is nothing to install on your phone, no browser extension to remember, no toggling things on for guests. If a device uses your Wi-Fi, it is protected.

Why Every Smart Home Needs One

Privacy, performance, and a window into what your devices are doing

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.

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.

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.

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.

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.

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 You'll 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: Flash Raspberry Pi OS to the SD Card

10 minutes

1

Download Raspberry Pi Imager

Free official tool from raspberrypi.com. Available for Windows, Mac, and Linux.

2

Choose the right OS

Pick Raspberry Pi OS Lite (64-bit). Lite means no desktop — Pi-hole is headless, you do not need one.

3

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.

4

Write the image

Insert the SD card, click Write. Takes 3–5 minutes depending on card speed.

Step 2: First Boot and Find the Pi on Your Network

5 minutes

Plug the SD card into the Pi, connect Ethernet to your router, then plug in power. The first boot takes about a minute as the OS expands the filesystem and configures itself.

1

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`).

2

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.

3

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: Install Pi-hole

5 minutes

Pi-hole's installer is a single curl command. From your SSH session, run:

curl -sSL https://install.pi-hole.net | bash

An interactive installer walks you through the choices. Sensible defaults for first-timers:

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: Point Your Network at Pi-hole

The step that actually turns on the magic

Installing Pi-hole alone does nothing — your devices are still asking your router or ISP for DNS. You need to redirect them. The right way to do this is in your router, in one place, so every device picks it up automatically.

1

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.

2

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.

3

Set Primary DNS to your Pi-hole's IP

Use the static IP you reserved in Step 2.

4

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.

5

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: Verify It's 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.

Common Issues (and How to Fix Them)

The 90% of problems people actually hit

Some sites have broken images or weirdly missing buttons
A blocklist is too aggressive. Open the dashboard, find the broken request in the Query Log, and click Allowlist. Default lists are well-tuned, but a small percentage of sites use ad domains for legitimate functionality.
Block percentage is suspiciously low (under 5%)
Devices are bypassing Pi-hole. Most common culprits: a secondary DNS in your router pointing at 1.1.1.1; a device with a manually set DNS (often Chromecast or some smart TVs hardcode 8.8.8.8); a guest network bypassing your main DNS. Either remove the bypass or add the bypass IP to your router's outbound block list.
YouTube ads still play
YouTube serves ads from the same domain as the videos themselves, so DNS blocking cannot separate them. Pi-hole cannot block YouTube ads. Use a browser extension like uBlock Origin on top, or pay for YouTube Premium.
DNS is slow now
Almost always a Wi-Fi-connected Pi or a slow upstream DNS. Move to Ethernet, switch upstream to Cloudflare (1.1.1.1) or Quad9 (9.9.9.9), and the entire network will feel faster than it did before Pi-hole.
Should I run two Pi-holes for redundancy?
If you can. A single Pi-hole is a single point of failure for your entire network's DNS — when it dies, nothing resolves. A second Pi (or Pi-hole running in Docker on a NAS) is the right answer. Tools like keepalived or gravity-sync keep two Pi-holes' blocklists in sync.
Is Pi-hole legal?
Yes. You are choosing what your own network does with DNS queries you send through it. There is no copyright or content restriction involved.

Pi-hole vs the Alternatives

When something else fits better

Pi-hole is the right answer for most people who want network-wide blocking and are happy to maintain a small device. There are alternatives worth knowing about:

Feature Best Value Pi-hole (self-hosted) ★★★★★ 4.8 AdGuard Home (self-hosted) ★★★★★ 4.6 NextDNS (cloud) ★★★★★ 4.5 Best Overall uBlock Origin (browser only) ★★★★★ 4.9
Price
Rating 4.8/54.6/54.5/54.9/5
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 No (browser only)
Detailed query log
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 to Go Next

Three good follow-ups once Pi-hole is humming

1
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.

2
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.

3
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.

The Bottom Line

Why this is one of the highest-leverage smart home builds

A weekend, £55, and a few terminal commands buys you network-wide ad blocking, IoT-device transparency, and faster page loads on every device for the next decade. There is no monthly fee, no app to install, no privacy trade-off — Pi-hole runs on your hardware, in your house, answering only to you.

If you've been on the fence about a Raspberry Pi project, this is the one to start with. The setup is quick enough to do on a Saturday morning, the impact is immediate the moment you point your router at it, and the dashboard is genuinely fun to look at — there is something satisfying about watching thousands of trackers get punched into a black hole, in real time, on hardware the size of a deck of cards.

Already have a Pi?

Pi-hole runs happily alongside Home Assistant on the same Raspberry Pi — read our complete setup guide for the full smart home base.

Read the Home Assistant Pi guide