How to set up private DNS on Android for secure browsing

Last update: 7th October 2026
  • Private DNS uses the DoT protocol to encrypt browsing requests and prevent ISP spying.
  • It allows you to block malicious domains and annoying advertising depending on the chosen provider.
  • It is a complementary measure to the VPN, since the latter encrypts all traffic and not just DNS queries.
  • The configuration is native in Android 9 and higher versions through the network settings menu.

Smartphone wrapped in a chain with a padlock, symbolizing the security and encryption of data when using a private DNS.

When we connect to the internet, we often worry about cookies or whether someone is spying on our IP address, but there's an invisible process that happens every time we type a web address: the DNS lookup. Basically, it's the directory that translates names like google.com into numbers that machines understand. The problem is that, by default, this lookup travels in plain text, which means your internet provider or anyone on an open network can know exactly which pages you visit.

If you frequently use Wi-Fi in cafes, airports, or public squares, you're especially vulnerable. In these environments, an attacker could redirect you to a fake website to steal your banking information by hijacking your DNS. Fortunately, Android offers a built-in solution called Private DNS , which encrypts these requests so that no one can read or manipulate them while you browse the internet.

What exactly is private DNS and how does it protect us?

Man using his smartphone on public transport, illustrating the risk of connecting to open WiFi networks in urban environments.

Private DNS is a feature implemented by the DNS-over-TLS (DoT) protocol . To put it simply, imagine that instead of sending an open postcard where anyone can read the address, you're now sending the address inside a secure vault. This system encrypts requests before they leave your phone, preventing your ISP or the administrator of a public Wi-Fi network from monitoring your activity.

  Root in Linux: what it is, what it's for, and how to use it safely

It's crucial to understand that traditional DNS is not encrypted. This allows telecommunications companies to create marketing profiles based on your browsing activity , as DNS queries are considered web browsing data. By enabling private browsing mode, your device establishes a secure tunnel (usually through port 853) using a certificate verification process called a TLS handshake, ensuring that the response comes from the correct server and not an imposter.

Advantages and some disadvantages of its use

Hand holding a smartphone with an active VPN application, representing a complementary security tool to private DNS.

The main advantage of enabling this option is privacy. By making monitoring more difficult, you reduce the risk of identity theft and phishing attacks . Furthermore, depending on the provider you choose, you might notice that websites load faster thanks to optimized global infrastructures with reduced response times.

However, it's not a magic bullet. First, your IP address remains visible to the website you're visiting; private DNS only hides the "path" to get there, not your ultimate identity. There can also be compatibility issues: some corporate networks block port 853, which would leave your device without internet access. Additionally, the initial encryption process can, in very rare cases, add a slight amount of latency.

Step-by-step guide to setting it up on Android

Young couple using their mobile phones on a city bench, representing the everyday use of the internet in public spaces.

If you have a device with Android 9 Pie or later , you don't need to install any unusual apps or root your phone. The process is very simple and is done directly from the system:

  • Enter the menu Settings and look for the Connections or Network & Internet section.
  • Access the option More connection settings or Advanced.
  • Click where it says Private DNS.
  • Here you have two options: choose Automatic mode (where the phone decides if the network supports encryption) or select Provider Hostname.
  Security in public WiFi networks: risks and how to protect yourself

If you choose the hostname, you'll need to enter your preferred server address. Note that Android doesn't accept numeric addresses (like 8.8.8.8) in this field; it requires the service's domain name.

The best DNS servers for your mobile phone

Sculpture in the shape of the WiFi symbol against a blue sky background, serving as a visual anchor for the theme of wireless connectivity.

Not all resolvers are the same; each one has a different philosophy depending on what you're looking for:

  • Cloudflare (1dot1dot1dot1.cloudflare-dns.com): It's the ideal option if you're looking for maximum speed and performanceThey focus on not recording personal data and have a massive global network.
  • Quad9 (dns.quad9.net): Highly recommended for those who prioritize security. It is a Swiss non-profit organization that blocks malicious domains known in real time to prevent you from entering websites with malware.
  • Google Public DNS (dns.google): It stands out for its reliability and absolute stability, although its privacy policy is a little more permissive with the storage of temporary logs.
  • AdGuard (dns.adguard-dns.com): It's the perfect alternative if you hate advertising, because filters ads and trackers directly from the DNS, clearing browsing in the browser and in some apps.
  • OpenDNS (resolver1.opendns.com): Owned by Cisco, it's excellent for those who need parental controls and customizable anti-phishing protection.

Private DNS vs. VPN: What's the difference?

Many people confuse these two technologies, but they are complementary. Private DNS only encrypts the query about a website's location. In contrast, a VPN encrypts all data traffic, hiding your real IP address and routing your connection through a remote server.

The best approach is to use both. If you activate a VPN, it typically manages its own DNS to prevent leaks, but configuring a private DNS like Quad9 gives you an extra layer of control and security, ensuring that even if the VPN fails or you don't use it, your queries won't travel in plain text. While the VPN protects the tunnel, the private DNS protects name resolution.

  How to detect intruders on my computer and protect my PC

Common troubleshooting

If enabling private DNS causes you to lose internet access on a specific Wi-Fi network, but everything works fine with mobile data, it's likely that the router or network firewall is blocking DoT traffic. This is common in businesses or highly restricted public networks that only allow standard DNS. In these cases, the only solution is to revert to automatic mode or disable private DNS while on that network.

To verify that you're actually using the chosen service, don't rely solely on generic DNS leak tests, as these sometimes display the provider's infrastructure (like i3D or PacketHub) rather than the service name. The most reliable method is to use the provider's own verification pages , such as on.quad9.net, which will confirm with a "Yes" if the configuration is correct.

Implementing encrypted DNS is one of the simplest and most effective security measures for any Android user. By switching from carrier servers to options like Cloudflare or Quad9, we gain independence, prevent our visits from being tracked, and protect ourselves against common attacks on open networks, making our digital footprint much smaller and harder to trace.