Youtube ads not being blocked by AG Home

streamsurfer

New Member
Need help, AG Home not blocking youtube ads. My friend using Pi-Hole added a Regex filter and it worked for him. He suggested to try one of the two to work, but in his case 1st one worked.

Please tell me correct syntax for Regex for below for AdGuard Home or include this in my custom filter or add it to AdGuard Blocking filter list.

Need to try for YT Ads (1st one worked for my friend using Pi-Hole) :
^r[0-9]{1,99}-sn-[a-z0-9]{1,99}-[a-z0-9]{1,99}\.googlevideo\.com$
^r[0-9]{1,99}-sn-[a-z0-9]{1,99}[a-z0-9]{1,99}\.googlevideo\.com$

Please put this on priority. Need this for the benefit of AdGuard Community. I am not a good RegEx coder as my trials failed.
Or make AdGuard Home accept Pi-Hole like RegEx syntax so it can be a copy paste.


Admin : Please delete this or the reply i posted in another thread as you see fit or move to correct subforum. [ https://forum.adguard.com/index.php?threads/does-adguard-block-youtube-ads.42371/#post-214736]
 

Boo Berry

Moderator + Beta Tester
Moderator
AG Home can't block YouTube ads, as Google serves ads using the same domains they serve video content for, so blocking the ads breaks the videos.

Chances are your friend is using another ad blocker (e.g. browser extension ad blocker which can do cosmetic filtering) alongside Pi-Hole.
 

streamsurfer

New Member
I understand your point mod. I also understand that Google is using the same servers but Ad blocking is working for him.My Friend isn't using anything else besides Pi-Hole list on his server in chrome/edge. Atleast try should be done instead of giving up.

This regex below identifies the ad server & blocks it per him.
I am not a RegEx Expert hence asking help in this forum.
I need help in what to write in AdGuard Home > Filters > Custom Filtering Rules.
Can you please tell me what should i put in for two rules. One of them should work. Hence i need it so i can simply paste it and try. If not i can remove these custom filtering rules but kindly request you to not simply close this post. at least give me the regex syntax to check myself.

Need to try for YT Ads (1st one worked for my friend using Pi-Hole) :
^r[0-9]{1,99}-sn-[a-z0-9]{1,99}-[a-z0-9]{1,99}\.googlevideo\.com$
^r[0-9]{1,99}-sn-[a-z0-9]{1,99}[a-z0-9]{1,99}\.googlevideo\.com$
 

Snapsz

New Member
Hello!
This is my Pi-Hole regex entry. I developed this. I just switched to AdGuard Home and it works fine for me too. It blocks ads from a dns server that is not the same as youtube video. It blocks about 50% of ads from Youtube videos.

Copy this: AdGuard Home > Filters > Custom Filtering Rules

! Youtube blacklist by Snapsz
/^r[0-9]+-+sn-+[a-z0-9]+-+[a-z0-9]+\.googlevideo\.com$/
 

Boo Berry

Moderator + Beta Tester
Moderator
Unfortunately you have to be careful blocking anything with the googlevideo.com domain, as doing so can just as easily break the videos too. Just because it may work for you (which could rely on geolocation, your Google account, etc.) doesn't mean it will work for everyone else.

That's why it's not recommended to attempt blocking YouTube ads via HOSTS or DNS. If anyone decides to try this, do know you're on your own doing so, and that it could break videos.
 
Top