Blog

DNS Ad-Blocking with Adguard

Posted November 6, 2017. Updated August 24, 2018.

Update - Adguard and other network tools are facing arbitrary sanctions by Apple, despite not violating App Store guidelines. Read Adguard’s post for more information, and consider leaving Apple feedback to encourage a reversal of judgement.

I started off using Adguard’s free DNS to block ads on my phone. It’s awesome, because it rejects tracking and advertising in most applications, not just your web browser. To set it up, you’ll need to edit your Wifi’s DNS field for every single network you use: home, work, school, etc. There’s a regular server, or one for “family protection” that blocks porn and tries to enforce safe-search settings. Just copy and paste whichever one you want; two servers are provided for reliability, and the longer addresses are for IPv6.

Snapchat downloads ads from snap-ads.snapchat.com, but they use app.snapchat.com for messaging. Since they're different, Adguard's DNS refuses to download ads, but you still get snaps. Some apps will send everything through one domain, so the only way to block ads is by blocking everything, which doesn’t work. The YouTube app sends everything together, so you have no choice, unless you use a web browser and modify the page.

Unfortunately, you can’t edit your cellular data DNS without using a custom VPN on your iPhone. I see this as room for Apple to step up and increase user-privacy, but at least you can take control with Adguard until Apple covers the gaps. And having to edit every wifi network is a little obnoxious, so for me, it was worth purchasing Adguard Pro for iOS. Esecially since I'm more concerned about using my mobile data, being able to control the network connections is very important. If you have an Android, you’ll have to pay more for Adguard, but you can also apply for a free license. There are many firewall apps, such as NoRoot Firewall, but you can find something for free and get different blacklists.

DNS filtering also shows what companies are doing to violate your privacy or consume your bandwidth. Requests for external fonts, Google Analytics, or app-troubleshooting services can be blocked, making your phone more private, save battery, and run faster.

As you use different apps or monitor your connections, you'll see new stuff and maybe need to modify things depending on what you want. Adguard has documentation for syntax, which was very helpful in learning to modify YouTube's mobile website. I can now listen to music with my screen off, which I've described in this post.

After using my phone for a bit, I would go through and identify unnecessary or unwanted requests, gradually fine-tuning everything and trying to have the bare minimum amount of connections. Now websites are much faster and apps use less data, so I'm very happy.

Here are links to my blacklist and my whitelist, so you can copy/paste what you want. It's also annotated below, because using the list without understanding it will cause your apps to break unexpectedly. I've taken an extreme approach and deliberatley made things break, because I don't have time for bad websites that are obnoxious to fix. Once your custom blacklist is good enough, you can switch to a different DNS provider, like 1.1.1.1 or use your network's default server.

Blacklist.txt

Breaking
Redirectors & Link Tracking
General App Trackers
Facebook
Snapchat
Spotify
Instagram
Apple iOS
Fonts
Google (web and app)
YouTube
Yahoo & Tumblr
Geolocation
Social
Finance
Generalized Rules
Miscellaneous

Whitelist.txt

Snapchat
Un-breaking
Facebook and Instagram
Apple
Reddit and Gfycat
YouTube
Tumblr
eBay
Miscellaneous
back to top