Block Ads on Android
This tutorial details a simple procedure to block ads on Android, both in apps and web browsing, without rooting your smartphone.
Here are the required steps:
Install F-Droid
Note: This step is optional but recommended. If you don't want to use F-Droid, continue with DNSFilter installation.
F-Droid is a free/libre app store for Android. It lets you search, install, and update applications.
To install it, visit the official website or scan this QR code:
After downloading the package, tap Open.
If you see a message about unauthorized installations from unknown sources, refer to Appendix A to enable them before continuing.
The installer will open - tap Install.
Open F-Droid and wait for the app catalog to update.
We're now ready to install DNSFilter!
Install DNSFilter
Install via F-Droid
Note: Follow this section if you completed F-Droid installation, otherwise proceed with manual installation.
In F-Droid, search for DNSFilter.
If you see an unknown sources warning, refer to Appendix A.
On the installation screen, tap Install.
Continue to Configuration and testing.
Manual Installation
Download the DNSFilter APK directly from:
You can scan this QR code:
After downloading, tap Open then Install.
Configuration and Testing
Launch DNSFilter and accept required permissions.
When active, DNSFilter shows this screen.
You can now return to your home screen or switch apps - ad blocking remains active in background.
To disable filtering, use the Close button in DNSFilter.
A key icon in the status bar indicates DNSFilter is active.
Test with an app that normally shows many ads to see the difference!
Block More Ads
To enhance blocking, you can add filter lists like EasyList.
In DNSFilter, go to Advanced Settings > Configure Filter Update. Add EasyList by editing the new item with this URL:
https://easylist.to/easylist/easylist.txt
Then validate.
Exit Advanced Settings and tap Refresh Filter on the main screen.
EasyList is now active. You can similarly add other lists like Hosts-file.net Ads Servers.
Remove DNSFilter Status Icon
When active, DNSFilter shows both a key icon and small shield in the status bar.
To remove the shield icon:
- Pull down the status bar
- Long-press DNSFilter is running
- Check Block all notifications
Block Stubborn Ads
Warning: This section is for advanced users. If you're unfamiliar with hosts files, skip this to avoid malfunctions.
Most ads should be blocked, but some apps use custom ad servers. To block these:
- Identify the domain either:
- From DNSFilter's log when the ad loads
- By clicking the ad to see its URL in your browser
In DNSFilter, go to Advanced Settings > Configure Additional Hosts.
Add the domain at the file's end (e.g., n0ve1st0ry.gameloft.com).
After clearing the app's cache, the ad should be blocked. DNSFilter will show blocked domains:
Block YouTube Ads
This method cannot effectively block YouTube ads in the official app. Alternatives include:
Note these currently don't support YouTube account access (subscriptions/playlists).
Another option is Adblock Browser (from Play Store), which blocks ads when accessing YouTube via browser.
Appendix A: Unknown Sources
You may need to enable unknown sources for F-Droid/DNSFilter installation.
Tap Settings and enable Unknown sources in security settings.