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:
- Go to rethinkdns.com/configure
- 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.
- To keep things simple, we will pick just one or two lists for our configuration.
- 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.
- 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.
- 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)
- This is your DNS resolver name which you can use on Android.
- On your Android device, go to Settings > Connection & sharing > Private DNS
- Pick the ‘Specified DNS‘ option and enter the DNS resolver name generated by RethinkDNS above (Step 6).
- Save and you’re done.
- You now have ad-block set up on your Android device. You should see a drop in ads across apps and browsers.
- 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.
Leave a Reply