How to change DNS servers in Windows

what to know

  • Open Control Panel > Network and Internet > Network and Sharing Center > Change Adapter Settings .
  • Right-click the connection and select Properties . Select Internet Protocol Version 4 (or Version 6 ) > Properties .
  • Choose to use the following DNS server addresses . Google's versions are 8.8.8.8 and 8.8.4.4 , but there are others available.

This article explains how to change DNS servers in Windows 11, Windows 10, Windows 8, and Windows 7. It also details how to use CMD commands to change DNS settings.

Here are the steps required to change Windows DNS settings. However, the process varies slightly depending on the version of Windows.

  1. Open the control panel. There are several ways to get there, including searching for it or executing a control command from the Run dialog box.

    On Windows 8.1, select Network Connections from the Power User menu (press Win + X ) and skip to step 5.

  2. Select Network and Internet .

    If Control Panel displays large icons or small icons, Network & Internet will not be displayed. Instead, select Network and Sharing Center and skip to step 4.

  3. Select Network and Sharing Center .

  4. Select Change adapter settings .

  5. Double-click or double-click the connection whose DNS server you want to change. Wired connections are labeled "Ethernet" or "Local Area Connection," while wireless connections are labeled "Wi-Fi."

    If you don't see the correct connection, change the view to Details , go to the Connections column, And use the connections listed for Internet access .

  6. In the Status window, select Properties .

    In some versions of Windows, if you are not logged in with an administrator account, provide the administrator password.

  7. From the section titled This connection uses the following items , select Internet Protocol version 4 (TCP/IPv4) or Internet Protocol (TCP/IP) to select the IPv4 option, or select Internet Protocol version 6 (TCP/IPv6) to change the IPv6 DNS Server settings.

  8. Select Properties to open Windows DNS settings.

  9. Choose to use the following DNS server addresses .

    If Windows is configured with a custom DNS server, replace the existing DNS server IP address with the new IP address.

  10. Enter the IP addresses of the primary and secondary DNS servers .

    You can also enter only a preferred DNS server, replace one provider's preferred DNS server with a secondary DNS server from another provider, or enter more than two DNS servers using the fields in the DNS tab (select Advanced to enter multiple DNS servers).

  11. Select OK to change the DNS server.

You can now close any windows that were opened to change the DNS server and verify that the new server is working properly. Access multiple websites using your favorite web browser. You know the server is working if the web page displays as quickly as before.

The preferred DNS server in Windows can be changed through the command prompt. Use this method if you are accustomed to entering commands on the command line.

  1. Open an elevated command prompt.

  2. Type netsh and press Enter .

  3. At the prompt, type the following and press Enter :

    interface ip show config

  4. Locate the network connection for which you want to change the DNS server. In our example, we are looking for a Wi-Fi connection.

  5. Enter the following command, replacing Wi-Fi with the name of your connection and 8.8.8.8 with the DNS server you want to use.

    interface ip set dns "Wi-Fi" static 8.8.8.8

    Check out our list of free and public DNS servers for a complete list of publicly available DNS servers, which may be more complete than the list provided by your ISP.

After the command completes, the netsh> prompt will be displayed. You can now close the command prompt.

Setting up a custom DNS server for your computer only works on that computer, not other devices on the network. For example, you can set up a Windows laptop with one set of DNS servers and use a completely different group on your desktop, phone, or tablet.

DNS settings apply to the nearest device on which they are configured. Suppose you use a set of DNS servers on your router. Your laptop and phone will use these DNS servers when connected to Wi-Fi. However, if the router has its own set of servers, and the laptop has its own separate set of servers, the laptop will use a different DNS server than the phone and other devices using the router. The same is true if the phone uses custom settings.

DNS settings will only permeate the network if each device is set up to use the router's DNS settings instead of its own. This means that, for example, if there are four devices on the network, all four devices can use separate DNS servers.

Most computers and devices connect to local networks using DHCP and DNS servers that are automatically configured in Windows. DNS servers are sometimes the cause of certain types of Internet problems, and changing them can help solve the problem.

FAQ
  • A DNS server is a computer server that contains a database of public IP addresses and their associated host names. It can convert these names to IP addresses upon request. Once the IP address is returned, the website you want to visit will appear in your web browser.

  • These errors usually mean "DNS server not responding," which means your device won't be able to connect to the internet. Common causes include improper Internet provider behavior; a faulty TCP/IP or DHCP service; overly aggressive antivirus software; or a faulty router or modem.

  • To change DNS settings on an Android 9 or later phone, tap Settings > Network & Internet > Private DNS > Private DNS Provide a hostname . Enter the DNS provider information.