How to configure DNS to block ads without external apps

  • Switching to filtering DNS servers blocks ads and trackers without installing additional apps.
  • Android, iOS, browsers, Smart TVs, and Linux allow you to configure DNS with standard and family protection profiles.
  • DNS reduces much of the advertising, although it cannot eliminate it completely on all services.
  • Combined with other solutions, filtering DNS improves privacy, speed, and user experience.

How to configure a DNS to block ads

Blocking ads by changing the DNS settings on your mobile phone, Smart TV, or even your entire Wi-Fi network is one of those tricks that, once you try it, you won't want to go back. With a simple adjustment, you can Browse faster, with more privacy and almost no adsAnd all this without installing external applications, without rooting, and without complicating your life.

In the following lines, you will learn step by step how to use special DNS servers to filter ads and trackers on Android, iOS, browsers like Chrome, your Smart TV, and even systems like Ubuntu or Debian. You will see which servers to use, how to enter the correct addressesWhat are the differences between default DNS, non-filtering DNS, and family protection DNS, and what are the limitations of this method so you know exactly what to expect?

What is DNS and why is it used to block ads?

Before changing anything in your settings, it's helpful to have a basic understanding of what a DNS is and why it's capable of stop a good portion of the ads that you see on websites, apps, and streaming platforms. This will help you avoid going in blind and make better use of all the options.

DNS means Domain Name System or domain name systemIt's the system that translates addresses like www.google.es into a numerical IP address that machines understand. Instead of remembering strings of numbers, you type the website name and the DNS server takes care of converting it into the corresponding IP address.

When you enter a website or open an app with advertising, that advertising comes from some dedicated ad serversThese servers also have a domain name and an IP address. If the DNS you're using has a list of domains related to advertising and tracking, it may refuse to respond to those requests or redirect them, preventing the ads from loading.

DNS servers specializing in ad blocking work with updated lists of ad domains and trackersEvery time an app, game, or website tries to connect to one of these domains to display a banner, video, or promotional element, the DNS blocks it. As a result, the main content usually loads as usual, but the space reserved for advertising either remains blank or displays a blocking message.

How to configure DNS on Android
Related article:
DNS on Android: a complete guide to configuring them step by step

Types of DNS servers: filtered, unfiltered, and family protection

When we talk about changing your DNS to block ads, it's not just about entering any old address. There are providers that offer different DNS server profiles depending on what you want to filter: ads, trackers, adult content, etc.

The most common profiles you'll find are basically three. Each one defines how the DNS behaves in response to different requests from your device, allowing you to adjust the lock level to your needs or those of your family.

First of all there are the default servers with filteringThese DNS servers block ads, trackers, and most of the domains used to display advertising on websites, apps, and Smart TVs. They are the most balanced option if you simply want to stop seeing the majority of ads without changing anything else.

Secondly you have the non-filtering serversWith these providers, you don't block ads, trackers, or any other DNS requests. They're used when you're only interested in the provider's speed, stability, or privacy, but don't want any data leaks.

Lastly are the family protection serversIn addition to blocking ads and trackers, they filter adult content and attempt to activate features like SafeSearch or Safe Mode on compatible services. This feature is very useful if you want to limit access to sensitive material on children's mobile phones or the living room Smart TV.

Block ads on Android with private DNS without external apps

How to configure a DNS to block ads without using apps

Android has included a feature since version 9 of System-level private DNS It allows you to use an ad-filtered provider without installing anything. It's a clean, fast option that works for both web browsing and many internet-connected apps and games.

The procedure may vary slightly depending on the custom interface and manufacturer, but generally the process is very similar. The important thing is to locate the Private DNS section or, if it's not there, the advanced network options within your phone's settings.

On most devices, the basic steps to set up a private DNS with ad blocking are these: first you go to SettingsThen go to the network section (usually called Networks & Internet, Connections or similar) and then access the advanced options, where the private DNS field usually appears.

When you see the option Private DNSYou will be offered several options. You must choose the mode that refers to "Private DNS provider hostname" or a very similar phrase. This option allows you to specify a particular server with ad filtering using a hostname, not an IP address.

In the field where you enter the host, you must enter the address of the filtering DNS server exactly as provided by the service. One of the most recommended for this purpose is AdGuard, which offers a public, free DNS designed to block ads and trackers at the system level.

If you want a standard blocking profile on your Android device, you can enter the AdGuard hostname in private DNS format. One of the most commonly used addresses is dns.adguard-dns.comwhich filters ads and trackers. If you prefer to prioritize compatibility, many users also use dns.adguard.com as a private host on modern Android devices.

If you want to add an extra layer of security for children, there's a family protection profile that, in addition to filtering ads and trackers, blocks domains with adult contentIn this mode, safe searches and restricted modes are also enabled for services that support them. A typical address in this profile is family.dns.adguard.com or equivalent variants depending on the supplier.

