How to block youtube video advertising?

I installed adblock on my router OpenWrt with several blacklists.

Ads on youtube videos are blocked with ublock installed on the browser. How do I do that?

It’s import to note that Adblock via your router blocks ads via DNS sinkholing (purely via domain.example.com) while browser based adblockers like uBlock Origin are able to look at the contents of the URL (e.g: domain.example.com/folder/advertise.js).

uBO can block the javascript that serves the ad, while DNS based adblocking can only block the hundreds (if not thousands) of subdomains YouTube uses to serve ads.

On top of this, YouTube also serves regular video content on the same subdomains that advertising content is found on, therefore making it extremely inefficient to block YT ads via DNS.

2 Likes