Why YouTube Ads with VPN and NextDNS on Android?
I use NextDNS on my android phone as "Private DNS". I use VPN almost all the time. So, when I connect to proton vpn with private DNS turned on, DNS requests still goes through NextDNS servers(I can confirm this by seeing the logs).
Problem is that, Youtube app does not show Ads while VPN is off. But if I am connected to VPN, it shows Ads. But nextdns is still blocking ads on other apps while vpn is turned on)
Why this thing happens?
NextDNS by itself can't block YouTube ads as they are served from the same server.
To simplify this, abc.com gives both the video and the ad, with DNS you can only block or allow abc.com so if you block the domain, it won't play anything at all.
If you're in a nation that's sanctioned by the US you likely won't get ads, Russia recently had this happen and a few other nations don't get ads either. If you're connecting to a country where YouTube can legally serve ads you'll get ads as usual.
This is my thought though as there isn't enough info to be for sure, you could be living in a country where ads are normally served but something from your ISP/IP might lead to ads not being served for some reason etc.
The simplest answer is as above, NextDNS can't block ads that are given from the same domain/site as content as DNS simply can't do that unless you have access to the entire data, and that isn't done for privacy.