Home » Internet » How to Change DNS Server: An In-Depth Guide for All Platforms

How to Change DNS Server: An In-Depth Guide for All Platforms

by Pratik

DNS Servers are usually assigned to you by your ISP. You may want to change it for a better Internet speed or for blocking certain websites. Other reasons might be that websites are loading slower. Using a public DNS server helps is a good troubleshooting method to identify the problem. Irrespective of the reason, I would definitely suggest that you change your DNS Server.

Here are several ways to change your DNS Server, But before we begin it’s important to understand how DNS works.

What Is a DNS?

DNS stands for Domain Name System. In simpler words, it’s a system that translates the domain name (like google.com) to its IP address (like 216.58.196.110) so that your computer can to talk the destination server to fetch the website data. For us humans, it’s easy to remember words like Google or Facebook than a bunch of IP addresses. So we use the website name with the domain name. But machines don’t have that problem with names. They can understand and deal with IP addresses efficiently.

So we use DNS to link a domain name to its IP address. Basically, it’s a big digital address book, that contains the list of all websites and their corresponding IP address. So, your DNS server maintains a list of IP and DNS entries. Every time, when you type a DNS name on the browser, the DNS server resolves it to an IP Address.

How Many Public DNS Services Are There?

Tons of them but only some of them are worth knowing. Following are the most popular ones with their features.

  • GoogleDNS for faster speed (8.8.8.8 and 8.8.4.4)
  • OpenDNS for parental control (208.67.222.222 and 208.67.220.220 ).
  • Norton ConnectSafeDNS good for malware protection and safety.

Read: 7 Best DNS Servers For Speed, Stability, and Security

Which Is the Best DNS for You?

Depends on what you want to use it for, so there is no best DNS server. Sometimes third-party DNS is good for speed and security. And sometimes your ISP’s DNS is suitable for downloading files from the server near you.

So depending on your requirement you can change DNS of your router or just computer and smartphone. Let’s see how.

How to Change DNS Server on Your Computer and Phone

Change DNS Server on Windows 10/8/7

The quickest way to change your DNS server is using command line. You just need to run a single command. Firstly, you need to open Command Prompt with elevated permissions – administrative privileges. To do that, type cmd in the Start Menu. Right-click on the Command Prompt icon and select Run as Administrator.

CommandPrompt

When the command prompt window opens, check your active network adapter name. To do that, run the following command:

ipconfig

active_adapter_name

The Network Adapter name is a single word suffixed at the end of the Network Title. In my case, it is ‘Wi-Fi’ suffixed at the end of Wireless LAN adapter. So, my Network Adapter Name is Wi-Fi. After you have the name, run the following command to change the DNS Server

netsh interface ipv4 add dnsserver "Wi-Fi" 8.8.8.8 index=1

Here, netsh is a built-in Windows Network configuration utility. Wi-Fi is the adapter name and you can replace it by your adapter name and index=1 means the primary DNS Server.

netsh_add_dns

Change DNS Server on Windows 10/8/7 – Settings

In case you are not good with the command line, the simplest way to change DNS Server would be through the Windows Settings. You need to navigate to the Adapter settings. To do that, go to the Start menu and type in Network and Sharing Center When the search results pop up, click on the Network icon.

Network_And_Sharing_Center

Alternatively, you can quickly open the Network and Sharing center on Windows 10. Right-click on the Start button and click on Network Connections. This will directly take you to the Network Status window.

RightClickOnStartMenu_Windows10

When the Network Status window opens, click on Change adapter options.

Change_Adapter_Options

You will see the Network Connection window popup. Select your active connection. In my case, it would be Wi-Fi but if you are connected by LAN, choose Ethernet. Right click on the active connection, and click on Properties.

Right_Click_NetworkAdapter

When you get the Wi-Fi Properties, select Internet Protocol Version 4 (TCP/IPv4). Once done, click on Properties to open the IP configuration settings.

IPv4_Properties

