Skip to content

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

image 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:

F-Droid QR-code

After downloading the package, tap Open.

Opening F-Droid APK

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.

F-Droid installer

F-Droid installation

F-Droid installed

Open F-Droid and wait for the app catalog to update.

F-Droid updating

We're now ready to install DNSFilter!

Install DNSFilter

Install via F-Droid

image Note: Follow this section if you completed F-Droid installation, otherwise proceed with manual installation.

In F-Droid, search for DNSFilter.

DNSFilter in F-Droid

If you see an unknown sources warning, refer to Appendix A.

On the installation screen, tap Install.

DNSFilter installer

DNSFilter installing

Continue to Configuration and testing.

Manual Installation

Download the DNSFilter APK directly from:

You can scan this QR code:

DNSFilter QR-code

After downloading, tap Open then Install.

DNSFilter installer

DNSFilter installing

Configuration and Testing

Launch DNSFilter and accept required permissions.

Launching DNSFilter

DNSFilter VPN permission

When active, DNSFilter shows this screen.

DNSFilter active

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.

DNSFilter status icon

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

Adding EasyList

Then validate.

EasyList added

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:

  1. Pull down the status bar
  2. Long-press DNSFilter is running
  3. Check Block all notifications

Disable notifications

Block Stubborn Ads

image 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:

  1. 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 custom 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:

Domain blocked

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.

Unknown sources warning

Tap Settings and enable Unknown sources in security settings.

Allow unknown sources