
Let me start with something important: not all ads are bad.
Plenty of small blogs, hobby sites and independent creators rely on ads to stay online, and I think it's worth supporting the ones that are clean and respect your privacy.
The problem is that a lot of online advertising isn't just a banner or two. It's aggressive, it tracks everything you do, and some of it even carries malware, especially on dodgy streaming sites or links that kids can click by accident.
That's why I installed Pi-hole. Not to block everything, but to stop the unethical rubbish: auto-playing videos, pop-ups, hidden trackers and all the junk that slows devices down and puts privacy at risk.
If, like me, you've got a house full of children, Pi-hole is a game-changer. It works on every device on your network (tablets, smart TVs, phones, consoles and laptops) without installing anything on each one. Here's exactly how I did it with a Raspberry Pi 3B and some free software.
What is Pi-hole?
Pi-hole is a free, open-source DNS filter. Every time a device wants to load something, it first asks a DNS server "what's the address for this name?". Pi-hole answers those questions for your whole network, and when the name belongs to a known ad server, tracker or malware domain, it simply refuses to give out the address. The ad never loads.
Because the junk never downloads, pages often load noticeably faster and you use less data. How much faster depends on the site: ad-heavy pages improve the most.
What you'll need
Here's everything I used:
| Item | What it's for |
|---|---|
| Raspberry Pi 3B | The little computer that runs Pi-hole |
| microSD card (8 GB or bigger) | Holds the operating system and software |
| Official 5V 2.5A micro-USB power supply | A weak supply is the most common cause of a flaky Pi |
| Ethernet cable (or Wi-Fi) | Connects the Pi to your home network. Ethernet is more reliable |
| Access to your router's settings | So you can point your network at Pi-hole |
STEP 1Get the Raspberry Pi ready
If your Pi doesn't already have Raspberry Pi OS on it (it used to be called Raspbian), here's how to set it up:
- Download Raspberry Pi Imager from the official Raspberry Pi website.
- Put your microSD card into your computer.
- In Imager, choose your Pi model, then Raspberry Pi OS Lite (you don't need a desktop for this).
- When Imager asks about OS customisation, set a username and password, and turn on SSH. There's no default "pi/raspberry" login any more, so this step matters.
- Write the card, put it in the Pi, and power it on.
- Plug the Pi into your router with an Ethernet cable (Wi-Fi works too, but wired is more dependable).
STEP 2Give the Pi a fixed address
Every device on your network will be sending its DNS questions to the Pi, so its address must never change. The easiest way is a DHCP reservation on your router: find the Pi in the router's list of connected devices and choose "always use this IP address" (the wording varies between routers). Make a note of the address, for example 192.168.1.2.
STEP 3Update the operating system
Connect to the Pi over SSH (or use a keyboard and screen) and run:
sudo apt update
sudo apt full-upgrade -y
This installs the latest security patches and fixes before we add anything new.
STEP 4Install Pi-hole
Now for the main event. In the terminal, run:
curl -sSL https://install.pi-hole.net | bash
Follow the on-screen steps. You'll be asked to:
- Choose your network interface (
eth0for wired,wlan0for Wi-Fi) - Confirm the Pi has a fixed IP address (that's why we did Step 2)
- Pick an upstream DNS provider. I went with Cloudflare, but Google or Quad9 are fine too
- Make a note of the admin page address and password at the end. You'll need them to log in
If you lose the password, you can set a new one with:
pihole setpassword
STEP 5Point your router at Pi-hole
Now the network needs to actually use it.
- Log into your router. It's usually something like
192.168.1.1,192.168.0.1or, on BT hubs,192.168.1.254. - Find the DNS settings for your local network (often under LAN or DHCP settings).
- Replace the DNS servers with the IP address of your Raspberry Pi.
- Don't add a public DNS server as a second option, or devices will use it to sneak round Pi-hole.
- Save the changes and restart the router.
From now on, every device on your home network uses Pi-hole, with nothing to install on phones, tablets or game consoles.
STEP 6Test the setup
Here's how I made sure it was working:
- I visited some ad-heavy websites, and almost all the ads were gone
- I opened the Pi-hole admin page at
http://your-pi-ip/admin - On the dashboard I could see ads and trackers being blocked in real time
It felt great knowing the kids' tablets were now safer and quicker to use.
If a device still shows lots of ads, restart it (or turn its Wi-Fi off and on) so it picks up the new DNS setting.
STEP 7Customise and tweak
Pi-hole works well out of the box, but you can fine-tune it:
- Add extra blocklists for stricter filtering. I used the lists from firebog.net
- Add sites you trust or want to support to the allowlist (it used to be called the whitelist)
- Check which devices are making the most requests, which is very handy if something is misbehaving
In a busy household that last one is really useful. I could see when a game or app was sending a huge number of requests and deal with it.
STEP 8Keep it running smoothly
A few things I did regularly to keep it in shape:
pihole -up
sudo apt update && sudo apt full-upgrade -y
- Update Pi-hole and the operating system every month or so
- Update your blocklists (Tools > Update Gravity in the admin page, or
pihole -g) - Have a look through the query log for anything unusual
Why I loved Pi-hole (especially in a family home)
These are the real benefits I noticed while it was running, with kids in the house:
| Benefit | What it meant for me and my family |
|---|---|
| Faster browsing | Pages load quicker without all the ad scripts |
| Less junk online | Fewer distractions and safer websites |
| Less data used | Ads eat a lot of data, so blocking them helps |
| One central setup | One box covered every device |
| Safer for the kids | Blocks known malware domains and nasty trackers |
Troubleshooting
If you run into problems, here's what helped me:
| Problem | Fix |
|---|---|
| Still seeing ads | Double-check the router's DNS settings, make sure there's no second DNS server, then restart the device |
| Nothing will load | Check the Pi is powered on and still has the same IP address. As a quick fix, put the router's DNS back to automatic |
| One site or app has broken | Look in the query log for blocked domains around that time and add the right one to the allowlist |
| Sluggish performance | Restart the Pi and check the power supply is up to the job |
Final thoughts
Setting up Pi-hole on my Raspberry Pi 3B was one of the most useful and satisfying DIY tech projects I've done. It sped up our internet, cut down distractions and made our home network safer, especially for the kids.
Remember, this isn't about blocking every ad, just the nasty ones. I still support the websites I care about, and I hope you will too.
My Pi 3B has since been taken over for retro gaming. I meant to buy a second one just for Pi-hole, and I still haven't got round to it.
If you want to go a step further and stop sharing your DNS lookups with an outside provider, read my guide on adding Unbound to Pi-hole. Let me know how your setup goes, and happy ad blocking!


