
Tired of seeing ads every time you open an app or visit a website on your phone? The good news is you can Drastically reduce advertising on Android without installing a single appYou don't need to be an expert or root your device: simply tap a hidden setting in the configuration and choose the correct DNS server you use.
In this guide you will see, step by step, how to use Private DNS to block ads, trackers, and even adult content both on Android and in the browser. We'll also review other popular methods (blocking apps, Pi-hole, NextDNS, airplane mode…) so you have the complete picture and can choose the option that best suits you.
What is a DNS and why can it block ads and trackers?
To understand why changing the DNS helps to to stop a large part of the advertising and tracking on your mobileWe have to start from the beginning: what exactly is a DNS and what role does it play in all of this?
When you write an address like www.google.es Or when an app connects to a remote server, your device doesn't work with names, but with numbers called IP addresses. The DNS (Domain Name System) acts as a Internet phone book that translates domain names into IP addressesEvery time your mobile phone wants to go to a website or load a resource, it first asks the DNS server.
This intermediate step makes DNS a very valuable control point. A traditional DNS server simply answers which IP address corresponds to each domain, but a specialized DNS server can decide not to resolve certain directionsIf the request is directed to an ad server or a domain known for distributing malware or tracking users, it simply doesn't respond or returns a fake address.
This system fits perfectly into the current advertising ecosystem: almost all the ads you see on websites and apps come from advertising servers and third-party tracking platformsWhen an app tries to connect to those domains to download a banner, video, or tracker, the filtered DNS recognizes them and blocks them immediately. The result is that The ads fail to load and many trackers stop working.
Besides advertising, the DNS you use can reveal a lot about you. Many traditional providers (like your internet service provider or even Google) They record which domains you access, how often, and from which IP address.Even if they can't see the exact content, they can profile your usage habits, which services you use, what times you connect, and which apps are using the network in the background. That's why switching to a privacy-focused private DNS isn't just for blocking ads: it also helps to reduce the digital footprint you leave behind every time you use your mobile phone.
How do ads reach your mobile (and where does DNS fit in)?
It's no coincidence that many free apps are full of ads, or that even after closing an app, some of its activity continues in the background. Most integrate third-party modules dedicated to advertising, analytics, or trackingThese modules continuously connect to servers external to the main developer to display personalized ads and collect data.
Every time you open an app with banners, videos, or interstitial ads, the advertising code It sends requests to specific domains of ad networks and trackers.These requests always go through the DNS: first the ad server's domain is resolved, and then the content is downloaded. If, at that step, the DNS server decides to block the resolution, the ad is never downloaded.
DNS servers designed to filter advertising work with very extensive lists of advertising and tracking domainsWhen they detect a request to any of those marked domains, they apply a blocking policy. For the user, this translates into cleaner pages and apps that continue to function, but now with far fewer ads.
Of course, this system is not magic: ads embedded directly into the content (for example, integrated into the video itself or generated within the app without connecting to external advertising domains) They can't always be blocked using DNS alone. Even so, in daily use, the change in experience is noticeable, because much of the most intrusive advertising and a good number of silent trackers disappear.
Recommended DNS servers to block ads and improve privacy

