How to Change DNS Servers in Windows

Change DNS servers in any version of Windows

Most computers and devices connect to a local network using DHCP and DNS servers are automatically configured in Windows. When you change the DNS servers in Windows, you change which servers Windows uses to translate hostnames (for example, www.lifewire.com) to IP addresses (for example, 208.185.127.40).

DNS servers are sometimes the cause of certain types of internet problems. Changing DNS servers can help troubleshoot the problem. Here's how to override these automatic DNS servers with others of your choosing.

Instructions in this article apply to Windows 10, Windows 8, and Windows 7.

How to Change Windows DNS Servers

Below are the steps required to change the DNS servers that Windows uses. However, the procedure is different depending on the version of Windows.

For a head start, skip these first four steps and go to Step 5 by entering the control netconnections Control Panel applet command in the Run dialog box.

  1. On Windows 8.1, select Network Connections from the Power User Menu, then skip to Step 5.

  2. Select Network and Internet.

    Network and Internet link in Control Panel

    Network and Internet doesn't appear if the Control Panel displays large or small icons. Instead, choose Network and Sharing Center, then skip to Step 4.

  3. In the Network and Internet window, select Network and Sharing Center to open that applet.

    Network and Sharing Center link in Control Panel
  4. In the Network and Sharing Center window, select Change adapter settings.

    Change adapter settings link in Network and Sharing Center
  5. The Network Connections window lists connections to the computer. Wired connections are labeled as Ethernet or Local Area Connection, while wireless ones are labeled as Wi-Fi.

    If you don't see the right connection, change the view to Details, go to the Connectivity column, and use the connection that lists Internet access.

    Wi-Fi adapter in use
  6. Open the network connection you want to change the DNS servers for by double-clicking or double-tapping on its icon.

  7. In the Status window, select Properties.

    Properties button in Wi-Fi Status window

    In some versions of Windows, provide the administrator password if you're not logged in to an admin account.

  8. In the Properties window, go to the This connection uses the following items section and 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.

    Internet Protocol Version 4 (TCP/IPv4) button in Wi-Fi Properties
  9. Select Properties.

  10. In the Internet Protocol Properties window, choose Use the following DNS server addresses.

    If Windows has custom DNS servers configured, replace the existing DNS server IP addresses with new ones.

  11. Enter the IP address for the Preferred DNS server and for the Alternate DNS server.

    Use the following DNS server addresses

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

  12. Select OK to make the DNS server changes.

  13. Close Control Panel.

  14. Verify that the new DNS servers work properly in Windows. Visit several websites in your favorite web browser. If the web pages show up as quickly as before, the new DNS servers are working properly.

How to Change DNS Servers With Command Prompt

The preferred DNS server in Windows can be changed through Command Prompt. Use this method if you're comfortable entering commands on the command line.

  1. Type netsh and press Enter.

    Screenshot of netsh in elevated Command Prompt window
  2. At the netsh> prompt, type interface ip show config, then press Enter.

    Screenshot of netsh interface ip show config command in Windows 10
  3. Locate the network connection for which you want the DNS server changed.

    netsh interface ip show config command results in Windows 10
  4. Enter interface ip set dns "Ethernet0" static 8.8.8.8 and press Enter. Replace Ethernet0 with the name of your connection and 8.8.8.8 with the DNS server you want to use.

    Use the command line, in Command Prompt or a BAT file, to force the connection to use DHCP. Replace the static <ip> section of the command with dhcp.

  5. When the command is completed, the netsh> prompt displays.

  6. Close Command Prompt.

More Information on DNS Settings

Setting up custom DNS servers for your computer only applies to that computer, not to the other devices on the network. For example, set up a Windows laptop with one set of DNS servers and use an entirely different set on a desktop, phone, or tablet.

DNS settings apply to the closest device they're configured on. For example, if you use one set of DNS servers on the router, your laptop and phone will use these DNS servers when they connect to Wi-Fi. However, if the router has its own set of servers and the laptop has its own separate set, the laptop will use a different DNS server than the phone and the other devices that use the router. The same is true if the phone uses a custom set.

DNS settings only trickle down a network if each device is set up to use the router's DNS settings and not their own. This means that if four devices are on a network, for example, all four could be using separate DNS servers.

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