Every device on your home network – phones, laptops, smart TVs, even your thermostat – makes constant background requests to ad servers, tracking domains, and telemetry endpoints. Pi-hole intercepts those requests at the DNS level before they ever reach your devices, blocking ads and trackers across your entire network without installing a single browser extension.

What You Need Before You Start
The hardware list is short. You need a Raspberry Pi (any model from the Pi 2 onward works, though a Pi 3 or Pi 4 is more comfortable for long-term use), a microSD card of at least 8GB, a power supply, and a way to connect it to your router – either via ethernet cable or Wi-Fi. Ethernet is strongly preferred here. A wired connection keeps your DNS resolver stable and eliminates the lag spikes that come with wireless connections dropping and reconnecting overnight.
For the operating system, use Raspberry Pi OS Lite. The desktop version works too, but since Pi-hole runs entirely through a web interface and the command line, a full desktop environment just wastes memory. Download the Raspberry Pi Imager from the official Raspberry Pi website, flash Raspberry Pi OS Lite (64-bit) to your SD card, and use the imager’s built-in settings to pre-configure your Wi-Fi credentials and enable SSH before the first boot. That way you can run the entire setup headless – no monitor, no keyboard, just a device sitting quietly near your router.
Once the Pi boots, find its IP address from your router’s admin panel or use a tool like nmap or Advanced IP Scanner to locate it on your network. SSH in using ssh pi@[IP_ADDRESS] with the default password or whatever you set in the imager. Run sudo apt update && sudo apt upgrade -y first. Skipping that step and jumping straight to the Pi-hole installer is a common mistake that occasionally causes dependency issues mid-install.
Before installing Pi-hole, assign your Raspberry Pi a static IP address on your local network. You can do this either through your router’s DHCP reservation settings (recommended – cleaner and router-managed) or by editing /etc/dhcpcd.conf directly on the Pi. The static IP matters because every device on your network will point to this address as its DNS server. If the IP changes, DNS breaks for everything.

Installing and Configuring Pi-hole
The official installer runs as a single curl command: curl -sSL https://install.pi-hole.net | bash. A text-based setup wizard walks you through the options. When it asks which upstream DNS provider to use, this is where requests that Pi-hole doesn’t block get forwarded. Cloudflare (1.1.1.1) and Quad9 (9.9.9.9) are solid choices – Quad9 adds its own layer of malicious domain filtering on top of whatever blocklists you configure in Pi-hole itself.
The installer will ask whether to install the web admin interface. Say yes. It also asks about logging query data, which you can enable or disable depending on how much you care about the privacy monitoring dashboard versus keeping no local records of what your devices look up. The installer finishes by displaying the address for your admin panel – typically http://[PI_IP]/admin – along with a randomly generated password. Write that password down immediately or change it right away with pihole -a -p.
Blocklists are where Pi-hole’s effectiveness lives. The default list blocks a solid range of known ad and tracking domains, but adding more lists dramatically increases coverage. The Firebog project maintains a curated collection of well-maintained blocklists sorted by category – ads, tracking, malware, and more. In the Pi-hole admin panel, go to Adlists, paste in the URLs from Firebog’s “Ticked” category (the green checkmarks), then run pihole -g from the terminal to pull them all in. A well-stocked setup typically lands somewhere between 1 and 2 million blocked domains.
Once Pi-hole is running, you need to point your network traffic through it. The cleanest method is changing the DNS server setting in your router’s DHCP configuration to your Pi’s static IP address. Every device that connects to your network will automatically receive that DNS server without any manual configuration per device. Log into your router admin panel, find DHCP settings, and replace the primary DNS field with your Pi’s IP. Some routers also let you set it as both primary and secondary DNS – fine to do, though some people prefer leaving a public DNS as a fallback so the network doesn’t fully break if the Pi goes offline.
Alternatively, you can configure Pi-hole manually on individual devices if you don’t have router access or want to test it before rolling it out network-wide. On Windows, go to Network Adapter Settings, open IPv4 properties, and set the preferred DNS server manually. On Android and iOS, you can set DNS per Wi-Fi network in the network’s advanced settings. This is more granular but significantly more work to maintain across multiple devices – the router-level approach is almost always worth pursuing first.
What to Watch Out For After Setup

Pi-hole will occasionally block domains that break legitimate functionality – streaming service login pages, smart home device updates, certain banking app features. When something stops working, the Pi-hole query log is where you diagnose it. In the admin panel, go to Query Log, filter by the device that’s having issues, and look for recent blocked queries. If you find a domain that shouldn’t be blocked, add it to your whitelist with pihole -w domainname.com or through the admin panel’s whitelist section. This process of fine-tuning takes a few days of normal network use to smooth out.
One thing worth watching: some apps and devices use DNS-over-HTTPS or hardcoded DNS servers like 8.8.8.8, which routes their requests entirely around Pi-hole. Google’s Chromecast and some smart TVs do this by default. You can intercept these requests by setting up firewall rules on your router to redirect all outbound port 53 traffic to the Pi, but that requires a router running firmware like DD-WRT or OpenWRT. If your router doesn’t support that level of configuration, those devices will simply bypass Pi-hole no matter what – and a surprising number of connected devices are quietly designed to do exactly that.





