• Hey Guys,

    Up until recently I hadn't seen a Youtube ad in quite a while. I had a list that focused on their ad servers. Now, I seem to be getting ads again pretty constantly. Anyone have some good Youtube ad blocking lists?

    This is the one I have now:

  • Check your squid logs to see where they're coming from. I thought I had read recently that YouTube is now serving some ads from its own domains so you can't block them.

  • Good idea. I would need to install squid though as I don't currently use it. I do have ntopng installed but I don't usually have it running because it fills memory up on my router.

    I have found a couple other lists:

    https://raw.githubusercontent.com/HenningVanRaumle/pihole-ytadblock/master/googlevideo.com domains/adverisment.txt

  • Duh, sorry. I saw this in the main feed and didn't see it was in the pfblocker sub. I don't use pfblocker but it must have some sort of access log similar to squid's.

  • A few second ad is a small price to pay for the free, educational, entertaining content people provide on Youtube. Keep in mind some of the people providing that content rely on the ad revenue to continue providing that free content. That's like going to a museum with a "suggested donation" and not paying anything. It's thinking like that which turns free services into paid services. Once enough people decided I should stop watching ads, Youtube decides I should start charging for what was free before since I'm no longer making enough ad revenue on this platform.

  • The corollary of course is when you drop money in the suggested donation box, and then a hammer pops out of the box and hits you in the crotch.

    Too many bad actors in every ad network on Earth posting shady ads or malware for me to every trust an ad network ever again.

  • That is true as well. In the case of Youtube specifically though, the actors are usually quite good. Which is why we watch their content. I block ads on websites here at work so I'm hypocritical in that sense. I do it for security purposes, which proves exactly your point. There are a lot of bad actors out there trying to do harm.

  • The blocking files block YouTube ads when watching using a web browser. I do get YouTube ads when using the app on my iPad or streaming media player.

  • @xentrk said in Blocking Youtube Ads:

    The blocking files block YouTube ads when watching using a web browser. I do get YouTube ads when using the app on my iPad or streaming media player.

    That's exactly what I am noticing. The web browsers are fine, it is the Amazon Fire TV's and Google TV's that still get ads. Sometimes my tablet and phone as well. There must be something else with those Android devices that allow them through.

  • @thezfunk
    The devices DNS configuration point to pfsense ?

  • @ronpfs said in Blocking Youtube Ads:

    The devices DNS configuration point to pfsense ?


  • Moderator

    @thezfunk said in Blocking Youtube Ads:

    @xentrk said in Blocking Youtube Ads:

    The blocking files block YouTube ads when watching using a web browser. I do get YouTube ads when using the app on my iPad or streaming media player.

    That's exactly what I am noticing. The web browsers are fine, it is the Amazon Fire TV's and Google TV's that still get ads. Sometimes my tablet and phone as well. There must be something else with those Android devices that allow them through.

    DNS over HTTPS :)

  • @bbcan177

    Anyway to get around that on Android?

  • @thezfunk I’d packet capture the dns queries made by those devices and see what comes up.

  • I wonder if I block all traffic to and will solve the issue since I don't use them for DNS anyway. I am sure Google must be using their servers for that purpose.

  • Any update to the block ???

  • @BBcan177 just out of curiosity is blocking youtube ads still doable ? It worked for me a long time ago... thanks

  • Moderator

    @reg1982 I think it's always going to be hit and miss. There are some feeds that might help but YMMV.

  • Not quite sure if I should put this in this thread or the pfBlockerNG-devel feedback thread. ButI have an alias in my pfBlockerNG-devel setup to block Youtube ads. I saw in on the widget on the firewall's dashboard that some packets were blocked. Here's a cut and paste of the widget:

    DNSBL_YoutubeAds 9,481 3680345 Oct 18 03:05:11

    I clicked on the 3680345 to bring up the Alerts for the alias and this is part of what I got:


    All of these alerts are coming from the same iPad. But the iPad was sitting on the kitchen counter at 4:25 in the morning and was on the charger and not being used.

    How can it be that the iPad is constantly reaching out to Youtube when it is not being used? And at some time stamps have upwards of 1700 duplicate attempts ?

  • Since my last post above this came up in the Alerts

    Is that 36,132 accurate?

  • I did some more snooping around and checked Diagnostics/States and filtered it by the address of the iPad. I get what appears to be thousands of open states from the iPad to the DNSBL VIP that look like this:


  • The iPad may have been on standby but the app was probably still open. That number of attempts to reach the all-seeing googly eye does look pretty concerning but I have seen ad-slingers doing that with in-game ads and tracking.

  • @sesipod Blocking Google's DNS servers did not stop my Android ads. I am telling you, I don't have issues on Windows machines with ads, it is just Android's YouTube app. In the last two weeks it has gotten worse. I now get an ad at almost every single video again. My FireTV, Firestick, Android phones and tablets with the Youtube app are unanfected by the blocking on my pfSense box.

    I have yet to take the time for packet capture deep dive. I just got OpenVPN working so I can route my traffic from my phone through home whenever I am out and I also implemented encrypted DNS.

    They were only mildly annoying before but the worse they intrude the more driven I am to shut them off. I am now considering a whole VPN solution for security reasons although I know that won't stop the Youtube ads.

  • It looks like some people over on reddit might be onto something:


  • did you ever figure this out?

  • @lmannyr - I suggested a nice long packet capture to check DNS requests to look for any patterns but I don’t think anyone has done it.

  • @motific Any specific settings I should use under "Diagnostics: Packet Capture"? I'm not sure what I'll be looking for but I sure can try.

    Also to clarify, the ads do not show up using desktop browsers. I only see youtube ads when using the youtube app with iPads and iPhones. Don't have an android to test with.

  • I stopped using chrome and switched to the Brave browser (Download from the official site- https://brave.com). I forgot about advertising on YouTube.
    Brave was created by Brendan Eich, one of the founders of the JavaScript programming language, using the Blink engine (developed by Google). All popular browsers are created on this engine - Opera, FireFox and Chrome itself.

  • I have managed a respectable level of YouTube cleanliness but it has taken a multi-pronged approach. DNS blocking helps with either a Pihole or pfBlockerNG but you will need browser/app level blocking as well.

    On a PC that isn't very hard and there are some well known and effective addons that I use in Firefox and have no issues. The problems were with all my Android devices whether that be phone, tablet or streaming boxes of various manufacturers. Even though I was forcing DNS as best I could through my pfSense, I was still getting regular ads. Better than nothing, but still highly annoying. The Youtube applications will circumvent any rerouting or DNS blocking you use. Encrypted DNS is good to hide our DNS requests from our ISP but it also allows Youtube to get around our filter/block. The only way to try and prevent this, from what I was reading, was to root all my devices. That is not something I want to have to learn and especially, mange for each device. Luckily, I finally found a new solution.

    Replace the stock apps. On my phone, I use YouTube Vanced. It is a 3rd party Youtube app that seems to work exactly like the stock app and I never get anymore ads. I love it. On my streaming boxes, I use Smart Youtube TV. Gloriousness has ensued. The only issue I have had is that Youtube Vanced crashes on my old Nvidia Shield tablet. Probably because it is running an out dated version of Android.

    One final note. With pfBlockerNG (and DNS redirect) I had an issue logging into Netflix. It would give an error but their network tests would all pass. I read somewhere online that Netflix absolutely has to touch, no exceptions. I thought that was weird because Netflix was working on some boxes already but not the new one I installed. I block and redirect all DNS traffic to my pfSense for everything. I ran an experiment where I disabled pfBlockerNG on initial sign in with Netflix and then reenabled it after I was signed in. Fixed the issue. Once I was logged in to Netflix it doesn't seem to need to touch again. So, when installing Netflix app, give it access to that one time and then you can block it after that.

    I have spent a ton of time working through all this and now my life is 100% better. I watched some Youtube in a hotel room on their smart TV and I don't know how anyone manages to watch anything with all the ads I saw. I got frustrated and turned it off. TV commercials are less annoying.

  • Banned

    This post is deleted!

  • Grublets has written a script for pi-hole that is working to block YT ads on the router. It was forked forked on the Diversion ad blocker on Asuswrt-Merlin firwmare yesterday and early testing is very positive so far.


  • Great solution is adlock. has free extention for browsers which blocks ads on youtube. two clicks to install and watch youtube without annoying ads ))