How It Works
When any device on your network tries to load an ad or tracker, it asks Pi-hole for the IP address. Pi-hole checks if it's on the blocklist and returns a blank response, preventing the ad from loading.
Learn how to install and configure Pi-hole to block ads on every device in your home, stop smart TVs from tracking you, and take control of your network's privacy. This complete guide walks you through everything step-by-step.
Start Installation GuidePi-hole is a network-wide ad blocker that acts as a DNS sinkhole. Instead of installing ad blockers on every device, Pi-hole blocks ads at the network level, protecting all your devices at once - including those that can't install traditional ad blockers like smart TVs, IoT devices, and gaming consoles.
Learn more about Pi-hole's features and community at pi-hole.net | Official Documentation | Community Forums
When any device on your network tries to load an ad or tracker, it asks Pi-hole for the IP address. Pi-hole checks if it's on the blocklist and returns a blank response, preventing the ad from loading.
Ads on websites, in-app ads, YouTube ads (partially), tracking pixels, analytics scripts, malware domains, crypto mining scripts, and telemetry from smart devices.
Works with every device on your network: Windows, Mac, Linux, iOS, Android, Smart TVs, Roku, gaming consoles, IoT devices, and anything else that connects to your network.
The most popular method - dedicated hardware that runs 24/7
Perfect if you already have a home server or NAS
Good for testing or if you have a always-on PC
ssh
(no extension) in the boot partition.
Find your Pi's IP address by checking your router's device list, or use:
ping raspberrypi.local
Connect via SSH (use Terminal on Mac/Linux or PuTTY on Windows):
ssh pi@YOUR_PI_IP_ADDRESS
Default password: raspberry
First, update your system:
sudo apt update && sudo apt upgrade -y
Run the official Pi-hole installer (from pi-hole.net):
curl -sSL https://install.pi-hole.net | bash
Save your admin password! It will be shown at the end of installation.
Create a new directory and add this docker-compose.yml
file (official image from Docker Hub):
version: "3"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp"
environment:
TZ: 'America/New_York' # Change to your timezone
WEBPASSWORD: 'your-secure-password-here'
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
cap_add:
- NET_ADMIN
restart: unless-stopped
Then run:
docker-compose up -d
docker run -d \
--name pihole \
-p 53:53/tcp -p 53:53/udp \
-p 80:80 \
-e TZ="America/New_York" \
-e WEBPASSWORD="your-secure-password-here" \
-v "${PWD}/etc-pihole:/etc/pihole" \
-v "${PWD}/etc-dnsmasq.d:/etc/dnsmasq.d" \
--cap-add=NET_ADMIN \
--restart=unless-stopped \
pihole/pihole:latest
Note: If port 80 is in use, change it to -p 8080:80
and access the web interface at http://YOUR_IP:8080/admin
This method automatically protects ALL devices on your network:
192.168.1.1
or 192.168.0.1
)1.1.1.1
(or leave blank)Pro Tip: Some routers call this "LAN DNS" or "DHCP DNS". Look in Network, LAN, or DHCP sections.
Open your browser and go to:
http://YOUR_PI_HOLE_IP/admin
Log in with the password from installation. You'll see real-time stats showing blocked queries, top domains, and client activity.
Go to Group Management → Adlists and add these:
https://big.oisd.nl/
https://perflyst.github.io/PiHoleBlocklist/SmartTV.txt
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt
After adding, go to Tools → Update Gravity to activate.
Sometimes legitimate sites break. Common whitelists needed:
windowsupdate.microsoft.com
Go to Whitelist → Add domain when needed.
Stop smart devices from phoning home:
samsung.com, vizio.com, roku.com
.*\.samsung\.com$
pihole -up
monthlypihole -g
weeklypihole -t
to see live queriesSmart TVs and IoT devices constantly send data back to manufacturers. Here's how to stop them while keeping functionality intact.
ads.samsung.com
samsungads.com
samsung-com.112.2o7.net
analytics.samsungknox.com
ibs.lgappstv.com
lgad.cjpowercast.com
smartclip.net
smartshare.lgtvsdp.com
logs.roku.com
giga.logs.roku.com
cooper.logs.roku.com
amazonadsi-a.akamaihd.net
device-metrics-us.amazon.com
mads.amazon-adsystem.com
Warning: Test after blocking! Some smart TV features may stop working. Whitelist specific domains if apps break.
Use regex patterns to block entire tracking infrastructures:
# Block all Samsung telemetry
^(.+\.)?samsung\.com$
^(.+\.)?samsungelectronics\.com$
# Block Alexa/Echo tracking
^(.+\.)?amazon-adsystem\.com$
^(.+\.)?alexametrics\.com$
# Block Google Home tracking
^(.+\.)?googleadservices\.com$
^(.+\.)?google-analytics\.com$
Add these in Pi-hole → Blacklist → RegEx filter
Typical home networks see massive reduction in unnecessary traffic
Sites load 20-50% faster without ad servers and trackers
Thousands of tracking attempts blocked daily from all devices
Save bandwidth and money, especially on metered connections
Ready to take control of your network's privacy and block ads everywhere?