---
title: "DNS Ad Blocking — YouTube Ads Cannot Be Blocked via DNS"
aliases: [youtube-dns-blocking, adguard-youtube, pihole-youtube, dns-youtube-limits]
tags: [adguard, pihole, dns, youtube, ad-blocking, homelab, android]
sources:
  - "daily/2026-04-23.md"
created: 2026-04-23
updated: 2026-04-23
---

# DNS Ad Blocking — YouTube Ads Cannot Be Blocked via DNS

DNS-based ad blocking (AdGuard Home, Pi-hole, NextDNS) works by refusing to resolve domains known to serve ads. YouTube ads are served from the same domains as regular YouTube content — `youtube.com`, `googlevideo.com`, `yt3.ggpht.com` — making it impossible to block ads without blocking all of YouTube. This is intentional on Google's part and has been true since approximately 2023. The only effective solutions require client-side interception.

## Key Points

- **YouTube ad domains = YouTube content domains** — blocking `googlevideo.com` prevents video playback entirely, not just ads
- DNS ad blocking **cannot distinguish** between an ad video stream and a regular video stream at the DNS resolution level
- This is Google's deliberate countermeasure against DNS-based blocking — they co-locate ad serving infrastructure with content CDN
- **Working solutions require client-side interception:** uBlock Origin in Firefox, YouTube ReVanced (Android), SmartTubeNext (Android TV)
- **Piped is more viable than Invidious** for self-hosted YouTube frontends — Google actively blocks IP ranges used by Invidious instances

## Details

### Why DNS Blocking Fails for YouTube

DNS ad blocking works well for domains that exist solely to serve ads (e.g., `ad.doubleclick.net`, `track.googleadservices.com`). When your browser requests `ad.doubleclick.net`, AdGuard returns NXDOMAIN — the request never goes out, the ad never loads.

YouTube ads are different: they're served as DASH/HLS video segments from the same `googlevideo.com` CDN that delivers the actual video content. The ad segment URL and the content segment URL are structurally identical:

```
# Ad segment (same domain, same path structure as real content)
https://rr1---sn-xxx.googlevideo.com/videoplayback?id=xyz&...&oad=1

# Video content segment  
https://rr1---sn-xxx.googlevideo.com/videoplayback?id=xyz&...
```

DNS sees only `googlevideo.com` — blocking it stops all YouTube video playback. Not blocking it allows ads to load. There is no middle ground at the DNS layer.

### Community Consensus (2025–2026)

This is not a gap in blocklist coverage or a matter of finding the right filters. It is an architectural limitation. AdGuard, Pi-hole, and NextDNS all acknowledge they cannot block YouTube ads. Adding more blocklists does not help — the issue is not missing filter rules but that the correct filter rule (`block googlevideo.com`) would be catastrophic.

### Effective Solutions by Platform

| Platform | Solution | Notes |
|----------|---------|-------|
| Desktop (Firefox) | uBlock Origin | Most effective; blocks via content script injection |
| Desktop (Chrome/Chromium) | uBlock Origin | Works; Manifest V3 transition ongoing |
| Android phone | YouTube ReVanced | Patched YouTube APK; requires manual install |
| Android TV | SmartTubeNext | Open-source, ad-free, supports 4K |
| iPhone/iPad | Limited — no sideloading | Brave browser has partial blocking |
| Smart TV (native app) | None | No extension/sideloading support |

### Self-Hosted YouTube Frontends: Piped vs Invidious

For users who want a completely ad-free YouTube experience with no client-side app:

**Invidious** — self-hosted YouTube frontend that proxies YouTube content
- Google has been aggressively blocking IP ranges used by Invidious instances since 2023
- Public Invidious instances frequently break (videos fail to load)
- Self-hosted instances on residential/VPS IPs are less targeted but not immune

**Piped** — alternative self-hosted YouTube frontend
- Better maintained as of 2026; more resilient to Google's blocking
- Supports RSS feeds, playlists, SponsorBlock integration
- Still subject to YouTube breaking changes, but Google has been less aggressive about blocking Piped IPs

Neither solution is a reliable long-term substitute for a YouTube subscription or a client-side blocker. Self-hosted frontends are technically complex to maintain.

### What DNS Blocking CAN Reduce

While DNS blocking can't stop YouTube ads, it does meaningfully reduce:
- Google Analytics tracking across all sites
- Facebook pixel tracking
- Most banner and interstitial ads on non-Google sites
- Telemetry pings from apps
- Crypto mining scripts

A well-configured AdGuard (5+ blocklists) blocks 30–50% of all DNS queries on a typical home network — just not YouTube ads specifically.

## Related Concepts

- [[wiki/concepts/adguard-blocklist-setup]] — recommended blocklists for maximizing AdGuard effectiveness on everything it CAN block
- [[wiki/concepts/adguard-dns-rewrites-homelab]] — AdGuard's other main use case: internal DNS rewrites for homelab services
- [[wiki/concepts/tailscale-dns-homelab]] — Tailscale DNS setup to route mobile DNS through AdGuard for network-wide blocking on mobile

## Sources

- [[daily/2026-04-23.md]] — AdGuard Home session: YouTube ads not blocked despite AdGuard being active; diagnosis confirmed DNS-level blocking is architecturally impossible for YouTube; solutions identified: uBlock Origin (Firefox), YouTube ReVanced (Android), SmartTubeNext (Android TV); Piped preferred over Invidious for self-hosted frontend; decision to not set up Piped/Invidious
