How do I block ads on YouTube?

blacklisting

#285

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 manifest.googlevideo.com (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…


#286

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 8.8.8.8 and 8.8.4.4 can’t go through.


#287

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

r1—sn-q4fl6ney.googlevideo.com
r5—sn-q4flrnee.googlevideo.com
r5—sn-q4flrn7r.googlevideo.com
r3—sn-q4fl6nlz.googlevideo.com
r5—sn-q4flrner.googlevideo.com
r5—sn-q4flrn7r.googlevideo.com


#292

I tried blocking the ads using the regexp:

^r[0-9]+---sn-+[a-z0-9]+\.googlevideo\.com$

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

So no luck thusfar.


#293

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.


#294

So that’s a reason for giving up?


#295

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

Pi-hole is not one of those doors.


#296

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.


#297

Then please use that door.


#298

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.


#299

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.


#300

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.


#301

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.


#302

That is not an opinion, it a fact.


#303

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


#309

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


#310

Hello.
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): https://raw.githubusercontent.com/FleuryK/pihole-ytadblock/master/ytadblock.txt


#311

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


#312

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