How do I block ads on YouTube?



In my cases (tested on some pi-holes on different locations) the reddit Posting (top level Post) dont work and I think it wont work anymore…
I checked some tcpdumps / dig / nslookup results and I never got such results like this user from reddit (Think youtube changed it).

@planet: Really sure about 90% ? I dont think you can achive 90% with 1~2 yrs outdated lists ?

EDIT: I also checked again nslookup to (only on my IPv4 Address not IPv6) and on my connection I get every ~5 mins (or less) another IP back from nslookup…
I think youtube/google uses a very (high expensive) geo-location/CDN System and without auto scripts / tools we’re lost and lets say google will change something in their domains: all the work on it / auto scripts have to be changed…


I was surprised given the age of them, but I haven’t gotten any ads during a video. Only sometimes before the video starts, once a day or so.

It could be a combination of factors alongside the two lists… I’ve also got all of WaLLy3K’s lists on my Pi-hole, as well as mmotti’s custom Regex filters for Pi-hole. I also have blocked Google DNS on my router so and can’t go through.


For whoever wants to add the permutations from these to their lists, here are a few more that don’t appear to be on any list received today.:



I tried blocking the ads using the regexp:


Regexp seems to properly block the domains, but now video’s are no longer loading properly.

So no luck thusfar.


If we think that we can outsmart Google/Alphabet by using a DNS filter to block advertisements on Youtube then we have to think again.


So that’s a reason for giving up?


Running into walls is not wise, so better use doors.

Pi-hole is not one of those doors.


I’m pretty sure DNS based Chromecast ad blocking is poissible, I used to use Ad-Free Time which is basically a paid DNS ad blocker service. There Chromecast ad-blocking worked perfectly.


Then please use that door.


I’m a fan of open source software so I’d rather use pihole. If you have the opinion that trying to block chromecast ads in pihole will never work then just use the solution I posted and stop posting pointless posts in this topic.


First post, kinda bummed as I set all of this up just for blocking YouTube ads network-wide, but hey, I still really enjoy the software. Hopefully we can figure this out soon, so I don’t have to use adblock extensions on everything.


I don’t think it’s possible to fully block YouTube ads any more, without modifying the client (i.e. the app or the browser).

DNS blocking doesn’t work. Can’t modify requests with a proxy because of HTTPS and the inability to install user certs on things like smart TVs. Can’t pretend to be the YouTube server either, also because of HTTPS and I think Google is using pinned certs in the app anyway.

The only solution for smart TVs is to get an Android TV box and run the hacked YouTube client on it.


If “everthing” for you is youtube then you need only to use one blocker, which is not Pi-hole.

Cross your fingers that other are not going dynamic pushing advertising.


That is not an opinion, it a fact.


My friend, you need to stop being so negative, go outside and breathe some fresh air.

You’re blogging to hard, a snarky forum comment is not considered “fact”, and I’m already using uBlock origin to begin with. Pardon me for attempting to find an alternate solution for a network-wide approach, I guess that’s now somehow against your personal terms of service. (lol)

split this topic #306

3 posts were split to a new topic: Filtering all data


You can try out some add blocking tools to even encrypt morse codes ( one of the best one is Adblock plus. These tools may not always work but they manage to block ads to some extent


In recent days, I remark that ads were no longer blocked on YouTube via Pi-Hole. In “Query Log”, I state that the addresses of the YouTube ads have been changed. In total, I counted 39 addresses. I made my file available on my GitHub (just copy and paste):


I also noticed a major increase in ads recently. Thank for you for providing this!


Same here. I set this up specifically because the YouTube app on our smart TVs is just brutal. You can’t watch 5 minutes of content without the video being ruined by ads google is injecting.

The KODI YouTube app somehow blocks all the ads but it’s UI is really clunky. I was hoping to setup a PiHole so the kids could watch YT in their rooms without be eviscerated by ads every 30 seconds