How to Change DNS on Android
Android gives you two ways to set custom DNS servers. Private DNS (Android 9 and later) is the easiest — it encrypts your queries and works on both Wi-Fi and mobile data. On older versions or when you need static IPs, you can change DNS per Wi-Fi network.
Method 1: Private DNS (Android 9+)
This is the recommended approach. It uses DNS-over-TLS, so your queries are encrypted and it applies to every connection type.
- Open Settings.
- Tap Network & Internet (on some phones this is Connections).
- Tap Private DNS. On Samsung devices, look under More connection settings → Private DNS.
- Select Private DNS provider hostname.
- Enter a DoT hostname:
dns.google— Google Public DNS1dot1dot1dot1.cloudflare-dns.com— Cloudflaredns.quad9.net— Quad9
- Tap Save.
Your device now sends all DNS queries over an encrypted TLS connection, regardless of whether you are on Wi-Fi or mobile data.
Method 2: Wi-Fi DNS settings
Use this if you are on Android 8 or earlier, or if you need to set DNS by IP address on a specific network.
- Open Settings → Network & Internet → Wi-Fi.
- Long-press your connected network name and tap Modify network (or tap the gear icon, then Edit).
- Tap Advanced options (or Show advanced options).
- Change IP settings from DHCP to Static.
- Scroll down to DNS 1 and DNS 2. Enter your preferred servers, for example:
1.1.1.1and1.0.0.1(Cloudflare)8.8.8.8and8.8.4.4(Google)
- Tap Save.
This only changes DNS for the selected Wi-Fi network. You will need to repeat the process for each network you connect to.
Mobile data: why Private DNS is the only option
Android does not expose DNS settings for cellular connections. The Wi-Fi method above has no equivalent for mobile data. If you want custom DNS on 4G or 5G, use Private DNS — it is the only built-in method that works across all connection types without installing a third-party app.
Verify your DNS settings
After making changes, confirm they took effect:
- Open your browser and go to dnsleaktest.com.
- Run the Standard test.
- Check that the listed DNS servers belong to your chosen provider (e.g., Cloudflare, Google) rather than your ISP.
If you still see your ISP's servers, double-check the hostname spelling in Private DNS or confirm that static IP settings were saved correctly.
Recommended DNS servers
Not sure which DNS provider to use? Browse our full directory of public DNS servers, live-tested and verified, to find the best option for your location.
Frequently asked questions
Does Private DNS work on mobile data?
Yes. Private DNS applies to all connections — Wi-Fi, mobile data, and VPN. It is the only built-in Android method that covers cellular networks.
What is the difference between Private DNS and changing Wi-Fi DNS?
Private DNS uses DNS-over-TLS (DoT) and works across all network types. Changing Wi-Fi DNS only affects that specific Wi-Fi network and sends queries in plain text unless your provider supports encrypted transport separately.
Why does Private DNS require a hostname instead of an IP address?
Private DNS uses TLS encryption, which requires a hostname to verify the server certificate. IP addresses alone cannot be validated with TLS, so Android needs the provider hostname.
Will changing DNS speed up my Android phone?
DNS affects how fast domain names resolve, not your raw download speed. Switching to a faster resolver like Cloudflare (1.1.1.1) or Google (8.8.8.8) can reduce page-load delays, especially if your ISP DNS is slow.