How to Change DNS Servers on Android

Android has two built-in ways to choose DNS, depending on the version and the connection. On Android 9 or later, Private DNS lets you enter a provider hostname for encrypted DNS on Wi-Fi and mobile data. On older versions, you can set DNS server IP addresses for a particular Wi-Fi connection. The older Wi-Fi method does not change cellular DNS.
Before editing either setting, record the current option and any existing addresses. Choose a DNS provider whose privacy and filtering policies suit your needs. A Private DNS hostname, a DNS server IP address, and a DNS over HTTPS URL are different values for different settings fields. Entering a provider's IP address in the hostname field will not configure Private DNS correctly.
Check Your Android Version and Connection
Find your Android version in the phone's About phone or About device settings. If it is Android 9 or later, use Private DNS when you want the system to use your chosen provider across Wi-Fi and mobile data. Menu names vary by manufacturer and release, so search Settings for Private DNS if Network & internet does not show it.
Private DNS applies to lookups that use Android's system resolver, the component that finds DNS answers for apps. Apps with their own DNS implementation can behave differently. On Android 9, VPNs and DNS-changing apps can override Private DNS. On later versions, check the combination you use rather than assuming the VPN replaces the system DNS choice; the selected Private DNS service must remain reachable while the VPN is active. If a workplace or school manages the phone, ask for its approved resolver before replacing one that may serve internal names.
For an older Android release, the Wi-Fi network's advanced IP settings may offer DNS 1 and DNS 2 address fields. That choice applies only to the selected Wi-Fi connection. Before proceeding, check whether the screen also requires a static IP address, since changing that setting affects how the phone joins the network.
Set a Private DNS Hostname on Android 9 or Later
Open Settings, then Network & internet, and select Private DNS. Some versions place it under Advanced. The standard options are Off, Automatic, and Private DNS provider hostname. Automatic uses the network's DNS servers and tries encrypted DNS when available; it can fall back to unencrypted queries, so it does not guarantee encryption.
Select Private DNS provider hostname to choose a specific service. For Google Public DNS, enter dns.google; for Cloudflare's standard resolver, enter one.one.one.one. Enter one provider hostname and tap Save. This setting selects a DNS service without requiring you to assign the phone a static Wi-Fi address.
The field is for a hostname, not a numeric address such as 8.8.8.8 or 1.1.1.1, and not an HTTPS URL. A URL belongs in a client that explicitly asks for a DNS over HTTPS endpoint. Providers may use different hostnames for services that block malware or adult content, so check that your chosen hostname matches the filtering policy you want.
If Android cannot reach or authenticate the provider you selected, system DNS lookups can fail even while Wi-Fi appears connected. Recheck the hostname for spelling errors and confirm that the provider is available. As a temporary comparison, try Automatic on the same network; if that restores access, the chosen encrypted DNS connection needs further investigation. Return to your intended mode after the comparison, and verify it again.
Configure Wi-Fi DNS on Older Android Versions
Open Settings and Wi-Fi, select the connected network, and open its editing controls. On some older phones, you press and hold the network name, choose Modify Network, and enable Show Advanced Options. Menu labels can differ, but the relevant fields are in the saved Wi-Fi network's IP settings.
If DNS 1 and DNS 2 are available only after changing IP Settings to Static, first obtain a suitable static address, gateway, and network prefix from the network administrator or router configuration. The phone's current DHCP address is leased, so copying it into a static configuration can conflict with a later assignment to another device. Use an address set aside for static use and excluded from automatic allocation. If you cannot establish the correct values, keep DHCP and use another supported DNS configuration method.
Enter the DNS provider's numeric addresses in DNS 1 and DNS 2, not in the phone's IP address or gateway field. Examples are 1.1.1.1 and 1.0.0.1 for Cloudflare's standard IPv4 service, or 8.8.8.8 and 8.8.4.4 for Google Public DNS. Use a matching pair for the service you intend. These ordinary address fields do not enable encrypted DNS by themselves.
Save the Wi-Fi settings and reconnect if required. Test on that same Wi-Fi network; a successful lookup over mobile data does not verify these settings. On networks that also supply IPv6 DNS servers, editing only the IPv4 fields does not establish that every lookup uses the addresses you entered. Check the device's supported configuration before assuming that all DNS traffic follows the edited fields.
Check Name Resolution and Provider Selection
Reopen the relevant setting after saving. For Private DNS, confirm the selected mode and hostname; for older Wi-Fi DNS, confirm the network and its DNS 1 and DNS 2 addresses. Open more than one familiar website by name and check any work or school service you need. A page loading once does not prove which resolver every app used, and an app or system cache may reuse an earlier answer.
If your provider offers a resolver connection check, use it to check which service handles that browser's test queries. Treat the result as evidence about those queries, not every app on the phone. Browser DNS settings or an active VPN may cause those queries to use a different resolver from the one selected in Android. Repeat the relevant check separately on Wi-Fi and mobile data when evaluating Private DNS.
If only one network fails, check whether it requires a Wi-Fi sign-in page or restricts the chosen DNS connection. If only one domain fails, investigate provider filtering and the domain's records before replacing the entire setup. A DNS change can affect name lookup time, but it does not guarantee faster downloads or lower gaming latency.
Restore the Previous Settings
To undo a Private DNS change, open Private DNS again, select the mode you recorded, and restore the previous hostname if that mode requires one. Tap Save and check that name resolution works. If the original mode was Automatic, restore Automatic; selecting Off instead removes the system's attempt to use encrypted DNS.
For the older Wi-Fi method, reopen that network's IP settings and restore its previous assignment method. If it originally used DHCP, select DHCP so the network can supply its configuration again; if it used a static configuration, restore the recorded IP, gateway, prefix, and DNS values. Reconnect and test on the same Wi-Fi network. A public Wi-Fi sign-in problem after switching to Static is another reason to return to the original IP configuration before troubleshooting DNS further.







