Regex to block YouTube ads

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

Trying to block youtube ads, since they have become more of a nuisance due to Covid.

Actual Behaviour:

I am trying to create a regex filter to blacklist youtube ads. A youtube ad server name looks like "r4---sn-a5meknsy.googlevideo.com". My regex is "^r([0-9]+)---sn-([a-z-0-9])+.googlevideo.com$". I validated my regex through https://regexr.com/. When I enter my regex in PiHole admin console to blacklist, I get a message that my regex blacklist is successfully created. However, in a few seconds, I see an exclamation in the navbar at the top (to the left of hostname). When I click on the exclamation, I see an error stating " Encountered an error when processing blacklist regex filter with ID 10:". I am including a screenshot of the error, as well as the exclamation mark in the navbar.

Debug Token:

https://tricorder.pi-hole.net/rzborus6ej

It's not going to happen.

Search and read the various failed attempts in this forum.

1 Like

[a-z0-9] matches any single lowercase letter or any single digit

Are there any successful pi-hole strategies for blocking youtube ads?

No, there aren't.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.