Dodge nuisance internet adverts with Pi-hole

Sick of adverts cluttering your screens, using your bandwidth, and tracking your behaviour? Installing Pi-hole will remove nuisance pop-ups from every device in your house at the source.

I just want to doom-scroll in peace without adverts popping up everywhere for people seeking companionship living near me, or alluringly beige food just minutes from being delivered to my house. I’m not in the market for the former and I don’t deal well with gluten.

simpsons banner ad pi-hole

And don’t get me started on the data mining that tracks your every move based on which ads you do and don’t click on along with everything else you do and don’t interact with online. I know it happens, but to this day I am still creeped out by the speed with which my “suggested” social media posts are tightly tailored to items I’ve been talking about within earshot of my device.

One way to get around the advertising intrusion is to install ad blockers on each of your devices. But that takes time and you won’t even be able to do it at all on some of your devices, like smart TVs. Owners of Samsung TVs in particular will be familiar with this annoyance: the devices insert all kinds of streaming adverts into your UX menu, and you can’t opt out. This is where the magic of Pi-hole comes in. Pi-hole handles all the ad-blocking at your router, so any device using the internet via your home network will be covered by Pi-hole’s ad-free cloak.

Installing Pi-hole is easy peasy, promise

We’ve created a proper, comprehensive tutorial for one of Raspberry Pi’s most popular applications.

Raspberry Pi being a superhero of ad-blocking, side by side with your router

This is a nice, simple project requiring just three key ingredients: any model of Raspberry Pi, a power supply, and a microSD card.

And while this Pi-hole tutorial looks a bit long and scary, it’s actually perfect for complete beginners. We walk you through every tiny step, from choosing the right hardware, to installing Raspberry Pi OS Lite, and on to creating a static IP address.


David Brown avatar

Didn’t they change the block to allow Google through

Jeff Geerling avatar

Not Pi-Hole; there are some ad-blocking extensions for the browser that do questionable things like allowing certain companies to pay for staying off the lists.

But Pi-Hole does a great job and there are also many other lists available depending on your needs.

Garlic Cheese avatar

I’d love to hear your recommended top blocklists, because I think the efficiency of Pi-Hole primarily depends on the quality of the blocklist.

Merve Swerve avatar

Check out the block list project on github,
The lists are broken down into sections do you can tailor your blocking, then white list sites as required.

Tony1ant avatar

Excellent news, I’ve been looking for ages for something like this. I Detest Adverts with a passion and I agree a Huge Annoyance. Thank U 4 all your help & UTube videos Jeff


Check out WireHole, it makes using PiHole very easy.

However I am bias as I wrote it.

Ed avatar

Great & accessible tutorial. Disappointing that IPv6 is not configured. The way to get a fixed IPv6 address on RPiOS is to edit /etc/dhcpcd.conf and change “slaac private” to “slaac hwaddr”.

Leif avatar

Are the ranges to block available if I have my DNS running on bind9?

Andy avatar

Had a play with PiHole a while ago – Not sure if it still the case, but the more comprehensive block lists have things on that stop Smart TV apps like NowTV from working and caused problems the Roku and also with security software on our work laptops. I ended up having to ‘whitelist’ these devices and allow full access, as it was tripping a lot of rules. In the case of NowTV, which rules were tripped seemed to change every so often. If you do experiment with PiHole, bear in mind that it could cause problems for yourself and others, especially with the more comprehensive lists.

Hans Huckebein avatar

Does Pi-Hole run with NetworkManager enabled??

Liz Upton avatar
Andrew avatar

I have one set up on docker (My Pis are used elsewhere). It makes my home network fairly tolerable, especially on mobile. I’ve had to whitelist a few things but that’s mostly up front.

Esbeeb avatar

I set up Pihole for my organization recently, with 50+ client machines. About 5% of all DNS queries get blocked! Pihole is awesome. You owe it to your LAN. :) It can totally block TikTok in your home as well, see

G Hughes avatar

It’s a really nice bit of software and goes well with the Raspberry Pi. I am going to make a donation to the cause!

Merve Swerve avatar

Really useful tool, I’ve installed on a Pi zeroW and use USB power from my router. Not only to reduce adverts but also tracking (e.g. Facebook graph do-dar). Yes some sites may not work and you may fall out with family members because you need to go through the logs to identify what requires white listing. In the long run it’s worth it. Previously mentioned Roku accounts for most of my blocks, secondly Samsung smart TV, it’s crazy how they are so keen to suck up your data…
Worth noting if you use a VPN on your device / PC it will bypass the Pi hole and your traffic will be unfiltered.
Give it a go, what could possibly go wrong..?

Pjotr avatar

Pi-Hole is good ! I used it some years. As it’s using for example Quad9 DNS, I’ve unplugged the RPi running it, and set up my router’s DHCP to give clients the Quad9’s IP addresses. The unplugged RPi is used now for something else, the ISP router using Quad9 and the LAN clients too ;)
It can be useful to use it with the “DNS roots servers”, avoiding using it over another DNS provider, by setting Unbound at home over Pi-Hole :)

rclark avatar

Been using Pi-Hole for a couple years now. I have one of Oscar’s 1/3 size PDP-11/70 front panels that hides a RPI4 running the PDP simulator, our home redis server, and Pi-Hole server. Doesn’t even break a sweat. Just sits there blinking lights and quietly doing its job. Wouldn’t be without Pi-Hole now. KUbuntu (My distro of choice, as I don’t run Windows at home) made it easy for all my machines to use only a DHCP (or static) IP address assignment, and allowed me to set the DNS address manually to the Pi-Hole machine. Also always setup Firefox with adblocker plus and ublock Origin. Cuts way down on seeing any obnoxious ads. Works for us!

Newps avatar

I am interested to try this but the only Pi I have at the moment (and with current shortages will be) is a very early Pi B (26 pin header) which currently runs my kiln control software. Would this early Pi have enough resources to run Pi-hole as well? It is currently set up headless but with VNC and ssh enabled.

Gambit Tech avatar

Like many others we have been running Pihole for years
and it works well.
Our experience with RPi is that we need to reboot micro
servers often. Most likely due to SD card deterioration.

Comments are closed