How to change DNS on Android
By default, your Android phone uses the DNS servers provided by your mobile carrier or Wi-Fi network. These servers work, but they are not always the fastest or the most privacy-friendly. Some carriers inject ad redirects into DNS responses, others silently censor domains, and most do not encrypt DNS queries, meaning any intermediary on the network can see which sites you visit.
Changing DNS on Android is straightforward, but the method depends on your Android version. Since Android 9 (Pie), Google has included a native option called "Private DNS" that uses DNS over TLS (DoT) to encrypt your queries. On older versions the process is different and must be done network by network.
Changing DNS on Android 9 and above (Private DNS)
This is the recommended method. It applies to all your connections (Wi-Fi and mobile data) in a single step, and it encrypts your DNS queries, which the older methods do not.
Open your phone's Settings, then go to Network & Internet (or "Connections" on some brands). Look for the Private DNS option. On Samsung phones it is typically under Settings > Connections > More connection settings > Private DNS. On Pixel and stock Android it is under Settings > Network & Internet > Private DNS.
Three options are available:
- Automatic (default): Android uses your current network's DNS with opportunistic encryption if supported
- Off: no DNS encryption, queries are sent in plain text
- Private DNS provider hostname: you manually enter the address of a DNS over TLS compatible server
Select the third option and enter the address of the DNS provider you want to use:
| Provider | Private DNS address (DoT) |
|---|---|
| Google Public DNS | dns.google |
| Cloudflare | one.one.one.one |
| Cloudflare (malware blocking) | security.cloudflare-dns.com |
| Cloudflare (malware + adult blocking) | family.cloudflare-dns.com |
| Quad9 | dns.quad9.net |
| AdGuard DNS (ad blocking) | dns.adguard-dns.com |
| NextDNS | yourid.dns.nextdns.io |
Confirm, and you are done. All your DNS queries will now go through the server you chose, whether you are on Wi-Fi or mobile data. No extra app needed.
To verify the change took effect, open your browser and go to a DNS test site. You should see the provider you configured (Google, Cloudflare, Quad9) instead of your carrier.
Changing DNS on Android 8 and older
On older Android versions there is no global Private DNS option. You must change DNS network by network, and only on Wi-Fi. Mobile data connections will always use your carrier's DNS unless you install a third-party app.
To change DNS on a Wi-Fi network:
- Go to Settings > Wi-Fi
- Long-press the Wi-Fi network you are connected to
- Select Modify network
- Check Advanced options (or "Show advanced options")
- Change the IP setting from "DHCP" to Static
- In the DNS 1 and DNS 2 fields, enter the IP addresses of the DNS servers you want
The IP addresses for the main providers:
| Provider | DNS 1 (IPv4) | DNS 2 (IPv4) |
|---|---|---|
| Google Public DNS | 8.8.8.8 | 8.8.4.4 |
| Cloudflare | 1.1.1.1 | 1.0.0.1 |
| Quad9 | 9.9.9.9 | 149.112.112.112 |
| OpenDNS | 208.67.222.222 | 208.67.220.220 |
| AdGuard DNS | 94.140.14.14 | 94.140.15.15 |
The downside of this method is that it only applies to the specific Wi-Fi network you just modified. Connecting to a different network means repeating the process. Also, switching to static IP means you must manually fill in the IP address, gateway and subnet mask. If you are unsure what to enter, note down the values shown in DHCP mode before switching to static.
Using an app to change DNS
If you are on an older Android version, or want a more flexible solution than the native Private DNS, several apps let you change DNS without rooting your phone:
- 1.1.1.1 (WARP) by Cloudflare: free, automatically sets up Cloudflare DNS using a local VPN (your data does not go through a real VPN, it is just a tunnel to redirect DNS)
- NextDNS: free up to 300,000 queries per month, with a dashboard for configuring ad, tracker and malware blocking
- Blokada: open source, blocks ads and trackers using a local VPN with custom DNS
These apps create a local VPN on your phone. No data leaves your device through a third-party server (unlike a real VPN); it is simply a mechanism to intercept DNS queries and redirect them to the server of your choice.
Which DNS to choose
Pure speed: Cloudflare (1.1.1.1) and Google Public DNS (8.8.8.8) are consistently the fastest in global benchmarks. Cloudflare has a slight latency edge in most regions.
Privacy: Cloudflare contractually commits to not selling your data and purging logs within 24 hours. Quad9 is a non-profit based in Switzerland, subject to Swiss data protection law. Google Public DNS is fast but Google remains an advertising company.
Content blocking: AdGuard DNS and NextDNS let you block ads, trackers and malicious domains at the DNS level, without installing a browser ad blocker. NextDNS also lets you fine-tune your blocklists.
Family protection: Cloudflare offers family.cloudflare-dns.com which blocks malware and adult content. OpenDNS Family Shield (208.67.222.123) provides a similar feature.
Verifying the change works
After changing your DNS, check that the new configuration is active. Open your browser and visit dnsleaktest.com to run a DNS leak test. If the results show Cloudflare, Google or Quad9 servers instead of your carrier's, everything is working.
If your carrier's old DNS servers still appear, try restarting your phone. On Android, the DNS cache is typically flushed on reboot. If the issue persists on Wi-Fi, check whether your router is forcing its own DNS servers (some do).
Changing DNS on Android is one of the simplest and most effective tweaks you can make to improve your daily internet experience. On Android 9+, the Private DNS feature makes it global and encrypted in a single step. On older versions, an app like 1.1.1.1 or NextDNS does the same job without hassle.