How do I block ads on YouTube?

Yup, right now the best resort (for browsers mostly) is to use an adblocker add-on, as there is no 100% reliable solution on Pi-hole at the moment. The script blocks YT servers that serve both ads and video, so that's why sometimes a video breaks because the script blocked a "video-only server". And the other videos that are plagued with ads & video are not playable since some YT servers serve both ads & video.

For devices that are not ad-blocking capable like: ChromeCast, Smart TVs, Apple TV, Amazon Fire this works 70-85% that's why many have resorted to Pi-hole for ad-blocking to these devices.

But since now YT is aware about people trying to block these r#--- servers, they actually punish you sending more ads when you're trying to block the connections from any r#---sn-gfjdgdkfgkd... server, so this script method could be useless to many.

There is another Reddit thread that is mentioned at the very beginning of this topic, where some said to have luck by doing this:

  1. nslookup manifest.googlevideo.com

  2. Check what IP throws in the result: Eg: 216.58.194.206

  3. nslookup 216.58.194.206

  4. If you see one server in your result it could mean that is the server geographically closest to you that serves ads (in theory).

So you would then have to create a custom hosts file according to this guide and add a line like this:

216.58.194.206 manifest.googlevideo.com

Again, the IP you see could change, so you would have to do the steps in sequence.

I would like to see if there is another solution in the future, but for the most part it is what it is right now, sadly.

1 Like