Guides/Device setup
How to block YouTube with Pi-hole
Use Pi-hole groups and domain deny rules to block YouTube on selected home devices. See the app gaps, DNS bypasses, and Google service damage.
Updated Aug 10, 2026 · 6 min read
Pi-hole can deny domains, not YouTube content
Pi-hole can return a blocked answer when a device asks for a YouTube domain. It cannot tell which channel or video the child requested. It also cannot stop a device that sends DNS somewhere else.
YouTube spans several domains. A short deny list may leave the app working. A long list can break embedded lessons, thumbnails, YouTube sign in, and Google account handoffs.
Put the child devices in their own Pi-hole group
Use a group if adults still need YouTube on the same network. Pi-hole's current docs say domains, deny lists, and clients can be assigned to groups. The exact screen layout may differ by Pi-hole version.
- 1
Make sure the child's devices use Pi-hole for DNS. Check both IPv4 and IPv6. A device that uses another resolver will not see the rule.
- 2
In Group Management, create a group such as No YouTube. Add each child device under Clients and assign it to that group.
Check Pi-hole actually sees the child device first. Open Query Log and look at the client column. If every request shows the router's address instead of individual devices, the router is forwarding DNS on their behalf, which is a common setup. Per-client groups cannot match in that case, so the deny rules below will silently do nothing. Either hand out Pi-hole as the DNS server over DHCP so devices query it directly, or skip the group and apply the rules to everyone.
- 3
Under Domains, use regex deny entries, not exact ones. An exact entry matches that hostname and nothing else, so
youtube.comon its own leaveswww.youtube.comandm.youtube.comworking. Add(\.|^)youtube\.com$,(\.|^)youtu\.be$and(\.|^)youtube-nocookie\.com$. Assign them to the new group, not the default group. - 4
Add
(\.|^)googlevideo\.com$if playback still works. Streams come from many*.googlevideo.comhosts, which is another place an exact entry misses everything. This also stops YouTube video embedded on other sites. - 5
Restart the test device, clear its browser cache, and test the site, app, direct links, embeds, casting, and the Google tools the child needs.
Pi-hole documents the current group behavior in Group Management. Its deny list guide notes that a new domain belongs to the default group unless you change its group assignment.
Do not paste a large third party YouTube list into Pi-hole without reading it. Lists age fast and may include broad Google hosts used by school or work tools.
Use the query log to find cause, not to chase every host
When YouTube still opens, check Pi-hole's query log from the test device. First confirm that the request reached Pi-hole and the device belongs to the right group.
Do not keep blocking every Google host that appears. googleapis.com,
gstatic.com, and other shared domains support many Google products. Blocking
them can damage sign in and unrelated sites without making the YouTube block
reliable.
If the app starts but no video plays, the block is working at the stream level. If the goal was to hide YouTube cleanly, Pi-hole cannot provide that user experience.
Close the easy DNS gaps or accept them
Pi-hole only sees queries sent to it. A VPN, encrypted browser DNS, a hard coded resolver, a known service IP, cellular data, or a hotspot can go around it.
Your router may be able to redirect normal DNS traffic to Pi-hole and block outside resolvers. That is a router firewall job. Pi-hole alone cannot force a client to ask it.
Also check device identity after updates. If the router gives a device a new address, Pi-hole may stop matching the client to its group.
Choose the tool by the goal
Use Pi-hole when a rough domain block and local DNS control are acceptable. Use a router downtime schedule when the real rule is no internet at night. Use a device control when a phone must stay restricted away from home.
Google now lets a linked parent block an exact channel for a supervised child account. Family Center can also set the daily Shorts feed limit to zero.
Vidward does not run on Pi-hole and cannot change network DNS. It is a desktop browser extension plus a parent dashboard. It fits the narrower case where a child can use YouTube on a computer but not selected channels, videos, title words, Shorts, or autoplay.
Read how DNS blocking behaves before adding more domains. For a household schedule, use the router guide.