When the IP Properties window opens up, you will see the IP Address Configuration. The first menu is for IPv4 settings. However, we would be changing bthe DNS Server. In case you want to add a static IP, you can make changes in this menu. For a detailed explanation, check out our article on how to assign static IP. Go to the second menu and choose Use the following DNS server addresses. This will enable the text fields where you have to enter the DNS Server IP Address. There are 2 text fields for you to enter Preferred DNS Server and Alternate DNS Server. Typically, your computer uses Alternate DNS Server when your Preferred DNS Server is not reachable.

DNS_IP_Server_Address

After that, click on OK to save the changes. You can verify if your PC is using the same DNS server by running the following command on cmd.

ipconfig /all

cmd_dns_server

The problem with both the methods is that you have to find public DNS Servers IPs. Moreover, there is no consolidated window to enter DNS IPs and log your previous entries. If you switch DNS frequently, we recommend to use third-party software like DNS jumper. It is a freeware and a portable utility so you don’t need to install it the software. You can double-click the application to run it. Once the window opens, you see an option called Choose a DNS Server. Below it, you see a drop-down with a pre-populated list of DNS servers. Select any one and click on Apply DNS.

DNS_Jumper_App_Interface

You can also choose to enter Custom DNS Server values. To see the changes, you have to click on Flush DNS. There are several other features in the app like checking DNS resolve time, applying DNS to all adapters.

Read: How to Clear DNS Cache on Chrome, Firefox and Safari

Change DNS Server on Ubuntu (Linux)

On Ubuntu, the process to change the DNS Server is somewhat similar to Windows. You can do it via the command line or graphical interface. The simplest way to do it would be through the graphical interface. You just need to make a few entries in the IP settings. To do that, click on the network icon at the top-right corner.

Ubuntu_Network_Icon

After you click on the Network icon, a tray will appear below it. Click on the active network adapter to bring up more options in the drop-down. Next, click on the Wired Settings.

Wired_Settings

Wait until the Network Settings window pops up. Make sure you are on the Network tab and navigate to the adapter which is active. Click on the Settings icon beside the adapter to view its configurations.

Wired_Settings_Icon

When you get the wired settings pop-up window, navigate to the IPv4 tab to change the IP settings.

IPv4_Tab

On the IPv4 tab, toggle the slider beside the DNS to OFF. We need to enter the static DNS IP in the text field below. If you have multiple DNS Servers you can separate them by a comma. After the IPs are validated successfully, click on Apply for the changes to take effect.

Static_DNS_Ubuntu_GUI

After you apply the changes, you need to restart the network for changes to take effect. You can just turn on and off your Wi-Fi or rather run this command on the terminal.

sudo service network-manager restart

network-manager_restart

To check if the network adapter is using the same DNS server, run the following command.

nmcli dev show | grep DNS

nmcli_dev_dns_address

You need see the DNS Server IPs you have mentioned previously. If you find any discrepancy, it would happen if you have left DNS as Automatic in adapter settings. Go back, turn it off and restart your network manager.

Change DNS Server on Mac

If you are using macOS, changing DNS is similar to Windows and Ubuntu but way quicker. We need to edit the network settings. To do that, click on the Apple icon at the top left corner of the desktop. Click on System Preferences from the dropdown list.

mac_systemPreferences

Once the System Preferences dialogue box displays, navigate to Network and click on it to open the Network Settings

Network_Symbol

Alternatively, you can also hit Cmd+Space to trigger the Spotlight search. Type “Network” in the search bar and click on the icon once it appears. This will directly navigate you to the Network Settings.

network_on_spotlight

From the pop-up window, select an active network interface. For example, our Mac is connected to a Wi-Fi network. So my active network is Wi-Fi. Make sure you are on the active network tab and then click on Advanced.

Network_Settings_menu

A new window will open the configuration settings for that adapter. Move to the DNS settings by clicking on the DNS tab.

macOS_DNS_tab

