QuarkVPN

How to Change DNS on Android

Use Private DNS to select an encrypted DNS provider for Android system lookups across supported Wi-Fi and mobile connections. To change the DNS addresses for just one Wi-Fi network, edit that network's settings. A VPN or browser with its own DNS settings can affect the resolver you see in a test.

Set up Private DNS on Android

  1. On a Pixel, open Settings > Network & internet > Private DNS. Menu names vary by phone. Search Settings for Private DNS if you cannot find it.
  2. Note the current mode and any saved hostname. Choose Private DNS provider hostname and enter the hostname your DNS provider supplies. For example, Cloudflare's standard resolver uses one.one.one.one.
  3. Tap Save and check that a webpage loads.

Private DNS encrypts supported DNS lookups. See how DNS changes differ from a VPN connection, Google's Private DNS instructions, and Cloudflare's hostname examples.

Why can't Android connect to the Private DNS server?

Check that the Private DNS field contains the hostname supplied by your provider. Compare it with the provider's instructions and correct any typos. Then try the same hostname on another trusted Wi-Fi network or on mobile data. If it works there, complete any sign-in required by the original Wi-Fi network and try again. If both networks fail, check whether the DNS provider reports an outage.

Restore the previous DNS setting if you need to get back online. Choose Automatic if you were using automatic DNS before. Otherwise, restore the mode and any hostname you recorded. Use the settings your administrator provides on a work or school device.

Verify DNS on each network after the change. Keep the VPN and browser settings the same between checks so you can compare the results.

Change DNS for one Wi-Fi network

These settings apply to the selected Wi-Fi network. On many phones the DNS fields appear under Static IP settings. If your network normally uses DHCP, get an available IPv4 address, gateway and network prefix length from the network administrator before switching to manual settings.

  1. Open the Wi-Fi network's details and choose Edit or the pencil icon on Pixel. On Galaxy, start in Settings > Connections > Wi-Fi and open the gear next to the network.
  2. Under Advanced options or View more, check IP settings. If required, choose Static and enter the approved IP settings. Record any values you are replacing.
  3. Enter the provider's resolver addresses in DNS 1 and DNS 2 if shown. These fields take IP addresses, such as 1.1.1.1 and 1.0.0.1 for Cloudflare. Save and reconnect to the same Wi-Fi network.

If your phone requires a static address to expose the DNS fields, follow the Android Wi-Fi IP setup steps. When a custom Private DNS hostname is active, Android system lookups can still use that provider on this Wi-Fi network. Use the resolver check below to confirm.

Restore automatic DNS settings

  1. Private DNS. Reopen Private DNS, choose Automatic and tap Save to return to Android's automatic selection.
  2. One Wi-Fi network. Edit the same network again. If it originally used automatic IP settings, return IP settings to DHCP and save. The network can assign the IP and DNS addresses again. If the network originally used a static IP and custom DNS, restore the values you recorded instead.
  3. Reconnect and repeat the resolver check on the network you edited.

What DNS server am I using on Android?

Check the configured settings first, then run a DNS test to see which resolver handles the browser's test requests.

  • Private DNS. If Private DNS provider hostname is selected in Settings, the hostname field shows the provider you configured.
  • Wi-Fi. In the connected network's details, check IP settings. If it already says Static, look for DNS 1 and DNS 2. With DHCP, the network normally supplies the addresses, and your phone may show neither field. Leave the IP mode as configured when checking.

Use the DNS verification steps to see which resolver the test reports. Your VPN or the browser's Secure DNS settings can change that result.

Verify DNS on Wi-Fi and mobile data

  1. On a trusted network, leave the VPN disconnected for the baseline if your settings allow it. Note the Android Private DNS mode, the Wi-Fi DNS settings, and whether your browser has a custom Secure DNS provider.
  2. On the Wi-Fi network you edited, run a fresh Standard test at DNS Leak Test. Record the resolver names and IP addresses it reports. Use the same browser for each run.
  3. Turn off Wi-Fi, confirm mobile data is active, and run a fresh test in that browser with the other settings unchanged. A DNS change for one Wi-Fi network applies only there. A custom Private DNS provider can also serve cellular lookups. Restore Wi-Fi after the comparison.

The result describes the resolver that answered the browser's test queries. A router may forward lookups to an upstream resolver, and browser Secure DNS can use a different provider from the Android system setting.

Compare DNS with and without a VPN

  1. Pick either Wi-Fi or mobile data and stay on that network for both tests. If permitted, run a fresh test with the VPN off. Connect the VPN and run the same test again in the same browser. Keep Private DNS and browser Secure DNS settings the same for both readings.
  2. Compare the resolver names and addresses with the VPN provider's expected results. A VPN can supply its own resolvers, and a browser's custom Secure DNS setting can affect what appears. If you test the browser setting separately, keep the VPN state fixed, then restore the original browser setting.

Check your provider's DNS behavior before interpreting a different resolver as a leak. Follow the DNS leak comparison steps for help reading the results.