The simplest way to block ads on Android

Block ads system-wide on Android using RethinkDNS.

An easy way to block ads throughout your Android device is by using a DNS resolver that supports blocklists.

How it works:

When you visit any website on your device a DNS resolver looks up the domain name and “converts” it into an IP address to find the site and serve it to you. This lookup also applies to any connections made by the apps on your device. This DNS resolver is usually provided by your ISP. We can change this resolver to one provided by RethinkDNS. This custom DNS resolver by RethinkDNS will now drop the connections to ad-related domains and only serve us the websites we want to visit. Since DNS can be set up on Android at the device-level, this will block all ad-related connections that apps on the device try to make.

Steps:

  1. Go to rethinkdns.com/configure
  2. This page has over 170 blocklists. These blocklists are just a list of ad-related and other tracking domains that will be blocked by the DNS resolver.
  3. To keep things simple, we will pick just one or two lists for our configuration.
  4. My recommendation would be to pick the list called 1HOSTS (PRO). But any one of the lists shown in the ‘rethinkdns-recommended’ filter should work well.
Screenshot of RethinkDNS blocklist selection
RethinkDNS – Blocklist Selection
  1. Click on the DoH/DoT toggle button just below the filters. We want to get a DoT (DNS-over-TLS) name which can be used on Android.
RethinkDNS – DNS over TLS configuration
  1. Based on your blocklist selection, a DNS resolver name will be generated. Click on the text to copy. This will usually be in the form of
1-aababaa-example.max.rethinkdns.com
Code language: CSS (css)
  1. This is your DNS resolver name which you can use on Android.
  2. On your Android device, go to Settings > Connection & sharing > Private DNS
  3. Pick the ‘Specified DNS‘ option and enter the DNS resolver name generated by RethinkDNS above (Step 6).
Screenshot of Private DNS configuration setting in Android
  1. Save and you’re done.
  2. You now have ad-block set up on your Android device. You should see a drop in ads across apps and browsers.
  3. If some sites or apps are not working, you can go back to the Rethink website and pick another list. You will generate a different DNS resolver name and you can try that on your device.

Since this is a quick and simple way to block ads, the downside to this method is that you cannot block specific domains if you want to. To do that you need to get an app that lets you pick domains to block like the RethinkDNS app or the Blokada app.


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *