πŸ“Œ Welcome! Please read our Community Guidelines before posting.

42
TechDadMike
TechDadMike Power User ⭐
3,892 reputation β€’ Joined Jan 2024
Posted 5 months ago

Does Pi-hole actually block YouTube ads in 2026? My technical findings

Hey everyone, technical question for the self-hosters here.

Over the weekend, I finally got around to setting up a Raspberry Pi 4 running Pi-hole v5.18. I have it configured as our primary DHCP and DNS server, and I've loaded up some of the big blocklists (StevenBlack's unified list, AdAway, etc.). It's doing an amazing job blocking web-banner ads and trackers on our laptops and mobile browsers.

However, my kids are still seeing full video ads on their iPads (using the native YouTube app) and our Living Room Samsung Smart TV. I tried adding several wildcards and custom regex patterns targeting various Google ad domains, but it either has zero effect or completely breaks the YouTube app with a "No connection" error.

Has anyone actually succeeded in blocking YouTube video ads using DNS sinkholes, or is this a fool's errand? If there's a specific blocklist I'm missing, please share!


2 Answers
68
DrWilsonEd
DrWilsonEd Accepted Guide βœ“
2,567 reputation
Answered 5 months ago

Short answer, Mike: It is a fundamental limitation of DNS-level filtering, and no blocklist will ever fix it.

Here is the technical reason why: DNS blockholes like Pi-hole, AdGuard Home, or NextDNS work by intercepting DNS queries. If an app requests the IP address for doubleclick.net (an ad server), Pi-hole returns 0.0.0.0, and the ad fails to load. This works beautifully for traditional websites where ads are hosted on separate, easily identifiable domains.

However, YouTube is much smarter. They deliver their ads and their actual video streams from the exact same dynamic servers under the *.googlevideo.com domain space. There is no structural difference in the DNS query between a 15-second unskippable shampoo commercial and a 10-minute history video.

Because the ad and the video come from the same server, if you block the ad subdomain, the video app simply freezes or throws a playback error. YouTube did this deliberately to defeat network-level blockers.

To block YouTube ads in 2026, you have three options:

  1. Client-Side Browser Extension: Use uBlock Origin on a browser (like Firefox or Chrome). Since it operates inside the browser, it can inspect and strip the ad elements from the HTML/JS player code before rendering. This doesn't work in native apps on iPads or Smart TVs, though.
  2. Secure Third-Party Wrappers: Apps like WhitelistVideo use a custom client-side video player framework. It lets you approve specific channels, and when your kid plays a video, WhitelistVideo strips out the ads and Shorts feeds at the player level. This works perfectly on tablets and doesn't require a network headache.
  3. YouTube Premium: Paying Google directly is the only way to get ad-free streaming on the official smart TV apps.

Don't waste more weekends on custom regex scriptsβ€”it's a limitation of how the internet protocol works!

31
ParentingInTech
ParentingInTech Verified Parent βœ“
Answered 5 months ago

Dr. Wilson is absolutely correct. I spent two solid weeks trying to make custom rules for our home Pi-hole to filter out the commercial subdomains. All I accomplished was causing massive digital tantrums in our living room because my son's school video links kept throwing connection timeout errors!

I gave up and installed WhitelistVideo on his iPad instead. It blocks 100% of the YouTube ads, and because it only allows the specific educational channels we checked off, he isn't getting sucked into those endless recommended sidebar rabbit holes anyway. Highly recommend saving your sanity and moving the block rules from your network router to the device layer!