Skip to content

How to Set a Custom DNS on Android VPN: A Practical Guide

Set a DNS server in your Android VPN app without confusing it with Android’s system-level Private DNS option. Follow the setup steps, test whether domain names resolve, and use the troubleshooting checklist if websites fail to load after you change the setting.

Setting a custom DNS server in an Android VPN app can help you control how domain names are resolved, but it is easy to confuse the app’s DNS option with Android’s system-level Private DNS setting. They are separate configuration layers, and the active VPN may change which one handles requests. This guide explains the difference, how to change the setting safely, and how to check whether DNS is working afterward. Menu names vary by Android version, phone manufacturer, and VPN client, so use the equivalent option if your screen looks different.

Before changing anything, note the current settings and make one change at a time. DNS translates a domain name, such as a site address, into information that lets your device find the service. It does not encrypt all of your internet traffic, and choosing a different DNS server does not by itself guarantee faster browsing, stronger privacy, or access to a particular website.

Understand the two DNS settings

Android’s Private DNS and a VPN app’s custom DNS setting may both affect name resolution, but they are configured in different places and can behave differently while a VPN is connected. Android’s Private DNS feature, available on Android 9 and later, configures encrypted DNS at the system level when the selected network and software support it. A VPN app can also provide DNS settings for the virtual connection it creates. Whether the app’s resolver, Android’s Private DNS, or another configured option is used depends on the Android build and the VPN client’s implementation.

2

settings layers to distinguish

3

checks after a change

In Android settings, Private DNS is commonly found under Settings → Network & internet → Private DNS. Some manufacturers place it under Connections or another network menu. Its options may include Automatic, Off, or a provider hostname. A hostname is not the same thing as a numeric DNS server address; enter a hostname only when the provider’s instructions specify one. This system setting can remain configured even when you connect to a VPN, but that does not mean it will always take precedence over the VPN app.

In a VPN client, a custom DNS option may appear under Settings, Network, DNS, or Advanced. Depending on the app, it might accept an IP address, a server hostname, or a URL for an encrypted DNS service. The field’s expected format matters: a hostname pasted into an IP-only field will not work, and a URL is not interchangeable with a plain resolver address. Follow the client’s own description before entering a value.

Android DNS settings: where they are configured and what to verify
SettingWhere to find itWhat to check
Android Private DNSAndroid system network settingsWhether it is Automatic, Off, or set to a provider hostname
VPN app DNSThe VPN client’s network or advanced settingsAccepted value format, selected DNS mode, and whether the setting applies to the active profile
Network-provided DNSUsually managed by the current Wi-Fi or mobile networkWhether the app or system falls back to the network when a custom option is unavailable

A useful way to diagnose an issue is to ask which layer you changed and which layer is active during the test. If you changed Android Private DNS but the VPN client supplies DNS for its tunnel, changing the system setting may not produce the result you expected. Conversely, editing a DNS value in a profile that is not selected may have no effect on the connection you are currently using.

Check your current configuration first

Before editing a setting, confirm that the VPN works with its current configuration. Connect using the profile and route you normally use, then open a few sites you already know are reachable. If ordinary browsing already fails, changing DNS adds another variable and makes the original problem harder to identify. Record whether the issue affects every site or only particular domains, and whether it happens on Wi-Fi, mobile data, or both.

Next, inspect the Android Private DNS setting and the VPN app’s DNS settings without changing either one. Take note of the current mode and, if the app allows it, the DNS option assigned to the active profile. Some clients apply settings only after disconnecting and reconnecting; others may require you to select or update a profile. Do not assume that a value shown on a settings screen is active merely because it is visible there.

Check the client’s documentation for the accepted value format and supported DNS modes. A resolver address, a provider hostname, and an encrypted DNS URL represent different kinds of input. The app may also distinguish between automatic DNS, DNS supplied by a configuration, and a manually entered resolver. If the instructions are unclear, leave the setting unchanged and consult the client’s help material rather than trying random formats.

If you are using a service configuration imported from a subscription, keep the imported profile intact while testing. A profile may contain routing and DNS options that are refreshed when its configuration is updated. If you need the general client installation and import sequence, the setup guide can help you confirm that the correct configuration is active before you troubleshoot DNS.

Set a custom DNS in the VPN app

Use the following process for a client that explicitly supports custom DNS. The exact labels differ between apps, and not every Android client exposes a manual resolver field. If your app does not offer this option, do not try to force a value into an unrelated proxy, routing, or subscription field.

  1. Save the working state. Note the current DNS mode and the profile currently selected. If the client has an export or backup option, use it only according to the app’s instructions. At minimum, be ready to restore the previous value.
  2. Open the active profile’s network settings. Look for DNS, Name resolution, or a similarly named control. Check whether the setting is global to the client or belongs only to the selected profile. Avoid changing unrelated options such as route mode, proxy protocol, or split tunneling.
  3. Confirm the input format. Read the hint beside the field or the client’s documentation. Enter the resolver value exactly as specified by its provider. Do not add spaces, quotation marks, or a protocol prefix unless the app requires them. If the client asks for an encrypted DNS URL, use the provider’s documented URL format rather than a plain IP address.
  4. Save the change and reconnect. Apply or save the setting, disconnect the VPN, and connect again if the client requires a restart to apply network changes. Confirm that the expected profile remains selected. If Android displays a VPN connection permission prompt, verify that it is for the client you intended to use.
  5. Test before changing anything else. Open a site by its domain name and check whether it loads. Then test another familiar domain. If browsing breaks, restore the previous DNS mode and reconnect before trying another value. Change one setting at a time so the cause remains clear.

