Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Blocking Youtube Ads

    Scheduled Pinned Locked Moved pfBlockerNG
    34 Posts 15 Posters 39.0k Views 14 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      thezfunk
      last edited by

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

      https://www.reddit.com/r/pihole/comments/9w5swx/i_think_ive_managed_to_block_youtube_ads_with/

      1 Reply Last reply Reply Quote 1
      • L Offline
        lmannyr
        last edited by

        did you ever figure this out?

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          motific @lmannyr
          last edited by

          @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.

          L 1 Reply Last reply Reply Quote 0
          • L Offline
            lmannyr @motific
            last edited by lmannyr

            @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.

            1 Reply Last reply Reply Quote 0
            • D Offline
              difiks
              last edited by stephenw10

              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.

              1 Reply Last reply Reply Quote 0
              • T Offline
                thezfunk
                last edited by thezfunk

                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 8.8.8.8, 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 8.8.8.8 again. So, when installing Netflix app, give it access to 8.8.8.8 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.

                XentrkX 1 Reply Last reply Reply Quote 0
                • B Offline
                  Ben Utzer Banned
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • XentrkX Offline
                    Xentrk @thezfunk
                    last edited by

                    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.

                    https://gitlab.com/grublets/youtube-updater-for-pi-hole/-/tree/master
                    https://discourse.pi-hole.net/t/youtube-script-seems-to-be-working-very-well/31316

                    pfSense 2.4.4_2 | Intel i5-3450 @ 3.10GHz  | AES-NI enabled |  pfBlockerNG | Snort
                    Blog Site: https://x3mtek.com || GitHub: https://github.com/Xentrk

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      alex0493
                      last edited by

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

                      N 1 Reply Last reply Reply Quote 0
                      • N Offline
                        nprog @alex0493
                        last edited by

                        @alex0493 It won't work on smart TVs as Adblock won't install on a tv.

                        T 1 Reply Last reply Reply Quote 0
                        • T Offline
                          thezfunk @nprog
                          last edited by

                          @nprog Use Smart YouTube TV

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.