DEV Community

Cover image for Remove Internet Junk from Ground Up: A DNS-Based Approach
Brixdorf
Brixdorf

Posted on

Remove Internet Junk from Ground Up: A DNS-Based Approach

We're all familiar with the usual suspects during our daily internet browsing: ads, trackers and those annoying cookie banners. It's hard to find someone who isn't affected by them. We call them colloquially as "internet junk", but how do we get rid of them?

Some of you savvy folks might say, "Well, use Brave", and yes, that is a fairly popular ad/tracker blocking browser, but that's limited to your browser, right? Are the ads and trackers limited to your browser only? What about your operating system? Windows, Android, even Apple's multiverse of OSes? Those are still out in the open, tracking your every moment.

So, how do we deal with this? How can we make sure, that every internet-connected device we use, is free of all the internet junk? Is there any way we can clear this problem from its root? Well, the answer lies in DNS!

Domain Name System
Image by Raj Zala on Vecteezy

For those of you who are not aware about DNS, basically it's a system which translates website names (for eg. www.netflix.com) to their respective IP addresses that your device can understand. After all, your system only understands numbers.

Now the task of converting website names to IPs is handled by DNS, and this is also the place where the ads and trackers creep in. By default, the DNS resolvers of any system are generally of Google or of your telecom provider, these resolve every URL inside the network, including the junk. If we are able to control our resolvers, we can essentially stop all incoming traffic which is unnecessary.

And for achieving this, we are going to use a tool called NextDNS.

NextDNS

Head over to nextdns.io and click on "Try it now".

NextDNS Dashboard

The ID that I have highlighted above is the bread-and-butter of our configuration. This ID is unique to our setup, and this will ensure that our settings are applied across all our devices.

To enable ad and tracker blocking, we first have to change some settings. Head over to the Security tab and then enable the following:

  • AI-Driven Threat Detection

Then head over to the Privacy tab and enable these blocklists:

  • NextDNS Ads & Trackers Blocklist
  • AdGuard DNS filter
  • OISD
  • AdGuard Mobile Ads filter
  • EasyList
  • AdGuard Tracking Protection filter
  • AdGuard Base filter
  • Steven Black
  • EasyPrivacy
  • NSABlocklist
  • Fanboy's Annoyance List
  • HaGeZi - Multi PRO++

These are the most common and actively updated blocklists which would be more than enough to block majority of ads and trackers.

Also, don't forget to enable Native Tracking Protection for your devices..

Native Tracking Protection

Finally, enter to the Settings tab and in the Performance window, enable all the settings to improve your speed.

Performance Settings

Essentially, you can change your data storage location to Switzerland (🇨🇭) for maximum privacy (they have the strictest privacy laws).

So, here we are, you have configured every setting that is required to achieve our goal, the final step is the enable NextDNS on your system. Applications for Windows, iOS and macOS are available.

For Android and Linux, Setup instructions are clearly given on the Setup page.

After you have set NextDNS as your DNS resolver, you will see this message on your dashboard.

Setup Complete!

And voila 🎉! Your work is done! Now you are free of all ads and trackers across your every device.

I've been using this service for over a week and take a look over my usage statistics:

My Usage Statistics

NextDNS App Example

It just works!

P.S. If you want even more control over your DNS resolvers, you can host one of your own using Pi-hole.

Cover Image by JM Grafix on Vecteezy

Image used in Screenshot courtesy of FC Barcelona

Top comments (0)