Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
How to configure custom DNS for only one Wifi network?
One of the Wifi networks I connect to has a DNS server on it, which is better than public ones. This DNS server is not available when connected to other networks.
When I'm on this network, I want my phone to use eg. 192.168.1.2 as the DNS. When on other networks, it should use the default automatic stuff (probably Google DNS or something).
On desktops, you can configure DNS per network. However, it looks like Android only has one global setting for custom DNS. I don't want to toggle DNS globally everytime I come in and leave the range of this one network.
1 answer
You can use static configuration. If you can get an IP address outside of the DHCP range (ask the network admin for the information if you don't administer it yourself) you can configure the network connection to use static IP configuration instead of DHCP. Configure the IP address, the gateway and your preferred DNS server and you are good.
In a modern stock Android the settings are found in:
Network and Internet -> Internet -> Cog next to "Wifi name" (⚙️) -> Pencil in the upper right corner (✏️) -> Advanced Options
On devices from manufacturers which customize Android extensively it probably differs a little, but it should be somewhere.
These settings will then only apply to this Wifi connection, every other connection will still use DHCP to get the proper IP configuration for those networks.

1 comment thread