-->

How to Change DNS Server in Windows 11

    How to Change DNS Server in Windows 11

    Changing the DNS server in Windows 11 can help you troubleshoot website loading problems, DNS resolution errors, or connectivity issues caused by an unreliable DNS service. Windows 11 allows you to use the DNS servers provided automatically by your router or configure DNS server addresses manually.

    In this guide, you will learn how to change the DNS server in Windows 11 using the Settings app. We will also cover how to verify the new DNS configuration, test DNS resolution, use DNS over HTTPS (DoH), and restore the default DNS settings if necessary.

    How to Change DNS Server in Windows 11
    Step-by-step guide showing how to change DNS server settings in Windows 11 using the Settings app.

    If you recently flushed your DNS cache, changing the DNS server is a useful next step when DNS problems continue. You can also read our guide on How to Flush DNS Cache in Windows 11.


    What Is a DNS Server?

    DNS stands for Domain Name System. It translates human-readable domain names, such as example.com, into IP addresses that computers use to communicate over a network.

    When you enter a website address in your browser, Windows needs to resolve that domain name before connecting to the destination server. The DNS server performs this name-resolution process.

    By default, your computer may receive DNS server addresses automatically from your router through DHCP. However, you can manually configure different DNS servers when you want to troubleshoot DNS problems or use a different DNS service.

    Why Change the DNS Server in Windows 11?

    There are several reasons you might want to change DNS servers on a Windows 11 PC.

    • Websites fail to load even though your internet connection works.
    • DNS resolution is slow or unreliable.
    • Some domains cannot be reached while others work normally.
    • You want to test whether your ISP's DNS server is causing a problem.
    • You want to use a different public DNS service.
    • You are troubleshooting intermittent website connection errors.
    • You want to configure DNS over HTTPS when supported by the DNS service.

    Changing DNS does not increase the bandwidth provided by your internet connection. It primarily changes which DNS service Windows uses to translate domain names into IP addresses.

    DNS Servers You Can Use

    There are many public DNS services available. Some commonly used addresses include:

    DNS Service Preferred DNS Alternate DNS
    Cloudflare 1.1.1.1 1.0.0.1
    Google Public DNS 8.8.8.8 8.8.4.4
    Quad9 9.9.9.9 149.112.112.112

    These addresses are examples of publicly available DNS services. Your best choice can depend on your location, network, reliability requirements, and the features offered by the DNS provider.

    If your current connection is working normally, there is no requirement to change the DNS server simply because another service is popular.

    Before Changing Your DNS Server

    Before changing network settings, it is useful to record your current configuration. This makes it easier to return to the previous setup if necessary.

    Open Command Prompt and run:

    ipconfig /all

    Look for the network adapter you are currently using and locate the DNS Servers entry.

    You can also review your current DNS configuration using PowerShell:

    Get-DnsClientServerAddress

    This command displays the DNS server addresses associated with your network interfaces.

    How to Change DNS Server in Windows 11

    The easiest method for most Windows 11 users is through the Settings app.

    Step 1: Open Windows Settings

    Press Windows + I on your keyboard to open Settings.

    You can also open the Start menu and select Settings.

    Step 2: Open Network & Internet

    In Settings, select:

    Network & internet

    You will see network options such as Wi-Fi, Ethernet, VPN, hotspot, and other network settings.

    Step 3: Select Your Active Network Connection

    If you are connected through Wi-Fi, select Wi-Fi.

    If you are connected using an Ethernet cable, select Ethernet.

    Then select the network connection you are currently using.

    Step 4: Find IP Assignment

    Look for the IP assignment section.

    Select the Edit button next to IP assignment.

    A window called Edit IP settings will appear.

    Step 5: Change Automatic to Manual

    In the Edit IP settings window, change the setting from:

    Automatic (DHCP)

    to:

    Manual

    Windows will display additional options for IPv4 and IPv6.

    Step 6: Enable IPv4

    For a typical DNS configuration, enable IPv4.

    You will see fields for IP address, subnet mask, gateway, preferred DNS, and alternate DNS.

    Important: Changing the DNS server does not require you to manually change your IP address, subnet mask, or gateway in most home networks. If your network uses DHCP for these settings, be careful not to replace working network information unnecessarily.

    Step 7: Enter the DNS Server Addresses

    Enter your selected DNS addresses in:

    • Preferred DNS
    • Alternate DNS

    For example, if you want to test Cloudflare DNS, you can enter:

    Preferred DNS: 1.1.1.1
    Alternate DNS: 1.0.0.1

    Alternatively, you could test Google Public DNS:

    Preferred DNS: 8.8.8.8
    Alternate DNS: 8.8.4.4

    Only enter DNS addresses from a DNS provider you trust.

    Step 8: Configure DNS over HTTPS

    Windows 11 can provide DNS over HTTPS options when configuring DNS manually.

    Depending on the DNS server and Windows configuration, you may see options related to DNS over HTTPS.

    DNS over HTTPS encrypts DNS queries by sending them through HTTPS instead of sending traditional DNS queries in unencrypted form.

    Windows 11 can provide options such as:

    • Off — DNS queries are sent without DNS over HTTPS encryption.
    • On (automatic template) — Windows attempts to use an automatically determined DNS over HTTPS template.
    • On (manual template) — you specify the DNS over HTTPS template manually.

    If you are unsure about the correct DNS over HTTPS template, automatic configuration is generally easier than manually entering a template.

    Windows also provides a fallback option that determines whether DNS queries can be sent without encryption when DNS over HTTPS cannot be used.

    Step 9: Save the Changes

    After entering the DNS configuration, select Save.

    Windows should now use the DNS server addresses you configured for that network interface.

    How to Verify the New DNS Server

    After changing the DNS server, verify that Windows is using the new configuration.

    Method 1: Use ipconfig

    Open Command Prompt and run:

    ipconfig /all

    Find your active Wi-Fi or Ethernet adapter and look for the DNS Servers entry.

    The addresses shown there should match the DNS servers you configured.

    Method 2: Use PowerShell

    Open PowerShell and run:

    Get-DnsClientServerAddress

    This command displays DNS server addresses configured for the network interfaces on the computer.

    If you have several network adapters, such as Wi-Fi, Ethernet, VPN, or virtual adapters, you may see multiple entries.

    How to Test DNS Resolution

    Changing the DNS server is only part of the process. You should test whether domain names can now be resolved correctly.

    Open Command Prompt and run:

    nslookup example.com

    The result should show the DNS server being used and the IP address returned for the domain.

    You can also test another domain:

    nslookup microsoft.com

    If DNS resolution works, Windows can successfully communicate with the configured DNS service.

    How to Test Internet Connectivity Separately

    DNS resolution and internet connectivity are related but not identical. A computer can have a working internet connection while experiencing DNS problems.

    To test connectivity to an IP address, run:

    ping 1.1.1.1

    If the IP address responds but domain names fail to resolve, DNS configuration may be part of the problem.

    You can also test a domain name:

    ping example.com

    If you are troubleshooting network connectivity in more detail, see our guides on How to Ping an IP Address in Windows 11 and How to Check Packet Loss in Windows 11.

    Should You Flush DNS Cache After Changing DNS?

    Flushing the DNS cache can be useful after changing DNS servers, particularly when troubleshooting a DNS-related problem.

    Open Command Prompt and run:

    ipconfig /flushdns

    This clears the Windows DNS resolver cache so that cached DNS information does not interfere with your troubleshooting.

    For a complete explanation, read How to Flush DNS Cache in Windows 11.

    How to Change DNS Server Back to Automatic

    If the manually configured DNS server causes problems or you simply want to return to your normal network configuration, you can switch DNS back to automatic.

    Go to:

    1. Open Settings.
    2. Select Network & internet.
    3. Select Wi-Fi or Ethernet.
    4. Select your active network connection.
    5. Find IP assignment.
    6. Select Edit.
    7. Change the configuration back to Automatic (DHCP).
    8. Select Save.

    With Automatic (DHCP), your router or another network access device can provide the DNS server configuration automatically.

    Reset DNS Server Using PowerShell

    Advanced users can manage DNS server configuration from PowerShell.

    First, display the configured DNS servers:

    Get-DnsClientServerAddress

    To set DNS servers for a specific network interface, PowerShell provides the Set-DnsClientServerAddress cmdlet.

    For example:

    Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses ("1.1.1.1","1.0.0.1")

    The interface index in this example is only an example. You should use the interface index belonging to the network adapter you actually want to modify.

    You can find interface information with:

    Get-NetAdapter

    Be careful when using PowerShell commands because changing the wrong network interface can affect connectivity.

    How to Reset DNS Configuration to DHCP Using PowerShell

    If you previously configured static DNS addresses through PowerShell and want to return to the DNS addresses supplied by DHCP, you can use:

    Set-DnsClientServerAddress -InterfaceIndex 12 -ResetServerAddresses

    Again, replace the example interface index with the correct index for your network adapter.

    Microsoft documents that setting static DNS addresses on an interface overrides the DNS configuration supplied by DHCP. The same cmdlet can reset the DNS client to the DNS addresses supplied through DHCP.

    What If Changing DNS Does Not Fix the Problem?

    Changing DNS will not solve every internet or network problem. If websites still do not load, continue troubleshooting systematically instead of repeatedly changing DNS providers.

    1. Check Your IP Address

    Run:

    ipconfig

    Make sure your active network adapter has a valid IP address, subnet mask, and default gateway.

    You can also read How to Check IP Address in Windows 11.

    2. Check Your Network Adapter

    If the adapter itself is not working correctly, DNS changes will not solve the underlying problem.

    See How to Check Network Adapter in Windows for additional diagnostic steps.

    3. Test DNS Resolution

    Run:

    nslookup example.com

    If the lookup fails, investigate DNS configuration, the DNS service, firewall rules, VPN software, or network restrictions.

    4. Check Packet Loss

    Persistent packet loss can cause connection problems that have nothing to do with DNS.

    Use our packet loss guide to continue testing the connection.

    5. Consider Resetting Network Settings

    If the Windows network configuration is severely damaged, a network reset may be appropriate after less disruptive troubleshooting methods have failed.

    See How to Reset Network Settings in Windows 11 before using this option.

    Changing DNS vs Flushing DNS Cache

    Changing the DNS server and flushing the DNS cache are two different actions.

    Action What It Does
    Change DNS Server Changes which DNS service Windows uses for DNS queries.
    Flush DNS Cache Clears cached DNS resolver information stored by Windows.
    Network Reset Resets broader network configuration and reinstalls network adapters.

    For DNS-related troubleshooting, it can make sense to change the DNS server and then flush the DNS cache before testing again.

    Common Mistakes When Changing DNS

    Using an Incorrect DNS Address

    Double-check every number before saving the configuration. A typo in the DNS address can prevent domain names from resolving.

    Changing the IP Address Unnecessarily

    If you only want to change DNS, avoid manually changing your IP address, subnet mask, and gateway unless you understand the requirements of your network.

    Changing DNS on the Wrong Adapter

    Computers can have Wi-Fi, Ethernet, VPN, Bluetooth, and virtual network adapters. Make sure you modify the adapter that is actually being used for the connection.

    Assuming DNS Will Increase Internet Speed

    A different DNS server may improve DNS lookup responsiveness in some circumstances, but it cannot increase the maximum bandwidth provided by your internet connection.

    Changing DNS Without Testing the Original Configuration

    Before making changes, record the existing configuration. This makes troubleshooting and rollback much easier.

    Frequently Asked Questions

    Is it safe to change the DNS server in Windows 11?

    Yes, changing DNS server addresses is a normal network configuration task. However, you should use DNS services from providers you trust and record your original settings before making changes.

    Does changing DNS improve internet speed?

    It does not increase your internet bandwidth. A different DNS service may sometimes provide faster or more reliable domain-name resolution, but your connection speed is still determined by your network and internet service.

    Do I need to restart Windows after changing DNS?

    A full Windows restart is generally not necessary. After saving the new configuration, verify the DNS servers with ipconfig /all or Get-DnsClientServerAddress and test DNS resolution.

    Should I use IPv4 or IPv6 DNS?

    For a typical troubleshooting scenario, IPv4 DNS is usually the simplest place to start. If your network actively uses IPv6, you can also configure IPv6 DNS appropriately.

    What is the difference between DNS and IP address?

    An IP address identifies a network endpoint, while DNS translates domain names into IP addresses. For example, you type a domain name into a browser, and DNS helps Windows determine the IP address associated with that domain.

    Can I change DNS using Command Prompt?

    Windows provides several command-line and PowerShell tools for network configuration. For most users, however, the Settings app is easier and less error-prone. Advanced users can use PowerShell's Set-DnsClientServerAddress cmdlet.

    Should I flush DNS after changing DNS servers?

    It can be useful when troubleshooting DNS problems. Running ipconfig /flushdns clears the local DNS resolver cache and gives you a clean starting point for testing.

    Final Thoughts

    Changing the DNS server in Windows 11 is a useful troubleshooting technique when you suspect DNS resolution problems or want to test a different DNS service. The simplest method is to open Settings > Network & internet, select your active Wi-Fi or Ethernet connection, edit the IP settings, switch to manual configuration, and enter the preferred and alternate DNS addresses.

    After changing the DNS server, verify the configuration with ipconfig /all or Get-DnsClientServerAddress. Then use nslookup and ping to determine whether DNS resolution and network connectivity are working correctly.

    If DNS problems continue, flushing the DNS cache can be the next step. If the problem is broader than DNS, continue with IP, network adapter, packet-loss, and network-reset troubleshooting rather than repeatedly changing DNS servers.

    For more Windows 11 networking guides, explore our related tutorials on checking DNS settings, checking internet speed, pinging an IP address, and resetting network settings.

    LihatTutupKomentar