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.

Quick answer
  1. Install Pi-hole on a Raspberry Pi or Linux box with the official one-line installer (Step 2).
  2. Give the Pi-hole a fixed IP in your router (Step 3).
  3. Set the router’s DNS server to the Pi-hole IP, so every device uses it (Step 4).

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

5 minutesHardware

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.

15 minutesLinux

Step 2: Install Pi-hole

On the Linux device, run the official installer:

curl -sSL https://install.pi-hole.net | bash
  1. Follow the screens. Pick an upstream DNS, like Cloudflare or Quad9.
  2. Keep the web admin interface on.
  3. Note the admin address and password at the end.

Full guide: Pi-hole docs.

3 minutesRouter

Step 3: Give it a fixed IP

  1. Open the router app, then the device list or DHCP settings.
  2. Find the Pi-hole device. Choose Reserve IP or DHCP reservation.
  3. Note the address, for example 192.168.1.2.

If the Pi-hole IP changes, the whole house loses internet.

3 minutesRouter

Step 4: Point the router DNS to it

  1. In the router’s LAN or DHCP settings, find the DNS server fields.
  2. Enter the Pi-hole IP as the only DNS server.
  3. Save. Reconnect a device, or restart it.

Do not add a second public DNS here. Devices would use it and skip the blocking.

2 minutesBrowser

Step 5: Check the dashboard

  1. Open http://pi.hole/admin or the Pi-hole IP followed by /admin.
  2. Sign in with the admin password.
  3. Watch Total queries and Queries blocked rise as devices browse.

On Windows, nslookup doubleclick.net should return 0.0.0.0 when blocking works.

3 minutesFix

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.

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

Pi-hole infographic
Save this infographic: setup in five checks.

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.

More Guides You May Like

Leave a Reply

Your email address will not be published. Required fields are marked *