# How do I block ads on YouTube?

**URL:** <https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253>\
**Category:** Help\
**Tags:** blacklisting\
**Created:** [October 19, 2016, 12:09am UTC](https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253 "2016-10-19T00:09:23Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [January 7, 2017, 2:23pm UTC](https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/14 "2017-01-07T14:23:43Z")

</div>

> [@Excelerate246](#):
>
> would that mean the RPi would expend more resource to complete tasks

Yes.

> [@Excelerate246](#):
>
> and most importantly Domain Siblings

Very cool. Thanks!

We know from past experience that `dnsmasq` can handle over a million host entries. Google's reach is vast, so who knows how many fingerprints they use.

I was thinking about this script last night and if you really wanted to try it, you can put the braced expansion into an array and not have to figure out all of the domains as a community effort.

```auto
# Brace expanded array of Google Video fingerprints from sn-aaaaaaaa to sn-99999999
fingerprints=($(echo sn-{{a..z},{0..9}}{{a..z},{0..9}}{{a..z},{0..9}}{{a..z},{0..9}}{{a..z},{0..9}}{{a..z},{0..9}}{{a..z},{0..9}}{{a..z},{0..9}}))
# For each fingerpint, 
for ((i = 0; i < "${#fingerprints[@]}"; i++)); do
  # Generate the list based on https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/11?u=jacob.salmela
  echo r{1..20}---${fingerprints[$i]}.googlevideo.com
  echo r{1..20}.${fingerprints[$i]}.googlevideo.com
done

```

Oh and just a tip, don't try this on an older Pi model as I was experimenting and it locked up my Pi for a good while. Ctrl+C couldn't even cancel it 😄

---

_[View the full topic](https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253)._
