How to Change DNS Servers in Windows

Change DNS Servers in Any Version of Windows

Windows desktop showing Wi-Fi Properties applet onscreen

When you change the DNS servers in Windows, you change which servers Windows uses to translate hostnames (like www.lifewire.com) to IP addresses (like 208.185.127.40). 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.

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.

If your Windows PC connects to the internet via a router at your home or business, and you want the DNS servers for all the devices that connect to that router to change, you're better off changing settings on the router instead of on each device. See How Do I Change DNS Servers? for more on this.

How to Change DNS Servers in Windows

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. Once in Control Panel, touch or click Network and Internet.

    Network and Internet link in Control Panel

    Windows XP users only: Choose Network and Internet Connections and then Network Connections on the following screen, and then skip down to Step 5. If you don't see Network and Internet Connections, go ahead and choose Network Connections and jump to Step 5.

    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

    In Windows Vista, this link is called Manage network connections.

  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.

    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.


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

  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

    See our Free & Public DNS Servers list for an updated collection of DNS servers you can use as an alternative to the ones assigned by your ISP.

    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.

  2. When you see netsh>, type interface ip show config, and then press Enter.

    netsh interface ip show config command in Windows 10
  3. Locate the network connection for which you want the DNS server changed. "Ethernet0" is the name of the connection in our example.

    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 8.8.8.8 with the DNS server you want to start using.

    interface ip set dns "Ethernet0" static 8.8.8.8
  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.

Need More Help?

Having some trouble changing DNS servers in Windows? See Get More Help for information about contacting me on social networks or via email, posting on tech support forums, and more.

When contacting me, please note the operating system you're using and which steps you've already completed, as well as when the problem occurred (e.g., which step you couldn't complete), so that I can better understand how to help.