How to change the DNS server on Android
2 min read · 5 steps · Updated 2 October 2026
Open Settings, tap Network & internet and tap Private DNS. Choose Private DNS provider hostname, type the hostname of the service, for example dns.google, and tap Save. It works on Android 9 and later and applies to Wi-Fi and mobile data.
A DNS server turns a web address into the number that computers use. Android can send these lookups to a service you choose, in encrypted form. Android calls the setting Private DNS.
Menu names below are from Google Pixel phones on a recent Android version. Samsung, Xiaomi and other brands rename some of them. The pictures are simplified diagrams of the screen, not screenshots.
Step by step
Open Settings and tap Network & internet
On Samsung phones the menu is called Connections, and the setting is under More connection settings.
Tap Private DNS
On some Android versions it is under Advanced.
Choose Private DNS provider hostname
The other choices are Off and Automatic.
Type the hostname
The field wants a name, not a row of numbers. For Google Public DNS the name is dns.google. Other services publish their own hostname on their website.
Tap Save and test
Open a website. If nothing loads, the hostname has a typing mistake. Go back and correct it, or set the mode to Automatic.
Good to know
To undo the change, set Private DNS back to Automatic.
Phones with a version older than Android 9 do not have this setting. There, DNS can only be changed for each Wi-Fi network separately, which Google recommends for advanced users only.
Take the hostname from the website of the DNS service itself. Do not use one from an advert or a message.
The same on a computer: how to change the DNS server on a Mac.
In short: Settings, Network & internet, Private DNS, provider hostname, Save.
- Google Public DNS: Get started (Android)
Rules and prices change. Check the official source before you act.