Once you've entered the correct host, simply save the configuration. From that point on, All DNS traffic from your Android device will pass through that server.You'll see banners disappearing from many websites, and apps and online games no longer feature as many interstitial ads or promoted videos, although some platforms may still display embedded advertising that doesn't depend on DNS.

Configure DNS with ad blocking only in the browser (Chrome)

If you don't want to change the system-wide DNS, or if your Android version doesn't support private DNS, you can use the option of Secure DNS built into Google ChromeThis way, the filtering will only affect web browsing within the browser, without changing anything on the rest of the device.

Chrome allows the use of DNS over HTTPS (DoH), a technology that sends encrypted DNS requests to a specific provider. Many ad-filtering services also offer this feature. a specific URL for DoHwhich is the one you will have to enter in the browser settings to activate the blocking system.

To use an ad-blocking DNS only in Chrome, you need to go into the browser settings, then to the section on Privacy & Security Look for the option called “Use secure DNS” or something similar. This feature is usually found in recent versions of both Chrome for Android and desktop.

Within “Use secure DNS”, instead of sticking with the automatic selection or the predefined providers, you have to choose the option that allows choose another providerThat's where you can paste the full address of the ad-filtered DNS service, in the format Chrome expects for DoH connections.

In the case of AdGuard, the typical URL to use its secure DNS ad filtering service is https://dns.adguard-dns.com/dns-queryBy entering it exactly as is in the corresponding field, Chrome will start sending its DNS requests to that server, resulting in a large portion of the advertising domains being blocked.

If you are interested in a profile with additional blocking of adult contentThere is also a variant of the address for the family plan, using the same secure DNS scheme. It's always advisable to consult the provider's updated documentation to ensure the URL you're using is correct in each case.

An important detail is that The DNS you configure in Chrome takes precedence over the Android system DNS.For example, if you have configured a DNS with ad blocking and adult content filtering on your mobile device, but use one that only blocks ads in Chrome, you will be able to access websites from the browser that should theoretically be blocked by the system's family profile.

How does ad blocking via DNS actually work?

When you change your DNS to one that filters ads, what you're actually doing is putting a filter between your devices and the ad servers. servers that serve the adsThis filter decides which requests are resolved normally and which are stopped at the source, based on a list of domains considered malicious, tracking, or simply advertising.

Every time a website, app, or game tries to load a banner, video, or promotional resource, it sends DNS requests to specific domains belonging to advertising platforms. If the DNS filtering service recognizes those domains as being on its blacklist, It returns an empty response, a null IP address, or simply does not respond.The result is that the ad is not downloaded and, therefore, is not displayed.

The advantages of this method are clear: since many external elements are not downloaded, browsing is usually somewhat faster and mobile data consumption is reduced. Furthermore, it limits many tracking techniques based on advertising domains, thus Increase the privacy of your connections without needing to install extensions or additional applications.

However, DNS blocking isn't perfect. Many services integrate advertising within the same domains that serve the main content, or use more complex techniques. In those cases, a filtering DNS can't distinguish which requests are advertisements and which are legitimate content without risking breaking the website or app. Therefore, you will still see some advertising on certain services, or the occasional banner ad might appear on specific apps.

Block ads on Android using airplane mode

There's an extremely simple trick to remove ads from some games and apps without touching the DNS, although its scope is quite limited. It involves enabling the airplane mode just before opening the app that you want to use without advertising, so that it cannot connect to the ad servers.

This method only makes sense for apps that don't need the internet to function. Think of a game without online multiplayer, where all matches are played on the phone itself and only use the internet to download ads or statistics. In such a case, activating airplane mode, Requests to advertising servers fail And the game continues as if nothing had happened, but without showing banners or promotional videos.

Unfortunately, there are more and more apps and games that require constant connection to external serversIn these cases, activating airplane mode causes errors, prevents login, or directly blocks the use of the application. It also doesn't work for browsing the internet or streaming content, where a connection is essential.

Even with these limitations, airplane mode remains an interesting option for specific situations: a simple game while on the subway, a local utility app, or any application that works offline but includes ads. In those scenarios, Activate airplane mode before opening it This can be a quick trick to get rid of ads without changing any network settings.

How to configure DNS on Android
Related article:
Guide to changing the DNS on your Android mobile: fast, safe and without apps

Block ads on Smart TV by changing the DNS

Smart TVs are now filled with banners, promotional strips, and sponsored recommendations on the home screen. It doesn't matter if you use Android TV, Tizen, webOS, or another system: advertising on the interface has become... an important source of income for manufacturers, which allows them to lower the price of televisions.

If you want to clean up your home screen a bit without resorting to complicated external solutions, one of the best options is Change the DNS server in the TV's network settingsWith a good filtering DNS, many of the requests that load advertising banners stop being resolved, and with that, a large part of the advertising disappears from the interface.

The exact procedure varies depending on the brand, but it usually involves going to the network or connection settings. Select your WiFi network or cable and choose manual DNS configuration. Instead of letting the router assign the DNS automatically, you have to manually enter the IP address of the server you want to use as a filter.

