It's hard to get rid of video ads with pi-hole afaik, because pi-hole works on the DNS level and video ads are a few layers higher. For normal ads I don't seem to need an adblocker anymore, pretty much the stock block lists and a few I found that were recommended, but video ads still need the adblocker.
Self Hosted - Self-hosting your services.
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules
- No harassment
- crossposts from c/Open Source & c/docker & related may be allowed, depending on context
- Video Promoting is allowed if is within the topic.
- No spamming.
- Stay friendly.
- Follow the lemmy.ml instance rules.
- Tag your post. (Read under)
Important
Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!
- Lemmy doesn't have tags yet, so mark it with [Question], [Help], [Project], [Other], [Promoting] or other you may think is appropriate.
Cross-posting
- !everything_git@lemmy.ml is allowed!
- !docker@lemmy.ml is allowed!
- !portainer@lemmy.ml is allowed!
- !fediverse@lemmy.ml is allowed if topic has to do with selfhosting.
- !selfhosted@lemmy.ml is allowed!
If you see a rule-breaker please DM the mods!
Ah, that's unfortunate, because video ads during videos are the ones I find the most bothersome.
I mostly installed the lists found on https://firebog.net/, that's it.
From my experience, the only way to get rid of YT ads is Brave browser. Firefox with uBlock Origins is not enough, or maybe I just misconfigured it. I haven't tried Librewolf... but I think it'd be the same.
I think you're missing a blocklist or two if you're still getting YT ads. Hasn't been a thing for us for at least four years now.
Pihole will only ever be able to block so much, because it works at the domain level. When ads are served from the same domain as the desired content, which I believe is the case for youtube, Pihole is ineffective.
Adblocking plugins aren't limited by this and can filter the actual content and HTTP requests made by the browser.
Thanks!
Adblocking plugins aren’t limited by this and can filter the actual content and HTTP requests made by the browser.
Why is this the case? What rules do Adblock plugins use that allow them to determine that something that is being served is an ad? I understand from what you are saying that Adblock will block on the basis of the HTTP requests instead of filtering at the DNS level - do ads come with specific HTTP headers that are not processed by the pi-hole DNS server and thus can't be used for filtering? I don't fully understand yet the details of how the two ad-blocking mechanisms operate, so their differences are not obvious to me.
Let's say YouTube has a video and 2 ads:
- The video is served from
videos.example.tld/video.mp4
. - The first ads is served from
videos.example.tld/ads/ads1.mp4
. - The second ads is served from
ads.company.tld/ads2.mp4
.
PiHole will be able to block only (3) because DNS applies at domain level, as in videos.example.tld
. DNS requests only send the domain part and re-use the response for all addresses using that domain.
Browser extension, on the other hand, sees a request to .../ads...
and block it since it handled each HTTP/S request and know the full URL.
Thank you - that makes sense!
I think I understand why this is done now. Most HTTP requests are hidden by the SSL encryption, and the keys to decrypt it are client-specific. So, if one wants to block ads at the network level without needing to get the SSL keys of every client that connects to the network, then this is the most specific amount of information that you can provide the PiHole with. The HTTP blocking needs to be set up in a client-specific manner, and that's why they work well as browser extensions.
I stood up an Adguard Home instance on my unRAID server and it's significantly better so far. I still have pi-hole running on a Rpi3 as secondary in case of server maintenance. I ran pi-hole for years and tried Adguard on a lark and so far, I prefer it and seems to be more effective.
I have a couple of blocklists loaded into the family Pi-Hole:
- Steven Black's master list
- Ad-Wars
- Ad Away
- hostsVN
- yoyo.org's dynamic list
That seems to have knocked out maybe 94% of the ads we'd otherwise see. I can't speak for the rest of the famiy, but I still use uBlock Origin for Firefox to handle Youtube ads.
My strategy for the medium to long term is this: Given that browser-based adblocking is more and more likely to be killed off, or at least badly nerfed, I'm pushing adblocking out to the Pi-Hole and will leave streaming service ad blocking in the browser for as long as possible. If and when that eventually goes away I already have a bot running and used somewhat heavily to download video streams to view with Kodi or VLC.
Thanks! I will keep those lists in mind. I have turned off my Raspberry Pi since then because I had some DNS issues, but:
Given that browser-based adblocking is more and more likely to be killed off, or at least badly nerfed, I’m pushing adblocking out to the Pi-Hole and will leave streaming service ad blocking in the browser for as long as possible.
That's a good point and it appears like we are getting closer to that reality.