Let’s face it, ads — pop-ups, pop-unders, blinking GIFs, flashing, with loud sound, stealing our network bandwidth, etc. — are super-annoying!

⏩ Note: You may skip to the end of my short article if you just want to see what you can try at home and what is likely to work (hopefully).

Ad blockers for browsers (most of them, at least) still work as of today, although some of them may occasionally display “glitches” when companies pushing ads into all of our screens try to overcome the ad protections we use. Ad Block Plus for Firefox, for example, as well as Ghostery for Firefox, worked almost flawlessly until recently, when YouTube started implementing even heavier counter-ad-block protections and started refusing to display the YouTube videos unless you disable your ad-blocker browser extensions! This was the moment when I had to try uBlock Origin for Firefox add-on and luckily it worked, no ads in YouTube — for now…

But ad block extensions for browsers have one major drawback — they can’t filter ads in mobile apps. Basically, your anti-ad protection is “locked” to your browser where the specific ad extension is installed and runs. Once you are outside of the browser, you have no protection anymore.

So I started looking for a better solution. I tried a few things and after a couple of days of research and trying various options, seems that for our local home network, a pretty good option is to set a custom DNS server that can filter popular advertising servers. One such server is AdGuard’s DNS (dns.adguard.com) which is considered generally to be safe and pretty reliable.

“AdGuard DNS (dns.adguard.com) is generally considered to be safe for Android devices. AdGuard DNS is a free service that provides an additional layer of security by blocking ads, tracking, and malicious websites at the DNS level. By using AdGuard DNS, you can potentially reduce the risk of malware infections, phishing attacks, and other security threats while browsing the internet. […]”
— “Is DNS AdGuard.com safe for Android?

I first saw a mention of dns.adguard.com in the XDA Developers article “How to block ads on Android, with root and without root“, tested it, and it worked on our Android phones. Then for some reason, the next day the Android phones complained that they cannot access the DNS server anymore — no idea, why.

The DNS server can be added normally to your Android phone if you are with Android 9.0 or later. Open SettingsPrivateDNS → enter a custom DNS hostnameSave. Initially this worked for a day (we haven’t seen a single annoying ad on our phones during this time!) but then something happened and this DNS server stopped providing the DNS service.

PrivateDNS option Android phones
This setting worked for one day on our Android phones, then stopped.

After that, I tried a few other options, and finally — what worked — was to add the AdGuard DNS to our home router’s settings. The same DNS server which stopped working on Android, was working when we tried to set it as a “Static DNS” in the router’s settings web page.

What worked

I will test this setup during the next few days and if needed, I will update my blog post. But for now, it works — we see no ads on any of the devices (computers, laptops, phones) that are connected to our home network.

Steps:

1.  Open the home router’s configuration page IP address. Quite often it is 192.168.1.1 — if it is not, search online for your router maker/model, or ask your ISP provider (if the router was configured by their IT people).

2.  Somewhere in ConnectivityLocal Network → try adding the IP address of the dns.adguard.com DNS server — currently it is 94.140.15.15. Enter the IP address, press Apply, and wait for the router to accept the setting. (Note: Here you can enter any DNS server IP address that you know will work and will filter ads.)

Setting a custom DNS server in your router's web page.
Set a custom static DNS in your router’s config page.

Note:  To make things more bulletproof, you can also add a “Static DNS 2” on this page. Thus, if for some reason the first DNS server is not working at any given moment, the second DNS will act as a backup DNS. As a backup second DNS, I can suggest using the Cloudflare DNS serverone.one.one.one (1.1.1.1).

3.  To test if everything works, try opening a few websites on the computer or laptop — if they open normally, then great, this is a good start! After that, in a browser (or a browser profile) which does not have an ad-blocking extension installed, try accessing a website which you know for sure is displaying ads and see if they show up — if you see no ads (or you do see some ads, but in a much lesser quantity than usual), then the ad filtering is working as well! After that, on your phone (again, connected to your home network), try accessing a mobile app or a game that usually shows ads and if you see no ads there either — perfect!

Leave a Reply

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