How to Change DNS Servers in Windows

Change DNS Servers in Any Version of Windows

How to change Windows DNS Servers

Norwood Themes / Unsplash

When you change the DNS servers in Windows, you change which servers Windows uses to translate hostnames (like to IP addresses (like Since DNS servers are sometimes the cause of certain kinds of internet problems, changing DNS servers can be a good troubleshooting step.

Since most computers and devices connect to a local network via DHCP, there are probably already DNS servers automatically configured in Windows for you. What you'll be doing here is overriding 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 a little different depending on the version of Windows you're using, so be sure to take note of those differences as they're called out.

For a head start, you can skip these first four steps and jump right to Step 5 by executing this Control Panel applet command in a Run dialog box: control netconnections.

  1. If you're using Windows 8.1, it's much faster if you select Network Connections from the Power User Menu, and then skip to Step 5.

  2. Select Network and Internet.

    Network and Internet link in Control Panel

    You won't see Network and Internet if your Control Panel view is set to either Large icons or Small icons. Instead, find Network and Sharing Center, choose it, then skip to Step 4.

  3. In the Network and Internet window that's now open, click or touch Network and Sharing Center to open that applet.

    Network and Sharing Center link in Control Panel
  4. Now that the Network and Sharing Center window is open, click or touch Change adapter settings, located in the left margin.

    Change adapter settings link in Network and Sharing Center
  5. From this new Network Connections screen, locate the network connection that you want to change the DNS servers for.

    Wi-Fi adapter in use

    Wired connections are usually labeled as Ethernet or Local Area Connection, while wireless ones are usually labeled as Wi-Fi.

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

    You may have a number of connections listed here but you can usually ignore any Bluetooth connections, as well as any with a Not connected or Disabled status. If you're still having trouble finding the right connection, change this window's view to Details and use the connection that lists Internet access in the Connectivity column.

  7. Tap or click Properties on the connection's Status window that's now open.

    Properties button in Wi-Fi Status window

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

  8. On the connection's Properties window that appeared, scroll down in the This connection uses the following items: list and click or tap Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol (TCP/IP) to select the IPv4 option, or Internet Protocol Version 6 (TCP/IPv6) if you plan to change the IPv6 DNS server settings.

    Internet Protocol Version 4 (TCP/IPv4) button in Wi-Fi Properties
  9. Tap or click Properties below the list.

  10. Choose the Use the following DNS server addresses: radio button at the bottom of the Internet Protocol Properties window.

    If Windows already has custom DNS servers configured, this radio button may already be selected. If so, you'll just be replacing the existing DNS server IP addresses with new ones over the next few steps.

  11. In the spaces provided, enter the IP address for a Preferred DNS server as well as an Alternate DNS server.

    Use the following DNS server addresses

    You're welcome to enter just a Preferred DNS server, enter a Preferred DNS server from one provider with a Secondary DNS Server from another, or even enter more than two DNS servers using the appropriate fields found within the DNS tab, which you'll find through the Advanced... button.

  12. Tap or click OK.

    The DNS server change takes place immediately. You can now close any Properties, Status, Network Connections, or Control Panel windows that are open.

  13. Verify that the new DNS servers Windows is using are working properly by visiting several of your favorite websites in whatever browser you're using. As long as the web pages show up, and do so at least as quickly as before, the new DNS servers you entered are working properly.

How to Change DNS Servers With Command Prompt

You can also change the preferred DNS server in Windows through Command Prompt. It definitely isn't as easy as following the directions shown above because you have to issue commands over the command line, but it is doable.

  1. Type netsh and press Enter.

    Screenshot of netsh in elevated Command Prompt window
  2. When you see netsh>, type interface ip show config, and 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. Type this command followed by Enter, but be sure to replace Ethernet0 with the name of your own connection and with the DNS server you want to start using.

    interface ip set dns "Ethernet0" static
  5. The command completed successfully if you see netsh> again. You can now close out of Command Prompt.

You can also use the command line, like in Command Prompt or a BAT file, to force the connection to use DHCP. Just replace the static <ip> section of the above command with dhcp.

More Information on DNS Settings

Remember that setting up custom DNS servers for your computer only applies to that computer, not all the other devices on your network. For example, you can set up your Windows laptop with one set of DNS servers and use an entirely different set on your desktop, phone, tablet, etc.

Also, remember that DNS settings apply to the "closest" device they're configured on. For example, if you use one set of DNS servers on your router, your laptop and phone will use them, too, when they connect to Wi-Fi.

However, if your router has its own set of servers and your laptop has its own separate set, the laptop will use a different DNS server than your phone and the other devices that use the router. The same is true if your 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 while you might have four devices on your network, for example, all four could be using separate DNS servers.

We keep an updated list of publicly available DNS servers that you can pick from, any of which are arguably better than those automatically provided by your ISP. See our Free & Public DNS Servers piece for the complete list.