dns DNS SINKHOLE

The "Black Hole"
for ads.

Pi-hole acts as your home DNS server. It intercepts requests to known ad servers and tracking domains before they ever reach your devices.

Total Queries
42,105
Blocked
14,203
Percentage
33.7%
Blocklist
180,442
Time Domain Client Status

How DNS Sinkholing Works

smartphone

1. The Device Asks

Your phone or PC wants to loadgoogle-analytics.com.

filter_alt

2. Pi-hole Checks

It compares the domain against the "Gravity" blocklists. It sees it is a tracker.

block

3. Access Denied

Pi-hole returns0.0.0.0 (null). The ad never loads.

Installation & Hardware

Pi-hole is extremely lightweight. It can run on almost any hardware, but it is recommended to run it 24/7.

check
Docker (Recommended) Install in seconds via ZimaOS or plain Docker Compose.
check
Raspberry Pi Zero / 3 / 4 / 5 The classic bare-metal install. Draws minimal power.

warning Important Note about YouTube

Pi-hole CANNOT effectively block YouTube ads, since they are served from the same domain as the videos. For YouTube you need browser extensions (uBlock Origin).

ssh root@homelab
# 1. Official one-step install (Bare Metal)
curl -sSL https://install.pi-hole.net | bash
# 2. Or via Docker Compose (ZimaOS/CasaOS)
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
environment:
- TZ=Europe/Athens
- WEBPASSWORD=securepassword
volumes:
- './etc-pihole:/etc/pihole'
restart: unless-stopped
_
docker-compose.yml
services:
  pihole:
    image: pihole/pihole:latest
    container_name: pihole
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "80:80/tcp"
    environment:
      TZ: 'Europe/Athens'
      WEBPASSWORD: 'change-me-please'
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    restart: unless-stopped

Then run:

docker compose up -d
lightbulb

Change WEBPASSWORD and your timezone. Point your router's DNS at this server's IP.