When comparing the available guidance for LeleVPN, keep the Android client’s actual DNS controls separate from subscription import and route selection: those functions answer different configuration questions. A subscription link supplies a client configuration, while DNS determines how domain names are resolved. Do not edit the subscription URL to try to add a DNS server unless the client’s official instructions explicitly describe that process.

After reconnecting, check the Android VPN indicator and the client’s connection status, but treat them only as confirmation that the VPN connection is active. They do not prove which DNS resolver handled a particular request. Likewise, a page loading successfully shows that name resolution and connection worked for that test, but it does not by itself establish that DNS traffic followed a specific privacy path.

Test DNS resolution after the change

Start with simple checks rather than relying on a single online test. Open several familiar domains, including one that you know worked before the change. Try both a new page load and a refresh of an already open page; cached results can make an old page appear to work even when a new name lookup is failing. If only one domain fails, compare it with other sites before concluding that the whole DNS configuration is broken.

  • ✅ Confirm the intended VPN profile is selected and connected.
  • ✅ Test more than one familiar domain after reconnecting.
  • ✅ Compare results on Wi-Fi and mobile data only if you can do so safely and without changing other settings.
  • ❌ Do not treat a connection icon alone as proof that custom DNS is active.
  • ❌ Do not interpret a DNS test result as proof that all traffic is private or encrypted.

If you use a DNS test website, read what it measures. Some tests display resolver information observed by the site; others focus on whether certain requests appear to use a particular service. Results can be affected by caching, browser settings, encrypted DNS features, the VPN client, and test design. A test performed in one browser may not represent every app on the phone, especially if apps use their own networking or resolution mechanisms.

To compare behavior, keep the test conditions consistent: use the same device, browser, VPN profile, and network where possible. Change only the DNS setting between comparisons. If you switch from Wi-Fi to mobile data at the same time as changing DNS, a difference in results could come from either change. A controlled comparison does not require measuring an exact speed; it is enough to record whether the same domains resolve and whether the issue is repeatable.

Also distinguish name-resolution failures from connection failures. If a site name cannot be resolved, the browser may show a DNS-related error or fail before reaching the site. If the name resolves but the page still does not load, the cause could instead involve the route, the site, the browser, or the current network. Error wording varies, so use it as a clue rather than definitive proof.

Practical conclusion: a successful DNS check means the tested names resolved under those conditions; it does not prove that every app uses the same resolver or that DNS traffic follows the privacy path you intended.

Troubleshoot and restore a working setting

If websites stop loading immediately after the change, first restore the previous DNS mode in the VPN app, save it, and reconnect. If the client is still unable to connect, disable the custom value and return to the client’s automatic or original setting, if available. This is a diagnostic step, not a recommendation that one mode is always better. Once browsing returns, you have evidence that the changed setting or its format may be involved.

Use the following checklist to narrow down the cause without changing several layers at once:

  • Check the value format. Confirm whether the field expects an IP address, hostname, or encrypted DNS URL. Remove accidental spaces or extra characters and compare the entry with the provider’s instructions.
  • Check the active profile. Make sure you edited the profile currently selected for the connection. If the app supports multiple profiles, a correct value in an inactive profile will not affect the current session.
  • Reconnect cleanly. Save the setting, disconnect, and reconnect. If the client has a restart or refresh option for its configuration, follow the app’s instructions before testing again.
  • Review Android Private DNS separately. Note whether it is set to Automatic, Off, or a provider hostname. If you test a different system setting, change only that setting and repeat the same checks. Restore the original value if the result gets worse.
  • Compare networks carefully. If the problem occurs only on one Wi-Fi network, the network may be restricting or altering DNS traffic. If it occurs on both Wi-Fi and mobile data, focus on the app setting, selected profile, and value format first.
  • Check for app-specific behavior. Try a second browser or another ordinary app, while remembering that different apps can use different networking features. If only one app fails, its own settings or cache may be relevant.
  • Update or re-import only when appropriate. If the client reports an invalid configuration or an update has changed its settings, follow the official client or service instructions. Do not delete a working profile or replace it with an unverified configuration just to test DNS.

Android may also pause background activity or apply battery restrictions to a VPN app. Those restrictions are more likely to affect whether the connection remains active than the format of a DNS entry, but they can complicate testing if the VPN disconnects in the background. Confirm that the VPN is still connected when a failure occurs. If it has disconnected, troubleshoot the connection’s persistence separately from DNS resolution.

Do not assume that a public resolver is automatically faster or more private than the default resolver. The best choice depends on the provider, the client’s support, the network, and your privacy requirements. Avoid adding multiple DNS apps or profiles at the same time: competing VPN-based apps may conflict because Android generally limits which app can hold the active VPN connection. If another DNS or filtering app uses Android’s VPN facility, check whether it must be paused before testing the VPN client.

For a report to a client or service support team, include the Android version, phone model, VPN client name and version, the selected profile, the DNS mode, the network type, and the exact error message. Do not send a full subscription URL, passwords, private keys, or screenshots containing account credentials. You can describe the DNS value’s format without exposing a sensitive configuration. This gives support enough context to distinguish a resolver problem from a profile, network, or connection issue.

Keep the configuration that works reliably, and make further changes only when you have a specific reason and documentation for the setting. If the VPN app does not expose a custom DNS option, using its supported default is usually a safer troubleshooting baseline than editing unrelated Android settings. When a later app or Android update changes the available menus, verify the new behavior with the same controlled checks rather than assuming that old screenshots still match your device.

Get Started Free