// Block ads. Everywhere.
AD BLOCKING AT THE NETWORK LEVEL.
Pi-hole acts as a DNS sinkhole—blocking ads and trackers before they reach your devices. No browser extensions, no per-device setup. One solution blocks ads on your entire network.
PRIVACY FIRST.
Pi-hole blocks known trackers and malicious domains. Your browsing stays faster and more private. See exactly what's being blocked with the built-in dashboard.
Click a lesson to begin
What is Pi-hole? How DNS blocking works.
BeginnerInstall Pi-hole on Raspberry Pi, Docker, or VPS.
BeginnerConfigure DNS, set admin password, network setup.
BeginnerConfigure devices to use Pi-hole DNS.
BeginnerAdd, remove, and manage blocklists.
BeginnerAllow specific domains. Fix broken websites.
IntermediateUse Pi-hole as your DHCP server.
IntermediateDifferent blocking rules for different devices.
IntermediatePi-hole's DNS engine. Performance tuning.
AdvancedRun Pi-hole in containers. Compose files.
AdvancedUse Pi-hole remotely. WireGuard integration.
AdvancedCommon issues. Debugging DNS problems.
AdvancedPi-hole is a DNS sinkhole that blocks ads and trackers at the network level. It works by intercepting DNS queries and returning 0.0.0.0 for blocked domains.
1. What does Pi-hole block at?
# One-line installer curl -sSL https://install.pi-hole.net | bash
# Run Pi-hole in Docker docker run -d \ --name pihole \ -e TZ=America/New_York \ -e WEBPASSWORD=yourpassword \ -p 53:53/tcp -p 53:53/udp \ -p 80:80 \ -p 443:443 \ -v pihole:/etc/pihole \ -v dnsmasq:/etc/dnsmasq.d \ --restart=unless-stopped \ pihole/pihole:latest
Run Pi-hole on any Linux server to block ads everywhere, even on the go.
1. What port does DNS use?
Navigate to http://pi.hole or the IP address of your Pi-hole.
Go to Settings → DNS and choose upstream DNS providers:
# Change password pihole -a -p newpassword
1. How do you access the admin interface?
Set your router's DNS to Pi-hole IP. All devices use Pi-hole automatically.
# /etc/systemd/resolved.conf [Resolve] DNS=192.168.1.100 Domains=~
1. Where is the best place to set DNS?
Pi-hole comes with curated blocklists. Go to Group Management → Blocklists to manage.
# Popular blocklists https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts https://adaway.org/hosts.txt https://v.firebog.net/hosts/AdguardDNS.txt https://v.firebog.net/hosts/Easyprivacy.txt
# Update gravity (blocklists) pihole -g
1. What command updates blocklists?
# Add to whitelist pihole -w example.com # Wildcard whitelist pihole -w -d example.com # Remove from whitelist pihole -w -r example.com
Use regex for complex patterns:
# Regex whitelist example ^.*\.googlesyndication\.com$
1. What fixes broken websites?
Important: Disable DHCP on your router to avoid conflicts!
Assign fixed IPs to specific devices by MAC address.
1. What must you disable on your router?
1. What assigns devices to groups?
FTLDNS (Faster Than Light DNS) is Pi-hole's DNS backend. It handles DNS queries with minimal overhead.
# /etc/pihole/pihole-FTL.conf # DNS settings DNSMASQ_LISTENING=all RESOLVE_IPV6=yes # Logging LOG_QUERIES=yes QUERY_LOGGING=yes
1. What does FTLDNS stand for?
version: '3'
services:
pihole:
image: pihole/pihole:latest
container_name: pihole
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80"
- "443:443"
environment:
TZ: America/New_York
WEBPASSWORD: yourpassword
DNS1: 1.1.1.1
DNS2: 8.8.8.8
volumes:
- ./pihole:/etc/pihole
- ./dnsmasq:/etc/dnsmasq.d
restart: unless-stopped
# Create network docker network create pihole-net # Run with custom network docker run -d --network pihole-net \ --name pihole \ pihole/pihole:latest
Mount volumes to preserve data between container updates.
1. What preserves Pi-hole data?
# In WireGuard config [Peer] # Mobile device AllowedIPs = 0.0.0.0/0, ::/0 # In wg0.conf - route DNS through VPN PostUp = iptables -I FORWARD -i %i -j ACCEPT PostUp = iptables -I FORWARD -o %i -j ACCEPT PostUp = iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Alternative: Use 1.1.1.1 WARP app for easy encrypted DNS.
1. What VPN pairs well with Pi-hole?
# Generate debug log pihole -d # View live logs tail -f /var/log/pihole.log
# Reconfigure pihole -r # Or completely reset pihole uninstall # Then reinstall
You've completed the Pi-hole Mastery guide. You now understand:
Pi-hole is the ultimate network-wide ad blocker. Once configured at the router level, every device on your network benefits automatically.
It blocks ads, trackers, and malware at the DNS level—no per-device configuration needed.
Block ads. Everywhere. Forever.