In recent years, several public DNS options have emerged that, in addition to resolving domains, focus on block ads, trackers, and dangerous connectionsSome of the most interesting ones to use on Android (and other devices) are the following.
AdGuard DNS: Blocks ads, trackers, and adult content
AdGuard is a well-known company in the world of ad blocking. In addition to its apps, they offer a free public DNS service with built-in filteringwhich you can use without installing anything additional. Its offering has several modes depending on what you want to block.
For Android, the most common method is to configure the private DNS with the host:
- dns.adguard-dns.com – Blocks ads and trackers on websites and apps.
If there are minors at home or you want to add extra control, the same platform has a stricter profile for also block adult content and enable SafeSearch where possible. In many cases, this is done with a specific, familiar host, such as:
- family.dns.adguard-dns.com or equivalent variants aimed at family protection.
In addition to these TLS hosts, AdGuard also offers classic DNS addresses (IPv4 and IPv6) and unfiltered modes For those who simply want to use their infrastructure without blocking anything. These options are useful in desktop environments like Ubuntu or Debian, where you can manually enter server IPs in the network configuration or in system files such as / Etc / resolv.conf and restart the network to apply the changes.
NextDNS: Advanced blocking and real-time statistics
If you want to go a step further and have Very fine control over what is blocked and what is not.NextDNS is a very powerful solution. It works similarly to a filtered public DNS, but with a personal account where you define your lists, rules, and protection levels.
After registering on their website, you can activate filters for Block trackers from large companies like Google or AppleAnti-ad lists, malicious domains, and much more. All of this is managed from a very visual panel where you can also see Real-time statistics of all DNS requests from your devices.
On that statistics page you can review which sites each device attempted to connect towhich requests were blocked, when, and from which country or network. You can even fine-tune the filtering on the fly: if you see something legitimate being blocked, you add it to an allow list; if you detect a suspicious domain, it bans it for all your devices.
In the NextDNS settings, at the very bottom, you'll find a section with various connection formats. For Android, we're interested in the field for “DNS over TLS/QUIC”which provides a unique host for your profile. That's the host you'll need to enter in the private DNS settings on your mobile device so that all DNS traffic passes through NextDNS first, following your rules.
The main drawback is the query limit: NextDNS offers approximately 300.000 free requests per monthFor a single device, it's usually more than enough, but if you share it with many devices, you might want to consider their paid plans. In return, you gain a level of control and visibility that's hard to match with other generic public DNS servers.
Other interesting DNS servers focused on privacy and security
Besides AdGuard and NextDNS, there are other DNS services that have become popular due to their focus on security and privacyHowever, not all ads are blocked so aggressively:
- dns.quad9.net: security-oriented. Filters connections to domains linked to malware, phishing, and known threats, relying on intelligence from multiple organizations.
- dns. googleIt's fast and stable, maintaining excellent availability. However, It's not the most private option, since it belongs to Google and can record browsing metadata.
- all.dns.mullvad.net y adblock.dns.mullvad.netDNS servers managed by the Mullvad team, a VPN provider with a solid reputation for no-logs policies. Some of these profiles include ad and tracker blocking.
- family.freedns.controld.comControlD service designed to integrate into home networks and add filters adult content, advertising, and tracking under the same umbrella.
Each one offers different levels of blockingBut they all share the idea of filtering out conflicting domains before the connection is established. The key is choosing the one that best balances, for you, privacy, performance, number of ads blocked, and trust in the provider.
How to change the private DNS on Android to block ads?
Android has included a setting called Private DNSThis allows you to use encrypted DNS (DNS over TLS) without installing any applications. It's exactly what you need for services like AdGuard DNS or NextDNS to work at the system level, blocking ads and trackers on almost all traffic.
The steps may vary slightly depending on the customization layer, but on most recent phones the process for Change private DNS on Android It's very similar to this:
- Open the device settings.
- Enter the section Connections o Network and Internet, depending on your brand.
- Look for the option called Private DNSIf you don't see it in the first line, it's usually in "More connection settings" or in advanced menus.
- In the pop-up box, select “Private DNS provider hostname” (or a similar option that lets you type a host).
- Enter the DNS server address you want to use for ad or tracker filtering.
For example, if you want Android to use AdGuard's free public DNS with ad blocking, you can enter something like this as the host:
- dns.adguard-dns.com – to block ads and trackers at the device level.
If you prefer to use a family profile with adult content filtering in addition to ads and trackers, you will need to write the Specific URL for "family" mode that AdGuard specifies in its documentation, usually a host similar to family.dns.adguard-dns.com or equivalent.
In the case of NextDNS, after registering and configuring your lists on their website, you will need to go to the configuration section and copy the corresponding value to “DNS over TLS/QUIC”That specific string is the host you'll need to enter in the private DNS field on Android.
When you save the changes, all DNS requests made by your system will be They are encrypted and sent to the selected provider.From that moment on, apps and websites will start showing fewer ads (depending on the aggressiveness of the filtering) and much of the third-party tracking will be blocked.
Configure DNS with ad blocking only in the browser
You might not want to touch the DNS at the system level and prefer Limit ad blocking to web browsing onlyIn that case, many browsers allow you to select your own secure DNS, which takes precedence over the Android DNS.
Google Chrome for Android, the process is usually as follows:
- Opens Chrome and enter the settings menu (three-dot icon).
- Go to section "Privacy & Security".
- Locate the option “Use secure DNS” or similar.
- Choose the option “Choose another provider” or “Custom Provider”.
- Enter the URL of the ad-filtered DNS in the format that Chrome requires.
In the case of AdGuard DNS, Chrome doesn't just accept the host; it needs a HTTPS type URL for DNS over HTTPS (DoH)A typical example for ad-blocking mode would be something like:
- https://dns.adguard-dns.com/dns-query – DoH URLs that Chrome understands and uses to resolve filtered domains.
If the provider offers a family profile with extra blocking (adult content, SafeSearch, etc.), you'll have a similar URL but associated with that specific mode. It's important to respect the exact URL formatBecause if there is an error or a fragment is missing, the browser will not be able to use secure DNS and will revert to the default DNS.
Keep in mind one key detail: The DNS configured in Chrome takes precedence over the Android DNS.This means that if you've configured your system with a DNS that blocks ads and adult content, but you choose a different DNS in Chrome that only blocks ads, you might still be able to access adult websites through the browser. This is something to keep in mind if you're setting up your phone for children or other users.
Other methods to block ads on Android
The use of private DNS with filtering is, nowadays, one of the simpler and more efficient methods for regular users who don't want to get bogged down with additional apps or advanced settings. Even so, it's worth reviewing other commonly recommended options to get a general overview.
DNS-based or VPN-based ad-blocking apps
There are many ad-blocking apps available on Google Play and alternative repositories that create a local VPN profile or a special DNS to filter your device's traffic. Some well-known names include AdGuard (app version), Blokada, AdAway, and RethinkDNS, among others.
These tools usually offer Updated blocklists, custom rules, and more flexibility than simply changing your DNS. Some, like RethinkDNS or AdAway, are open source and allow you to see how they work internally. The drawback is that, by acting as a local VPN, they can consume more battery and resources, especially if they filter each connection with many rules.
If you prioritize absolute convenience and don't mind installing additional software, they can be a powerful alternative. But if what you're looking for is Do not install anything extra and only touch one system settingSwitching from a private DNS provider to a filtering provider is usually cleaner.
Pi-hole and AdGuard Home: Home network-level blocking
For more advanced users, there is the possibility of assembling a network-wide ad blocker using a Raspberry Pi or other small home server. Solutions like Pi-hole or AdGuard Home act as a local DNS for all devices that connect to your WiFi.
The idea is to configure the router to use your Pi-hole or AdGuard Home server as primary DNS serverFrom then on, any mobile phone, tablet, computer, or Smart TV that connects to that network will go through the same filter and will see fewer ads and trackers, without the need for individual configurations.
This method is extremely effective and versatile, but it has significant drawbacks: It requires additional hardware, some budget, time, and some technical knowledge.You have to install the system, keep it updated, open some ports on the network, and know how to troubleshoot potential connectivity issues. It's perfect for controlled home environments, but it falls short of the "nothing installed on your phone" ideal.
Airplane mode to block ads in offline games
There is a very basic but useful trick in specific situations: Activate airplane mode to stop ads from loading in apps that don't need the internet.Many simple games, calculators, notepads, and other utilities work perfectly offline, but include advertising modules that are only activated if there is network access.
In those cases, simply activate the Airplane mode before opening the appSince your phone runs out of data and Wi-Fi, the ad servers can't respond and the ads won't load. However, you can still use the app if it doesn't require online services.
However, this method has very clear limitations: It's not suitable for browsing the internet, nor for apps that require a constant connection. (online multiplayer, social media, streaming, etc.). It's just a one-off trick to reduce interference in offline games and tools without installing blockers or changing the DNS.
Impact on privacy and security when changing DNS
Changing the DNS settings on your mobile device doesn't just affect ads. It also has a direct impact on... how your traffic is managed and who sees what you're trying to visitBy switching to a private DNS and, even better, one that supports encryption (TLS, HTTPS, QUIC), you reduce the amount of information that your carrier or intermediary services can collect.
A privacy-oriented DNS typically compromises on not recording your request history They store only minimal metadata for a very limited period. In addition, many include lists of malicious domains that help avoid connections to phishing websites, pages that distribute malware, or servers that attempt to exploit vulnerabilities.
Even so, it's worth remembering that a private DNS It does not replace a full VPN nor does it encrypt all trafficWhat is primarily protected is the querying of domains, not the content of what you do within each website or app. For more comprehensive protection (for example, if you frequently use public Wi-Fi networks), the combination of Reliable VPN + DNS with filtering It's an ideal scenario.
For most users, however, simply changing their mobile's private DNS to a reputable provider with tracker and ad blocking already amounts to... a huge leap in privacy and comfortPerhaps the best effort/benefit ratio you can achieve with a single Android setting.
Given everything we've seen, the most balanced move for most people is usually Configure a filtering private DNS on Android (such as AdGuard DNS or a custom NextDNS profile) And, if you want to be extra careful, you can also adjust the secure DNS in your browser to match.
This way you reduce a good portion of annoying advertising, put a stop to many silent trackers, and add an extra layer of security, without installing heavy applications or complicating your life too much with advanced setups. Share this information and more users will learn how to block ads with a DNS.