Why Change DNS on Android
Android phones ship with the DNS server assigned by your mobile carrier or WiFi network. That default resolver works, but it is almost never the fastest option available. Carrier DNS servers are often overloaded during peak hours, geographically distant from your actual location, and optimized for cost rather than response time. Switching to a dedicated public DNS provider can reduce domain lookup times by 20 to 100 milliseconds per query.
That improvement compounds quickly. When you open a single webpage on your phone, your browser does not just resolve one domain. It looks up the main site, the CDN serving images, the font provider, the analytics script, the advertising network, and the video embed. A typical mobile page triggers 30 to 50 DNS lookups. If your current resolver adds 50 milliseconds to each one, you are waiting an extra one and a half to two and a half seconds before the page even starts rendering.
Privacy is the other reason. Many ISP and carrier DNS servers log every domain you visit and retain those logs for months. Some hijack failed lookups and redirect you to ad-filled search pages. Android 9 and later solve part of this problem with Private DNS, which encrypts your queries using DNS over TLS. But you still need to choose which resolver to use — Private DNS encrypts the connection, but the provider at the other end still sees your queries unless you pick one with a strict no-log policy.
Changing DNS on Android takes about two minutes, costs nothing, and is instantly reversible. If the new resolver does not work well for your network, you can switch back to Automatic in the same menu where you made the change. There is zero risk involved.
Private DNS (Android 9+) — Recommended Method
Android 9 introduced Private DNS, which encrypts all DNS queries from your device using DNS over TLS (DoT). This is the method you should use on any modern Android phone. It applies system-wide — every app on your device, including browsers, email clients, and streaming apps, sends encrypted DNS queries through your chosen provider.
How to Set Up Private DNS
- Open the Settings app on your Android device.
- Tap Network & Internet (the exact name varies by manufacturer — see device-specific sections below).
- Scroll down and tap Private DNS. On some devices, this is listed as Private DNS provider hostname or just Private DNS.
- Select Private DNS provider hostname (the third option, not Off or Automatic).
- Enter the hostname of your chosen DNS provider. Do not enter an IP address — Private DNS uses hostnames for the TLS certificate verification. Common hostnames:
- Cloudflare:
one.one.one.one
- Google:
dns.google
- Quad9:
dns.quad9.net
- AdGuard:
dns.adguard-dns.com
- NextDNS: your custom endpoint from nextdns.io
- Tap Save.
That is it. Your Android device now encrypts every DNS query using DNS over TLS. No app needs to be installed, no configuration profile needs to be downloaded. The setting applies to both WiFi and mobile data connections.
What Private DNS Does
When you enable Private DNS, Android establishes a TLS-encrypted connection to your chosen resolver on port 853. Every DNS query from every app on your device goes through this encrypted tunnel. Your mobile carrier, WiFi network operator, and anyone else on the network path cannot read which domains you are querying. They can see that you are connecting to a specific IP address (like 1.1.1.1 for Cloudflare), but the actual query content — the domain name, record type, and response — is encrypted.
This is a meaningful privacy improvement over standard DNS. Without Private DNS, every domain lookup from your phone is sent as plaintext. Anyone monitoring the network — your ISP, a public WiFi operator, or a malicious actor on the same network — can see every website you visit in real time.
Common Private DNS Hostnames Reference
| Provider |
Private DNS Hostname |
IP Addresses (for WiFi config) |
Best For |
| Cloudflare |
one.one.one.one |
1.1.1.1, 1.0.0.1 |
Speed |
| Google |
dns.google |
8.8.8.8, 8.8.4.4 |
Reliability |
| Quad9 |
dns.quad9.net |
9.9.9.9, 149.112.112.112 |
Security |
| AdGuard |
dns.adguard-dns.com |
94.140.14.14, 94.140.15.15 |
Ad blocking |
| Cloudflare (Family) |
family.cloudflare-dns.com |
1.1.1.3, 1.0.0.3 |
Parental controls |
| NextDNS |
Custom (from nextdns.io) |
Custom |
Customization |
For the most accurate recommendation, run our DNS speed test from your phone first. It shows which resolver is fastest from your current location, so you are not guessing based on global averages. See also our complete DNS server list for more options.
Per-WiFi DNS Configuration
If your Android version does not support Private DNS (Android 8 and earlier), or you want to set different DNS servers for different WiFi networks, you can configure DNS on a per-WiFi basis. This method only affects the specific WiFi network you configure — your mobile data DNS remains unchanged.
Steps to Configure Per-WiFi DNS
- Open Settings and tap Wi-Fi.
- Find your connected network. Tap the gear icon next to it (or long-press and tap Modify network on older Android versions).
- Tap Advanced options or scroll down to find additional settings.
- Under IP settings, change DHCP to Static.
- Scroll to the DNS 1 field and enter your preferred DNS address, such as
1.1.1.1.
- Enter your secondary DNS in DNS 2, such as
1.0.0.1.
- Leave the other fields (IP address, Gateway, Network prefix length) unchanged — Android should pre-fill these with your current values.
- Tap Save.
Important Caveats
When you switch from DHCP to Static, you are also locking in the IP address, gateway, and network prefix. If Android does not pre-fill these correctly, or if your network uses dynamic IP assignment that changes frequently, the static configuration may break your internet connection. If this happens, go back to the same WiFi settings and switch IP settings back to DHCP.
Per-WiFi DNS does not encrypt your queries. The DNS lookups are sent as plaintext on port 53, just like they would be with your ISP's default DNS. If privacy matters to you, use Private DNS (DoT) instead, which works on both WiFi and mobile data.
You also need to configure each WiFi network separately. If you connect to your home WiFi, your office WiFi, and a friend's WiFi, you need to repeat these steps for each one. Private DNS avoids this repetition by applying system-wide.
When Per-WiFi DNS Makes Sense
The main use case is when you want different DNS providers for different networks. For example, you might use Cloudflare at home for speed but want Quad9 at a coffee shop for its security filtering. Per-WiFi DNS also works on older Android devices that lack Private DNS support.
If your primary goal is simply to use a faster, more private DNS everywhere, Private DNS is the better choice. It encrypts queries, applies to mobile data as well, and requires configuration only once.
Samsung Galaxy Devices
Samsung uses its own One UI skin over Android, which means the settings menu looks different from stock Android. The Private DNS feature is present, but the menu paths are slightly different depending on your One UI version.
One UI 5 and Later (Android 13+)
- Open Settings.
- Tap Connections.
- Scroll down and tap More connection settings.
- Tap Private DNS.
- Select Private DNS provider hostname.
- Enter the hostname, for example
one.one.one.one for Cloudflare.
- Tap Save.
One UI 3 and 4 (Android 11-12)
- Open Settings.
- Tap Connections.
- Tap More connection settings.
- Tap Private DNS.
- Select Private DNS provider hostname and enter your hostname.
- Tap Save.
One UI 2 and Earlier (Android 9-10)
- Open Settings.
- Tap Connections.
- Tap More connection settings.
- Tap Private DNS.
- Select Private DNS provider hostname and enter the hostname.
- Tap Save.
Per-WiFi DNS on Samsung
Samsung devices also support per-WiFi DNS through the static IP method described earlier. To access it on Samsung: go to Settings, Connections, Wi-Fi, tap the gear icon next to your network, tap View more, change IP settings from DHCP to Static, and enter your DNS addresses. This only affects the specific WiFi network.
Samsung-Specific Notes
Some Samsung devices pre-installed by carriers may have the Private DNS option grayed out or missing. This happens when the carrier has locked the setting. If you cannot find Private DNS, try updating your device to the latest One UI version. If the option is still unavailable, use per-WiFi DNS or a DNS app from the Play Store as a workaround.
Samsung's built-in browser supports DNS over HTTPS independently of the system Private DNS setting. If you use Samsung Internet, you can enable DoH in the browser settings for additional encryption on top of whatever system DNS you use.
Google Pixel Devices
Pixel phones run stock Android (or very close to it), so the Private DNS menu follows the standard Android path. Pixel devices are also the first to receive Android updates, meaning they always have the latest DNS features.
Android 13 and Later
- Open Settings.
- Tap Network & Internet.
- Tap Private DNS.
- Select Private DNS provider hostname.
- Enter the hostname, for example
dns.google for Google DNS.
- Tap Save.
Android 9 through 12
- Open Settings.
- Tap Network & Internet.
- Tap Advanced to expand more options.
- Tap Private DNS.
- Select Private DNS provider hostname and enter your hostname.
- Tap Save.
Pixel-Specific Features
Pixel phones running Android 14 and later support DNS over QUIC (DoQ) in addition to DNS over TLS. DoQ uses the QUIC protocol for even lower latency than DoT. Not all DNS providers support DoQ yet, but Cloudflare and Google have begun rolling it out. The Private DNS setting on Pixel automatically uses the best available protocol — DoT or DoQ — depending on what the provider supports.
Pixel devices also have built-in network diagnostics. If your Private DNS connection fails, you will see a notification in the status bar. Tapping it takes you directly to the Private DNS settings where you can switch to Automatic or try a different provider.
Per-WiFi DNS on Pixel
Pixel phones support the standard per-WiFi DNS configuration through static IP settings. To set it up: open Settings, tap Network & Internet, tap Internet, tap the gear icon next to your WiFi network, tap Advanced, change IP settings to Static, and enter your DNS addresses. On Android 13+, you may also find DNS settings under the network details without switching to Static — some Pixel builds allow you to enter custom DNS directly.
Using DNS Apps
If your device does not support Private DNS (Android 8 or earlier), or you want features that the built-in settings do not provide, third-party DNS apps from the Play Store can fill the gap.
1.1.1.1 by Cloudflare
Cloudflare's official app enables DNS over HTTPS (DoH) on Android devices that lack system-level Private DNS support. The app creates a local VPN connection that routes DNS queries through Cloudflare's encrypted resolver. It does not route your actual internet traffic through a VPN — only DNS queries. The app also includes a basic connection quality test and a WARP mode that encrypts all traffic through Cloudflare's network.
Install it from the Play Store, open it, and tap the toggle to enable. The app handles all configuration automatically. You do not need to enter IP addresses or hostnames.
NextDNS
NextDNS provides a dedicated Android app that supports DoH, DoT, and DoQ. The app lets you create per-app DNS profiles, view query logs, and configure ad blocking and content filtering. After installing, create an account at nextdns.io, link your device using the provided private DNS hostname, and configure your filtering preferences in the dashboard.
AdGuard for Android
AdGuard's Android app acts as a local VPN that filters DNS queries for ad and tracker blocking. Unlike the AdGuard DNS service (which is just a resolver), the AdGuard app applies custom filter lists, blocks in-app ads, and lets you create per-app rules. It supports DoH and DoT. This is useful if you want ad blocking across all apps on your phone, not just in your browser.
DNS Changer
DNS Changer is a lightweight app that lets you switch between popular DNS providers with a single tap. It does not add encryption — it simply changes which DNS server your device queries. This is useful on older Android devices where the built-in settings do not let you change DNS at all. The app uses a VPN tunnel to redirect DNS traffic, similar to how 1.1.1.1 works.
When to Use an App vs. Built-In Settings
If your phone runs Android 9 or later, use the built-in Private DNS setting. It is simpler, does not require an app, and does not create a local VPN connection. Use a DNS app only if you need features that Private DNS does not provide — like per-app filtering, custom block lists, or DoH instead of DoT. Apps that use the VPN approach also consume a small amount of additional battery, since the VPN service runs in the background.
Verify DNS Is Working
After changing your DNS settings, you want to confirm two things: that the new resolver is actually being used, and that it is performing better than what you had before.
Check Which DNS Server You Are Using
The fastest way to verify is to open a browser and visit the verification page of your DNS provider:
- Cloudflare: visit https://1.1.1.1 — it confirms you are using Cloudflare DNS
- Google: visit https://dns.google — it shows your current DNS provider
- Quad9: visit https://quad9.net — it confirms Quad9 is active
- AdGuard: visit https://adguard.com — it confirms AdGuard DNS is active
If the verification page loads and confirms your chosen provider, the change worked. If it shows a different provider or fails to load, double-check that you entered the hostname correctly in the Private DNS settings.
Test the Speed Difference
Once you confirm the new DNS is active, measure the improvement. Run our DNS speed test with the new settings and compare the results to what you had before. Run the test two or three times at different times of day for consistent numbers.
You can also compare against other DNS providers. Our tool tests 17+ servers simultaneously, so you can see exactly how your new choice stacks up against alternatives. If the results show a different provider is faster from your location, switch to it and test again. See also our best DNS servers comparison for more context.
What to Look For
Focus on median response time rather than average. A few slow responses can skew the average, but the median gives you a better picture of typical performance. Also check the success rate — if a server fails queries, that is a problem regardless of speed. If you notice high failure rates, try a different DNS provider or switch back to Automatic temporarily while the provider resolves the issue.
Read our guide to DNS encryption for a deeper understanding of how encrypted DNS protocols like DoT and DoH work, and what they mean for your privacy.
Troubleshooting
Private DNS usually works without issues, but some situations can cause problems. Here are the most common issues and how to fix them.
Private DNS Fails to Connect
If Android shows a warning that the Private DNS could not be reached, the most common causes are:
- Typo in the hostname. Double-check the hostname. It must exactly match what the provider specifies — for Cloudflare it is
one.one.one.one, not 1.1.1.1.
- Network blocking port 853. Some corporate networks, public WiFi hotspots, and restrictive ISPs block port 853, which DoT uses. If you are on such a network, switch Private DNS to Automatic until you are back on an unrestricted network.
- Provider is down. Rare, but possible. Try a different provider hostname to rule this out.
No Internet After Changing DNS
If your phone connects to WiFi but has no internet after changing DNS, the DNS provider hostname may be unreachable from your network. Switch Private DNS back to Automatic or Off, confirm internet works, then try a different provider. If per-WiFi DNS caused the issue, switch IP settings back to DHCP.
DNS Changes Not Taking Effect
If you changed DNS but verification pages still show your old provider, try these steps in order:
- Toggle airplane mode on, wait 10 seconds, then toggle it off. This forces Android to reconnect and use fresh DNS settings.
- Restart the device. This clears any cached DNS entries and re-establishes all network connections.
- For per-WiFi DNS, disconnect from the WiFi network, reconnect, and verify the DNS settings are still saved.
Some Apps Still Use Old DNS
Private DNS should apply system-wide, but some apps — particularly VPN apps and certain browsers with their own DNS settings — may override it. If an app is using DoH independently (like Firefox with its own DoH setting), it bypasses the system Private DNS. Check the app's network settings if you want all traffic to go through your chosen resolver.
Frequently Asked Questions
Does changing DNS on Android improve speed?
Changing DNS on Android does not increase your download or upload bandwidth. What it does improve is how quickly domain names are resolved into IP addresses. Faster DNS resolution means websites start loading sooner. The difference is most noticeable on pages that pull resources from many different domains — which is most modern websites. You can expect 20 to 100 milliseconds improvement per DNS lookup, which adds up across the dozens of lookups a typical page triggers.
Is Private the same as DNS over HTTPS?
No. Private DNS on Android uses DNS over TLS (DoT), which encrypts DNS queries on port 853. DNS over HTTPS (DoH) wraps DNS queries in HTTPS traffic on port 443. Both encrypt your DNS queries, but DoH blends with normal web traffic while DoT uses a dedicated port. Android does not support DoH at the system level — you need a browser or app for that. See our DoH guide for more details.
Can I use different DNS for WiFi and mobile data on Android?
Yes. Private DNS applies system-wide to both WiFi and mobile data. If you only want to change DNS for a specific WiFi network, configure per-WiFi DNS through the WiFi network settings instead. This lets you use one DNS provider on home WiFi and a different one on mobile data. Keep in mind that per-WiFi DNS does not encrypt queries — it uses plaintext DNS on port 53.
What happens if Private DNS hostname cannot be reached?
If Android cannot connect to your Private DNS provider — due to a typo, network restrictions, or the provider being down — it will fall back to the default DNS or show a connection error. You can change the setting to Automatic or Off if this happens. Some public WiFi networks block port 853, which prevents Private DNS from working. Switch to Automatic temporarily on those networks.
Do I need to flush DNS cache after changing on Android?
Android does not have a built-in DNS flush command. The simplest way to clear the DNS cache is to toggle airplane mode on and off, or restart the device. Most DNS entries expire within minutes, so old results will clear automatically without intervention. If you want immediate results — for example, to run a speed test and see the new DNS performance — toggling airplane mode ensures a clean slate.
Is it safe to change DNS on Android?
Yes. Changing DNS only affects how your device translates domain names into IP addresses. It does not affect your files, installed apps, or any other aspect of your phone. Public DNS servers from providers like Cloudflare, Google, and Quad9 are trusted by millions of users worldwide. The change is also completely reversible — you can switch back to Automatic at any time.
Which DNS provider is best for Android?
Cloudflare 1.1.1.1 is the fastest option for most locations. Quad9 9.9.9.9 is best if you want built-in security blocking. Google 8.8.8.8 is the most reliable. For ad blocking, use AdGuard DNS. The best choice depends on your priorities — run our DNS speed test to see which is fastest from your specific location, then choose based on whether you prioritize speed, security, or filtering.