How do I block ads on YouTube?

Hi,

Thanks for sharing this list.
Unfortunately, videos do not load anymore with this list on my side :confused:

Ofcourse that doesn't work, did you read all of this thread ? Then you should know, install "uBlock Origin" in your browser and all ads are gone.

Now I can watch videos with 1 ads by videos (max 2) against 4/5 before for several youtubers, so yes, I read this thread.

Why do you have this reaction ? We know it's not the best way to remove youtube ads, I think it's not a reason to give up. Just ask you one question : "Maybe they have requirements to continue this topic?"

In my home, on Pc we have ads blocker, we use it, it's ok, but we watch more videos with youtube application on TV, tablet or smartphone. For these support, the only free way that I know, it's the pi-hole solution. If you have an other solution I'm totally open.

Unfortunatly i have no solution for your setup, i only use my PC for the internet / youtube.

I feel like this is going to always be a cat and mouse game. What I've done is a wildcard block on all googlevideo.com subdomains and then whitelist when i hit an endless pinwheel.

To whitelist, I'll disable for 30 seconds, reload video and presto.

FWIW, I watch 80% of my YT on an Xbox One, so browser addons or vpns are out.

Hello,

I also have the same problem. I have to review the list because I had to block YouTube videos instead of blocking ads.

Just refresh the page or just disable for 30 seconds pi-hole and that solves the problem.

Try removing domains like this unsure really.

r1.sn-n5pbvoj5caxu8-nbo6.googlevideo.com
r2.sn-n5pbvoj5caxu8-nbo6.googlevideo.com
r4.sn-n5pbvoj5caxu8-nbo6.googlevideo.com

I found that if a video doesn't load, I press back and select the video a second time, that seems to work for me.

Unfortunately this list isn't available, now the link says:

Error
The requested share does not exist anymore

The answer is True.
I have removed the links.
I mean I dont really know what is on them.

You could find someone with a copy and share?

it works like a charm, but I keep seeing this ads empty windows in the video

hi is that sill possible to block youtube ads ? do you have a filter ? thanks :slight_smile:

Try these there 2 month old.

encrypted-tbn1.gstatic.com
encrypted-tbn10.gstatic.com
encrypted-tbn2.gstatic.com
encrypted-tbn3.gstatic.com
encrypted-tbn4.gstatic.com
encrypted-tbn5.gstatic.com
encrypted-tbn6.gstatic.com
encrypted-tbn7.gstatic.com
encrypted-tbn8.gstatic.com
encrypted-tbn9.gstatic.com

photos-ugc.4googleusercontent.com
photos-ugc.l.googleusercontent.com
photos-ugc2.googleusercontent.com
photos-ugc3l.googleusercontent.com
photos-ugc6.googleusercontent.com
etc

I wrote a script (on github) to scan and add automatically addresses in the blacklist file.
After watching several videos it reduced number of ads significantly, without blocking main videos.

4 Likes

Thank you, I've installed it and have rebooted my Pi (needed to run sudo chmod +x ads-catcher.sh after using wget as I saw in the log that permission was denied). There are so many ads at the moment. Looking forward to seeing how this goes.

1 Like

you need to buy Youtube premium.
sadly you need to pay to block the adds.
Regards.

I think there is a timing issue with a double request or something from browser and some how slips past the pihole. I answers the second request and plays ads.
I have 4 piholes connected in series now.
Updating block lists is a problem but do able.
Happy hunting.

Whats your YouTube Complete URL?

For example

Then try clearing all browser Cache and try again.

I installed your script and after a few minutes nearly a hundred of youtube urls where set on the blacklist. A few videos more and all main videos were blocked. any ideas?

thank you!