If you're using Chrome, that's why. Chrome bypasses your DNS settings and uses Google's DNS because they found using the system settings was affecting their ad revenue. Using Firefox fixes this, although in Firefox you can just use ublock origin anyway, which works even better.
The developers of an app that uses ads can also just route the traffic through a server that also provides something crirical for the app to work. You'd have some CDN probably serving both. I mean, in the long run, if app developers work againat it, you can't block apps from showing ads by blocking network traffic.
I doubt that the Android security model lets apps know what's happening on overlays, though, as doing so would create issues for Android as an OS. So apps that cover up ads are hard for app developers to defeat.
So what I never understood, why is this free and is there an risk attaches to using it, e.g. adguard or nextdns logging your traffic or something. I have always been suspicious, for no good reason to be honest, of using such a dns service.
I set up an account with NextDNS and set them as my DNS server. It blocks ads, trackers, malicious websites. You can set up custom blocks, rewrites, and it has logging.
Plus it's free under 300k queries a month. I've been using it for years and never hit my limit. I should pay for it though, it's not expensive and I've gotten a lot of value out of it.
I'm surprised that I haven't seen anyone mention this, but Firefox for Android lets you install from a list of compatible extensions. You can use uBlock Origin as normal.
I've been using AdGuard on my phone (OnePlus 6T) and tablet (Tab S7 FE) for quite some time now. Neither device is rooted.
I got AdGuard lifetime license on sale from StackSocial a while back. The app isn't on the Play Store (if you look for it, you will instead find an extension for the Samsung browser or something). They have you download the .apk from their site, and then you can set up the blocking how you prefer.
It works by setting up a local VPN. I think there's other ways to use it but I didn't feel the need to tweak further. Because it acts like a VPN, all app traffic flows through it so ads are blocked pretty much system-wide. Browsers, social media apps etc. Honestly I'd highly recommend it.
Honestly not that much. It seems pretty lightweight. It has it's own measurement of battery usage (can't say how accurate it is but still better than nothing perhaps?) and on the tablet it has consumed around 9mAh, which I guess isn't too crazy.
Blokada likes to eat up battery because all filtering takes place on your device. The more lists you have the worse it gets.
AdGuard uses their own servers to block stuff and only does some cosmetic filtering in their app. In my experience it almost didn't affect the battery at all.
If you're coming from Blokada, check out AdAway. It works the same way unrooted, setting itself as a VPN that can be toggled on and off. So if you're coming from Blokada, it's like that, but without the recent-ish subscription stuff - so you'll feel right at home.
I use DNS66 downloaded from F-Droid. It registers itself as a VPN, but it's actually a DNS filter, not a VPN. It works to filter ads on most apps, and you can individually disable it for specific apps if needed.
I also use the Firefox app, which supports a few add-ons (much less than the desktop version), including uBlock and some similar options
I'd recommend one or both. They're working great for me on a non-rooted Pixel 4a 5G
NextDNS (free up to 300k queries/month, doesn't require any additional apps) or AdGuard (paid but has cosmetic filtering, they have their own app available on their website). Both are fast and don't require root.
AdAway is what I use on my rooted devices. It does have a rootless mode as well and if it's anywhere near as good as the root mode I would absolutely recommend it. I haven't tested it though so give it a shot.
AdAway works very well unrooted. It sets itself as a VPN that you can toggle on/off within the notification or app. I've had no issues with it, personally. Recommended, especially if coming from Blokada since they moved to subscriptions.
They've moved to a cloud-based, subscription model for the new version (Blockada 6). You can still get Blockada 5, which is offline and free, for now, but it may be phased out at some point.
Adaway is the go to thing for me, it's FOSS and Supports VPN as Well as Root Mode. Also it already has some Blocklists integrated and you can easily add more and the battery drain is near to negligable.
I use Fennec (fork of Firefox stable) as my main browser and it has uBlock Origin, which has tons of filters. They even added specific mobile ones for annoyances like cookie banners. On top of that, I set my private DNS to dns.adguard.com. Ads aren't getting thru my defenses!
Adguard is the best option for system-wide, rootless ad blocking on Android IMO.
It's the best because it also performs cosmetic filtering to reclaim the empty space that most other blockers leave behind after removing an ad from a web page. This makes web pages look much cleaner and is something that I value in any adblocker, mobile or otherwise. The free version works across any browser or embedded webview instance within apps, and the paid version filters all ads within apps as well. I can't recommend it highly enough.
Completely negligible impact on battery life as well.
You can set up private DNS like others have suggested here, dns.adguard.com
I've found it's pretty handy removing ads overall. The first few links on Google, the sponsored section often doesn't work (since sponsors are ad based)
I'm kinda surprised that didn't see anyone recommending RethinkDNS.
It's a DNS and Firewall app that works through VPN. You can choose through a bunch of servers that they offer, including the RDNS Plus that you can select the blocklists you want, or just chose other DNS of your choice and block the domains using local blocklists in the app. Using the firewall function, you can block or allow individual domains or apps. Been using it for like two years.
But that's not as effective these days, since port 53 is only used for traditional DNS queries, so it won't work if the app uses DoH/DoT/DoQ etc (TCP 443/UDP 853).