Before you put a Pi-hole in your house — the hardware is the cheap part

This is the version of DNS filtering that runs inside your house. Installing it is not the hard bit. The hard bit is that when it goes down, so does everything else.

The DNS filtering article compared two approaches and said a DNS service is the right answer for most households. So when is the other one worth it?

When you would rather the record of those questions never left your house. That is the reason Pi-hole exists, and the price of it is that you become responsible for keeping it alive.

What actually changes

With a DNS service, a record of “which addresses were looked up” sits with that company. A tool you switched on to reduce tracking has created a new record somewhere else. It is not a large problem, but it is the one some people want gone.

Pi-hole makes that decision inside your house. Neither the question nor the answer leaves.

What you need

One machine that stays powered on. The name makes people assume they have to buy a Raspberry Pi. They don’t.

  • A Raspberry Pi, the most common choice
  • A mini PC or laptop you no longer use
  • One container on a home server you already run

The electricity is close to nothing. At Raspberry Pi scale, leaving it on around the clock is not the kind of cost you notice. The exact figure depends on the machine, and it is not one we have measured, so no number here.

The part that matters more than installation

Here is the whole point of this article.

Once you put the Pi-hole’s address into your router as the DNS, every device in the house goes to that machine when it needs an address. If the machine is off, nobody gets an answer. The internet doesn’t get slower. It stops.

The same happens if the power lead gets knocked out, if the SD card wears out, or if an update takes longer to reboot than expected. And whoever is at home at the time only knows that “the internet is broken”, not why.

So prepare two things before you start.

  • Put a secondary DNS in alongside it. Router DNS settings usually have two fields. Pi-hole in the first, a public DNS in the second, and the house stays online when the Pi-hole dies. The trade is that filtering lapses for that period
  • Write down your original settings. Reverting takes thirty seconds, but without a note those thirty seconds become an hour

The router’s two DNS fields. Everything in the house arrives here, and the second field is the way out that keeps the house online when the first one has stopped answering.

① Every device in the house lands on the router’s DNS setting. ② The first field points at the machine in your house. ③ If that machine is off, nothing comes back — the internet does not slow down, it stops. ④ The second field is the way around it. ⑤ It keeps the house online, and it does not pass through the filter.

The first of those is a compromise. Perfect filtering means leaving the second field empty, which turns that one machine into a single point of failure for the whole house. If other people live there, take the compromise.

The order to set it up

  1. Install Pi-hole on the machine. The install script handles most of it
  2. It will ask you to set a static IP. Do it. If that address changes later, the router setting no longer matches and you get exactly the failure above
  3. Open the web admin page and check it is answering
  4. Point one device at it and live with that for a few days
  5. Only then change the router setting so the whole house uses it

Don’t skip step 4. Apply it house-wide first and you have no way to find out what broke.

Start with the default block list

Pi-hole lets you add lists to widen what gets blocked. Get greedy here and you get exactly the side effects covered in the DNS article: app stores that won’t open, payments that stall halfway.

Spend a week on the defaults, and widen only if nothing has broken.

What the admin page gives you

There is an unexpected benefit once it is running. You get a list of which device asked for what, and how many times, today.

If the device list tells you who is connected, this tells you what they are doing. You will watch something you assumed was idle call its manufacturer every few minutes, and that list may turn out to be the real value of the tool.

When something breaks, this is the loop

You will break a site. Everyone does, usually within the first fortnight, and the whole experience of running a Pi-hole comes down to how quickly you can undo it. The loop is short once you have done it once.

  1. Someone says a page or an app is not loading. Note roughly when
  2. Open the admin page, go to Query Log, and filter by that device
  3. Look for entries marked blocked around that time. The domain is usually obvious in hindsight: a link tracker a shop routes its own buttons through, or a payment provider’s analytics host sitting in the middle of a checkout
  4. Click it and choose allow. It takes effect immediately, with no restart
  5. If nothing obvious shows up, switch the Pi-hole off for five minutes with Disable and have them try again. That tells you whether it was the Pi-hole at all

Step 5 is the one to remember, because the temptation is to go hunting through lists when the problem was the ISP all along.

Keep a note of what you allowed and why. A year on, an allow list with twenty entries and no explanations is unreadable, and you will not dare remove any of them.

In short

Question Answer
Why this instead of a DNS service The record of your questions stays in the house
Do I need a Raspberry Pi No. Any machine that stays on
Biggest risk If it goes down, the house internet goes down
How to prepare Add a secondary DNS, even though filtering lapses
Don’t miss this at install The static IP
Where to start One device for a few days, then the house
Which block lists Defaults. Widen later

The hardware is the small part of this decision. The real cost is adding a single point of failure to your house, and it is only worth it when you can carry that.

Common questions

My phone shows ads on mobile data but not at home. Did the Pi-hole stop working?

It is working, and it only covers your house. A Pi-hole filters whatever uses it as a DNS server, which means devices on your own network. Step outside and the phone uses the carrier’s DNS instead. This is the standing difference between running your own filter and paying for a DNS service, since the service follows the device.

Does it block ads inside apps and on YouTube?

Inside apps, often. On YouTube, no. DNS filtering works by refusing to look up a hostname, so it stops anything that fetches its ads from a separate advertising host. YouTube serves its ads from the same hosts as the video, and blocking those would block the video. Anything that says otherwise is selling something.

Can I run it on a machine that is already doing something else?

Yes, and it is the better option if you have one. Pi-hole is a DNS server and a small web interface, so it sits happily alongside other services on a machine that is already powered on. What matters is not how powerful the machine is but how reliably it stays up, which is the whole argument of this article.