After you get into the DNS tab, you will see a ‘+’ button at the left-bottom of the dialogue box. Click on the ‘+’ button to add DNS Servers and wipe all the previous ones. You can add as many as you want by clicking on the ‘+’ button. The order in which you enter the DNS IPs will decide the primary and secondary DNS Servers. Click on Ok when you are done.

static_DNS_mac

On the network settings page, click Apply for the changes to register. Restart the Wi-Fi option for changes to take effect. Your DNS server will be the one you have specified in the network settings.

Change DNS Server on Android

In the newer versions of Android, you have the option to change the DNS Server natively. I am using a Note 9 for this demonstration. But the steps to change DNS Server would be similar to this in most of the Android phones. We need to go to the Settings menu and open Network and Connections. Once you are on that page, click on “Wi-Fi”.

Android_Wi-Fi_Settings

When you on the Wi-Fi settings page, on top you will see the active Wi-Fi connection. Tap on it to get to the specific Wi-Fi configuration page.

Android_tap_on-WiFi

On the Wi-Fi configuration page, navigate to “Advanced“. Generally, it would be at the bottom of all the options.

WiFi_Settings_Advanced

When you tap on “Advanced“, you will be guided to the advance section page. On the stock Android version, you will get a pop-up. Anyways, the IP settings would be set to “DHCP” by default. So, you won’t see any DNS Settings. You need to switch to Static to change your DNS Server.

IP_Settings_DHCP

Once you switch the IP settings to Static, you will see a lot of text fields appear. Navigate to DNS1 and DNS2. Here, you can enter your primary and secondary DNS Servers. Now, tap on the Save button for the changes to take effect.

set_DNS_Server

The problem with this method is you can only set 2 DNS Servers and that too specific to an SSID. Now, a third-party app can be a solution but most of them don’t work on Android version 7 and above. If you are on a lower Android Version like Lollipop, you can try the Wi-Fi Settings app.

Change DNS Server on iPad/iPhone

If you are on iOS, the steps are quite similar to that of Android. Head over to the Settings menu by tapping on the Settings icon. It should be at the bottom right of the screen on the dock.

wifi_Settings_ios

Tap on the Wi-Fi and under the Wifi options, you will see the Wi-Fi which you are connected at the top of the list. Once you are in the Wi-Fi page, tap on the “i” button next to the Wi-Fi you are connected to.

i_button_wifi

You’ll now see details like IP address of your device and router etc. Next, tap on the “Configure DNS” option.

configure_DNS

Choose manual and delete all the previous IP address. Once cleared add new DNS server IPs by clicking on “Add Search Domain” and then go back to save changes.

save_DNS_Page_ios

Now, your phone should start using the DNS Server you have configured.

How to Change DNS Server on Your Router

The problem with all the methods mentioned above is that you are changing the DNS on the particular device. If you have access to the router, consider changing DNS on it. This way it is applicable to all devices that connect to the network. It saves time and configuration.

Every router is different and has a different UI. We are using a Netgear router with a custom ROM dd-wrt. So, the steps won’t be identical for your router, but they’re somewhat similar. Firstly, login to the web portal of the router. The web portal address, username, and password are mostly printed behind the router. In case you don’t have physical access to the router, the web portal URL is mostly the PC’s gateway address. To find that, open command prompt and type the following command.

ipconfig | findstr "Default Gateway"

After you have the web portal loaded, log in with the credentials. Every router has a different web interface, but the overall structure is the same. Move over to the Basic setup page under the Setup tab.

router_setup_page

When you are in the basic setup page, navigate to the Network Address Server Settings (DHCP). You will have text fields to enter the DNS IPs. Enter them in the order of preference. Click on Save and then Apply Settings.

router_dns_ip_set

Wrapping Up

If you have access to the router, then I would recommend configuring DNS on the router. If you don’t have access to the router and you are in an office network, the second best method would be to configure it locally. Once you have configured DNS on the local device it would override the settings on your router. There are also possible chances that your device is still not using the same DNS.

Read: How to The DNS Server Isn’t Responding” in Windows 10

You may also like

Leave a Comment