How to Block Ads with Pi-hole on Your Home Network: 6 Steps
Tired of ads on every phone, TV and PC at home? Here is how to block ads with Pi-hole, a free network ad blocker, from install to router setup.
Method Finder
Two questions. You get the step to try first and the backup.
Before you block ads with Pi-hole
Pi-hole is a free DNS server that blocks ad and tracker domains. It covers every device that uses your network.
It runs on Linux, most often a Raspberry Pi. It can also run in Docker. It does not install directly on Windows.
It cannot block ads served from the same domain as the video, so YouTube ads usually still show.
6 steps to block ads with Pi-hole
Step 1: Pick the hardware
- Raspberry Pi: any recent model with Raspberry Pi OS Lite works for a home.
- Old PC or server: a supported Linux like Debian or Ubuntu.
- Docker: the official Pi-hole image, on a NAS or home server.
- Only Windows? Pi-hole needs Linux. Use a Raspberry Pi, or a filtering DNS service instead.
Use a wired connection for the Pi-hole if you can.
Step 2: Install Pi-hole
On the Linux device, run the official installer:
curl -sSL https://install.pi-hole.net | bash- Follow the screens. Pick an upstream DNS, like Cloudflare or Quad9.
- Keep the web admin interface on.
- Note the admin address and password at the end.
Full guide: Pi-hole docs.
Step 3: Give it a fixed IP
- Open the router app, then the device list or DHCP settings.
- Find the Pi-hole device. Choose Reserve IP or DHCP reservation.
- Note the address, for example 192.168.1.2.
If the Pi-hole IP changes, the whole house loses internet.
Step 4: Point the router DNS to it
- In the router’s LAN or DHCP settings, find the DNS server fields.
- Enter the Pi-hole IP as the only DNS server.
- Save. Reconnect a device, or restart it.
Do not add a second public DNS here. Devices would use it and skip the blocking.
Step 5: Check the dashboard
- Open http://pi.hole/admin or the Pi-hole IP followed by /admin.
- Sign in with the admin password.
- Watch Total queries and Queries blocked rise as devices browse.
On Windows, nslookup doubleclick.net should return 0.0.0.0 when blocking works.
Step 6: Fix broken sites
- Open the Query log. Find the blocked domain the site needs.
- Add it to the Allowlist in the dashboard.
- Some shopping links and smart TV apps need tracking domains to work.
- No internet at all: check the Pi-hole is on, then set the router DNS back to automatic.
Pi-hole: what to expect
Most banner ads go away
Ads on websites, apps and many smart TVs are blocked at the DNS step.
YouTube and Twitch ads stay
Those ads come from the same servers as the video. DNS blocking cannot split them.
Pages load a little faster
Fewer ad requests means less to download.
If the Pi-hole stops, internet stops
Keep it on a good power supply. Know how to switch the router DNS back.
More home network guides
Next steps for your home network: how to set up a home network, how to set up a network switch, how to set up dynamic DNS, how to prioritize bandwidth with QoS.
What we did not test
We checked nslookup on our Windows 11 test PC. We did not install Pi-hole on new hardware during this test. Install steps and the command come from the official Pi-hole docs.
Pi-hole: the cheat sheet
Which step helped?
One tap. It helps the next reader.
Frequently asked questions
What is Pi-hole?
A free DNS server that blocks ad and tracker domains for every device on your network.
Can Pi-hole run on Windows?
Not directly. It needs Linux, a Raspberry Pi or Docker.
Does Pi-hole block YouTube ads?
Usually not. YouTube serves ads from the same domains as videos.
Is Pi-hole free?
Yes. It is free and open source.
Axee Davies is the founder of AxeeTech, publishing gaming guides, codes, and Windows how-tos since March 2013. A tech enthusiast for 13+ years — starting with smartphones and Android rooting — he now runs a site that puts out a new guide every day for Roblox players, traders, and Windows users. More about AxeeTech
More Guides You May Like
Understanding order_item_cons_data_2: Complete Guide to Order Item Confirmation Data
Compensation for Delayed Flights During Bad Weather: What You Should Know
How to Set Up a Network Printer in Windows 11/10: 6 Steps That Work
How to See Who’s Connected to Your WiFi: 5 Ways to Find Every Device
How to Back Up Files Over Network in Windows 11/10: 6 Reliable Ways
How to Set Up Screen Sharing at Home: 7 Easy Ways on Windows 11/10
Audio Troubleshooter Windows 11: How to Run It and What to Do When It Finds Nothing