Change your DNS provider to block phone ads (Android)
I tried blocking ads on my Android phone using the AdGuard DNS app, hoping it would stop one app from spamming another with adverts. It did not fix the issue at first. Then I asked Google Gemini for help and the solution turned out to be simple: change the DNS provider using AdGuard.
By default, the DNS provider was set to Google and the mode was set to Automatic. I changed the DNS provider to dns.adguard.com and switched the mode to Private. After that, it worked. Instead of loading ads, the app now shows blank spaces where ads used to appear.
What you need
- An Android phone
- 5 minutes
- The AdGuard DNS hostname:
dns.adguard.com
Why this works
Many in-app ads load from known advertising or tracking domains. When you use a DNS provider that blocks those domains, the phone cannot resolve the ad servers, so the ads fail to load.
Step-by-step: Change Android DNS to AdGuard
1) Open Private DNS settings
- Open Settings
- Go to Network & internet (or Connections on some phones)
- Tap Private DNS
2) Set the provider and mode
- Select Private DNS provider hostname
- Enter:
dns.adguard.com - Save your changes
If you are doing this inside the AdGuard DNS app, the goal is the same:
- Provider:
dns.adguard.com - Mode: Private
What you should see after switching
- Ads stop loading in many apps
- You may see blank boxes or empty spaces where ads would normally appear
Troubleshooting
If pages stop loading or internet breaks
Some networks block Private DNS. If that happens:
- Go back to Private DNS
- Switch from Private to Automatic
- Try again on a different network (cellular vs Wi-Fi)
If ads still appear
DNS blocking will not stop everything. Some apps serve ads from the same domains they use for content. In those cases, DNS changes may not catch them.
Rollback (restore default behavior)
- Go to Settings → Private DNS
- Change it back to Automatic (or Off if available)
- Save