9
How have you optimized your Pi-hole?
(mander.xyz)
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.
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!
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!
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:
videos.example.tld/video.mp4
.videos.example.tld/ads/ads1.mp4
.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.