How to Use Google DNS and OpenDNS on Android

Changing the DNS on Android used to be the domain of those who rooted their devices, but this is no longer the case with later iterations of the popular operating system.

Do note that this only works on Wi-Fi networks. The DNS servers cannot be changed when using a cellular network, as it would mean the connection would fail. Additionally, this is on a per network basis. This means that if you connect to a new network, you will have to repeat the setup process. Fortunately, it is a one-time task, and Android will remember the DNS settings for known networks.

What is DNS?

As a brief overview, DNS is the phonebook of the Internet. Every time you type “maketecheasier.com” into your browser, the DNS converts this request into an IP address which it then uses to locate and deliver the site to your device. As humans, we could never remember hundreds of IP addresses, but we can remember named sites like “google.com”.

Why use other DNS?

While the DNS used to handle this request is important, not all DNS is the same. Changing your default or ISP DNS to either OpenDNS or Google DNS brings with it some benefits:

  • Speeds up your browsing experience through central load balancing and caching
  • Makes browsing more secure as these providers negate many of the attacks and requests that are harmful in nature
  • Can enhance privacy with temporary logs deleted after forty-eight hours and non-personally-identifiable information kept in permanent logs.

Using your default DNS from your ISP may not provide these benefits, so it is worth considering.

Change the DNS settings

1. From the Android Menu home screen, tap “Settings.”

2. Tap “Wi-Fi” on the menu, and you will see a list of the networks your phone is able to discover.

3. Press and hold the name of the network you want to change. Once the information box appears, select “Modify Network.”

android-network

On some devices you may need to click the “Advanced Option” which is just underneath the “Show Password” checkbox to see further settings.

android-advanced

4. To adjust your Android DNS settings, you will need to switch the IP settings from DHCP to “Static.” Once changed, the menu will appear with the DNS settings that are available to edit. Don’t worry about editing the IP address, as the Android device will fill in the IP address it has acquired through DHCP. Navigate down to “DNS1” and “DNS2” at the bottom of the options window. Tap this and add the OpenDNS servers: “208.67.222.222” and “208.67.220.220.”

android-dns

Lastly, click save and test the settings by opening your web browser and navigating to https://welcome.opendns.com/, where you will see a confirmation message.

Google DNS

To use Google DNS servers, the principal is the same as above until you reach point 4. At that point change the DNS resolvers to “8.8.8.8” and “8.8.4.4” instead of the Open DNS ones.

Whichever system you select, changing the DNS on an Android device is quick and easy. It can make you safer online, and following this guide, you can enhance your browsing experience. Let us know about your experience in the comments.

One comment

  1. You can change the default DNS servers, even if you’re not rooted… by editing /system/etc/resolv.conf.

    You’ll need to install ADB on your computer.

    Connect your phone to your computer via USB cable. Wait for the drivers to install, if this is the first time connecting the phone.

    On your computer, in File Manager, create a new folder: c:\test

    On your computer, in an Administrator-privilege command prompt on your computer, type:

    adb pull /system/etc/resolv.conf c:\test\

    The above command pulls resolv.conf from the phone to the c:\test folder on your computer.

    Edit the file and remove
    nameserver 8.8.4.4
    nameserver 8.8.8.8

    … and enter your preferred DNS servers. I use OpenNIC servers. You can enter more than two, if you wish.

    nameserver 161.97.219.84
    nameserver 94.103.153.176

    Save the file back to c:\test, then push the resolv.conf file back to your phone:

    adb push c:\test\resolv.conf /system/etc/resolv.conf

    Reboot the phone.

    Using ADB, there is a lot of stuff you can do to your phone that would normally require root. Research to learn more.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.