One of the most reliable services for this purpose is AdGuard, which, in addition to apps and browser extensions, offers a public DNS designed to block advertising on any device, including smart TVs. Another very popular alternative is NextDNS, which also has specific lists for ads and trackers.

In many cases, you just need to go to your Smart TV's network settings and enter a DNS server address like 94.140.14.14, belonging to the AdGuard infrastructure. From that moment on, any attempt by the TV to communicate with the advertising servers of its interface will be filtered by that DNS.

The results are usually noticeable right away: The banners on the home screen disappear or they are replaced by empty spaces, making menu navigation feel cleaner. In some Tizen models, for example, it has been observed that the main menu's announcement bar almost completely disappears after applying this DNS change.

However, it's important to understand that no DNS filter can completely eliminate all ads from a Smart TV. Some platforms integrate advertising within their own domains or use mechanisms that go beyond conventional DNS requests. For more aggressive blocking, many people resort to... modify the router settings or install tools like Pi-hole on a dedicated device (for example, a Raspberry Pi) that filters the entire home network.

Configure DNS with ad blocking on Ubuntu and Debian

If you want better control over advertising and tracking on desktop computers or home servers, you can also use Changing the DNS in distributions like Ubuntu or DebianThe process here usually involves editing system configuration files and restarting network services for the changes to take effect.

On Debian-based systems, a traditional way to change the DNS is by editing the name resolution file. To do this, open a terminal and switch to administrator privileges using the command suEnter your root password when prompted. Once done, you can edit the corresponding configuration file with a text editor like nano.

The classic file where the DNS servers are specified is / Etc / resolv.confFrom the command line, you can open it with a command similar to nano /etc/resolv.conf and, within it, add or modify the lines that indicate the name servers, replacing the current values ​​with the IPs of your favorite filtering DNS.

Again, you can choose between several profiles: default servers that They block ads and trackersThese include non-filtering servers that don't block anything, and family protection servers that also restrict access to adult content and attempt to force safe searches on compatible services. Each provider usually details the specific addresses for each of these options.

After saving the changes to the configuration file, it is important Restart the network so that the system starts using the new DNS servers.In environments based on classic init scripts, one way to do this is with the command /etc/init.d/networking restart, which reloads the network service with the new resolv.conf configuration.

Once the network restart is complete, you can close the terminal. From that point on, any application that relies on system name resolution, from browsers to email clients, will use the filtering DNS you defined. The effect will be similar to that on other devices. Many ads and trackers will be blocked at the network level without installing extensions in each program.

Using DNS with ad blocking on iOS and other devices

iPhone and iPad users can also benefit from ad-filtered DNS, although Apple's system It does not offer exactly the same private DNS interface Android from version 9 onwards. Even so, it is possible to change the DNS of WiFi connections or use configuration profiles and specific apps that integrate this type of service.

In many cases, the procedure involves going to the WiFi connection's network settings, editing the DNS section, and replace the current servers with those of the filtering providerIn this way, all requests going out through that WiFi network will pass through the filter, with the same effects in terms of blocking ads and trackers as on other devices.

Some DNS providers with ad filtering also offer Downloadable apps and profiles for iOS These services automate the setup process, making it easier to use DNS over HTTPS or DNS over TLS within the Apple ecosystem. In any case, the idea remains the same: to direct DNS requests to a service that maintains up-to-date lists of ad domains.

Limitations and combinations with other methods

Although filtering DNS servers manage to block a high percentage of the most annoying advertising, it's important to be aware of their limitations. limitations compared to other methods such as browser-level content blockers (e.g., extensions like uBlock Origin) or more advanced solutions mounted on the router itself.

On the one hand, there are services that integrate ads within the same domain as the main content, making it virtually impossible Block them without breaking the website or appOn the other hand, some platforms use obfuscation, encryption, or dynamic loading techniques that DNS alone cannot accurately analyze or filter.

Furthermore, not all systems support encrypted DNS or global changes equally well. In certain environments, especially on Windows, Private DNS or secure DNS functions may not behave reliablyIn these scenarios, it is usually more practical to install a browser based on engines like Gecko (e.g., Firefox) and use blocking extensions like uBlock Origin directly in the browser itself.

Finally, if you're very serious about blocking ads and tracking throughout your home, you might consider changing the DNS on your router or to build solutions like Pi-hole on a Raspberry PiThis ensures that all traffic on the home network passes through a centralized filter. The DNS approach on each device remains ideal when you want speed, simplicity, and individual control, especially on mobile devices and Smart TVs.

How to disable ad notifications on your Android device
Related article:
How to disable ad notifications on your Android device

By combining these techniques correctly—filtering DNS on the system, secure DNS in the browser, and, when necessary, advanced content blockers—you create an environment where Most ads and trackers disappearNavigation becomes cleaner and you enjoy your content on your mobile, computer or TV with much less visual interruption. Share the guide so more users know how to configure DNS and block ads.