Change IPv4 and IPv6 DNS Server Address in Windows  

Page 1 of 2 12 LastLast
    Change IPv4 and IPv6 DNS Server Address in Windows

    Change IPv4 and IPv6 DNS Server Address in Windows

    How to Change IPv4 and IPv6 DNS Server Address in Windows
    Published by Category: Network & Sharing
    14 May 2020
    Designer Media Ltd


    How to Change IPv4 and IPv6 DNS Server Address in Windows


    A DNS (Domain Name System) server is the service that makes it possible for you to open a web browser, type a domain name and load your favorite websites.

    When you subscribe to an Internet connection with an Internet Service Provider (ISP) (ex: Cox, Comcast, AT&T, etc...) in your area, you will use their DNS server by default. If you like, you can use third-party DNS servers (ex: Cloudflare, OpenDNS or Google Public DNS) instead, which could offer a variety of features that your ISP may not.

    Sometimes the DNS servers are slow responding to requests, or they just are not reliable. Changing your default settings can improve your internet browsing experience.

    Starting with Windows 10 build 19268, you can now test DNS over HTTPS (DoH) in Windows 10.

    This tutorial will show you how to change the IPv4 and IPv6 DNS server address in Windows 7, Windows 8, and Windows 10.

    You must be signed in as an administrator to change the DNS server address.



    Contents

    • Option One: To Change DNS Server Address on Router
    • Option Two: To Change IPv4 and IPv6 DNS Server Address in Control Panel
    • Option Three: To Change IPv4 and IPv6 DNS Server Address in PowerShell
    • Option Four: To Change IPv4 and IPv6 DNS Server Address in Command Prompt
    • Option Five: To Change IPv4 and IPv6 DNS Server Address in Settings






    OPTION ONE

    To Change DNS Server Address on Router


    1 If you connect to the Internet via a router, then you may want to change the DNS address in your router settings instead so all devices that connect via the router will use this DNS address if the computer is set to Obtain DNS server address automatically.

    You'll need to read the manual for how to change the DNS settings for your router's model number.

    Change IPv4 and IPv6 DNS Server Address in Windows-linksys_dns.jpg






    OPTION TWO

    To Change IPv4 and IPv6 DNS Server Address in Control Panel


    1 Open the Control Panel (icons view), and click/tap on the Network and Sharing Center icon.

    2 Click/tap on the Connections link (ex: "vEthernet (New Virtual Switch)") for your current network connection. (see screenshot below)

    Change IPv4 and IPv6 DNS Server Address in Windows-change_dns-1.jpg

    3 Click/tap on the Properties button. (see screenshot below)

    Change IPv4 and IPv6 DNS Server Address in Windows-change_dns-2.jpg

    4 In the Networking tab, select (highlight) Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol Version 6 (TCP/IPv6) for which one you want to change, and click/tap on the Properties button. (see screenshot below)

    Change IPv4 and IPv6 DNS Server Address in Windows-change_dns-3.jpg

    5 Do step 6 (Obtain DNS automatically) or step 7 (Use custom DNS) below for what you want to do.


     6. To Obtain DNS Server Address Automatically from ISP

    This is the default setting.

    A) In the General tab, select (dot) Obtain DNS server address automatically, click/tap on OK, and go to step 8 below. (see screenshots below)

    Change IPv4 and IPv6 DNS Server Address in Windows-change_dns-4.jpg Change IPv4 and IPv6 DNS Server Address in Windows-change_ipv6_dns-4.png


     7. To Use Custom or Third-party DNS Server Address

    A) In the General tab, select (dot) Use the following DNS server addresses. (see screenshots below)

    B) Enter the Preferred DNS server and Alternate DNS server addresses you want to use, click/tap on OK, and go to step 8 below.

    Third-party DNS servers Preferred IPv4 DNS server address Alternate IPv4 DNS server address Preferred IPv6 DNS server Alternate IPv6 DNS server address
    Google Public DNS 8.8.8.8 8.8.4.4 2001:4860:4860:8888
    OR
    2001:4860:4860:0:0:0:0:8888
    2001:4860:4860:8844
    OR
    2001:4860:4860:0:0:0:0:8844
    OpenDNS 208.67.222.222 208.67.220.220 2620:0:ccc::2 2620:0:ccd::2
    1.1.1.1 by Cloudflare 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
    Cloudflare (block malware only) 1.1.1.2 1.0.0.2 2606:4700:4700::1112 2606:4700:4700::1002
    Cloudflare (block malware and adult content) 1.1.1.3 1.0.0.3 2606:4700:4700::1113 2606:4700:4700::1003
    Quad9 9.9.9.9 149.112.112.112 (secure)
    OR
    149.112.112.10 (unsecure)
    2620:fe::fe (secure)
    OR
    2620:fe::10 (unsecure)
    CleanBrowsing (Family filter) 185.228.168.168 185.228.168.169 2a0d:2a00:1:: 2a0d:2a00:2::
    CleanBrowsing (Adult filter) 185.228.168.10 185.228.168.11 2a0d:2a00:1::1 2a0d:2a00:2::1
    Change IPv4 and IPv6 DNS Server Address in Windows-change_dns-5.jpg Change IPv4 and IPv6 DNS Server Address in Windows-change_ipv6_dns-5.png


    8 Click/tap on Close. (see screenshot below)

    Change IPv4 and IPv6 DNS Server Address in Windows-change_dns-6.jpg

    9 Click/tap on Close. (see screenshot below step 3)

    10 You can now close the Network and Sharing Center if you like. (see screenshot below step 2)

    11 If you like or needed, you can flush the DNS resolver cache to make sure the new DNS server is applied.






    OPTION THREE

    To Change IPv4 and IPv6 DNS Server Address in PowerShell


    1 Open an elevated PowerShell.

    2 Enter the command below into the elevated PowerShell, press Enter, and make note of the Interface Alias (ex: "Ethernet") you want to change the IPv4 or IPv6 DNS server address for. (see screenshot below)

    Get-DnsClientServerAddress

    You will also be able to see the current IPv4 and IPv6 DNS server addresses for network connections (InterfaceAlias).

    Change IPv4 and IPv6 DNS Server Address in Windows-get-dnsclientserveraddress.png


    3 Do step 4 (Obtain DNS automatically), step 5 (Change IPv4 DNS), or step 6 (Change IPv6 DNS) below for what you want to do.


     4. To Obtain IPv4 and IPv6 DNS Server Addresses Automatically from ISP

    This is the default setting.

    A) Enter the command below you want to use into the elevated command prompt, press Enter, and go to step 7 below. (see screenshot below)

    Set-DNSClientServerAddress "Interface Alias" -ResetServerAddresses

    Substitute Interface Alias in the command above with the actual Interface Alias (ex: "Ethernet") from step 2 above.

    Change IPv4 and IPv6 DNS Server Address in Windows-set-dnsclientserveraddress_default.png


     5. To Change IPv4 DNS Server Address

    A) Enter the command below you want to use into the elevated PowerShell, press Enter, and go to step 7 below. (see screenshot below)

    Set-DNSClientServerAddress "Interface Alias" –ServerAddresses ("Preferred DNS address", "Alternate DNS address")

    Substitute Interface Alias in the command above with the actual Interface Alias (ex: "Ethernet") from step 2 above.

    Substitute Preferred DNS address in the command above with the actual preferred IPv4 DNS server address (see table below) you want to use for this network connection.

    Substitute Alternate DNS address in the command above with the actual alternate IPv4 DNS server address (see table below) you want to use for this network connection.

    For example: Set-DNSClientServerAddress "Ethernet" –ServerAddresses (“1.1.1.1”,”1.0.0.1”)


    Third-party DNS servers Preferred IPv4 DNS server address Alternate IPv4 DNS server address
    Google Public DNS 8.8.8.8 8.8.4.4
    OpenDNS 208.67.222.222 208.67.220.220
    1.1.1.1 by Cloudflare 1.1.1.1 1.0.0.1
    Cloudflare (block malware only) 1.1.1.2 1.0.0.2
    Cloudflare (block malware and adult content) 1.1.1.3 1.0.0.3
    Quad9 9.9.9.9 149.112.112.112 (secure)
    OR
    149.112.112.10 (unsecure)
    CleanBrowsing (Family filter) 185.228.168.168 185.228.168.169
    CleanBrowsing (Adult filter) 185.228.168.10 185.228.168.11

    Change IPv4 and IPv6 DNS Server Address in Windows-change_ipv4_dns_address_powershell.png


     6. To Change IPv6 DNS Server Address

    A) Enter the command below you want to use into the elevated PowerShell, press Enter, and go to step 7 below. (see screenshot below)

    Set-DNSClientServerAddress "Interface Alias" –ServerAddresses ("Preferred DNS address", "Alternate DNS address")

    Substitute Interface Alias in the command above with the actual Interface Alias (ex: "Ethernet") from step 2 above.

    Substitute Preferred DNS address in the command above with the actual preferred IPv6 DNS server address (see table below) you want to use for this network connection.

    Substitute Alternate DNS address in the command above with the actual alternate IPv6 DNS server address (see table below) you want to use for this network connection.

    For example: Set-DNSClientServerAddress "Ethernet" –ServerAddresses (“2606:4700:4700::1111”,”2606:4700:4700::1001”)


    Third-party DNS servers Preferred IPv6 DNS server Alternate IPv6 DNS server address
    Google Public DNS 2001:4860:4860:0:0:0:0:8888 2001:4860:4860:0:0:0:0:8844
    OpenDNS 2620:0:ccc::2 2620:0:ccd::2
    1.1.1.1 by Cloudflare 2606:4700:4700::1111 2606:4700:4700::1001
    Cloudflare (block malware only) 2606:4700:4700::1112 2606:4700:4700::1002
    Cloudflare (block malware and adult content) 2606:4700:4700::1113 2606:4700:4700::1003
    Quad9 2620:fe::fe (secure)
    OR
    2620:fe::10 (unsecure)
    CleanBrowsing (Family filter) 2a0d:2a00:1:: 2a0d:2a00:2::
    CleanBrowsing (Adult filter) 2a0d:2a00:1::1 2a0d:2a00:2::1

    Change IPv4 and IPv6 DNS Server Address in Windows-change_ipv6_dns_address_powershell.jpg

    7 If you like or needed, you can flush the DNS resolver cache to make sure the new DNS server is applied.

    8 You can now close the elevated PowerShell if you like.






    OPTION FOUR

    To Change IPv4 and IPv6 DNS Server Address in Command Prompt


    1 Open an elevated command prompt.

    2 Enter the command below into the elevated command prompt, press Enter, and make note of the Interface Name (ex: "Ethernet") you want to change the IPv4 or IPv6 DNS server address for. (see screenshot below)

    netsh interface show interface

    Change IPv4 and IPv6 DNS Server Address in Windows-netsh_interface-.png


    3 Do step 4 (Obtain DNS automatically) or step 5 (Use custom DNS) below for what you want to do.


     4. To Obtain DNS Server Address Automatically from ISP

    This is the default setting.

    A) Enter the command below you want to use into the elevated command prompt, press Enter, and go to step 6 below. (see screenshot below)

    (IPv4 DNS)
    netsh interface ipv4 set dnsservers "Connection Name" dhcp

    OR

    (IPv6 DNS)
    netsh interface ipv6 set dnsservers "Connection Name" dhcp

    Substitute Connection Name in the command above with the connection name (ex: "vEthernet (New Virtual Switch)") from step 2 above.

    Change IPv4 and IPv6 DNS Server Address in Windows-netsh_interface_ipv6_dhcp.png


     5. To Use Custom or Third-party DNS Server Address

    A) Enter the command below you want to use into the elevated command prompt, and press Enter. (see screenshot below)

    (IPv4 DNS)
    netsh interface ipv4 set dnsservers "Connection Name" static Preferred DNS address primary

    OR

    (IPv6 DNS)
    netsh interface ipv6 set dnsservers "Connection Name" static Preferred DNS address primary

    Substitute Connection Name in the command above with the connection name (ex: "Ethernet") from step 2 above.

    Substitute Preferred DNS address in the command above with the actual preferred IPv4 or IPv6 DNS server address (see table below) you want to use for this network connection.

    For example: netsh interface ipv6 set dnsservers "Ethernet" static 2001:4860:4860:0:0:0:0:8888 primary


    Third-party DNS servers Preferred IPv4 DNS server address Preferred IPv6 DNS server address
    Google Public DNS 8.8.8.8 2001:4860:4860:0:0:0:0:8888
    OpenDNS 208.67.222.222 2620:0:ccc::2
    1.1.1.1 by Cloudflare 1.1.1.1 2606:4700:4700::1111
    Cloudflare (block malware only) 1.1.1.2 2606:4700:4700::1112
    Cloudflare (block malware and adult content) 1.1.1.3 2606:4700:4700::1113
    Quad9 9.9.9.9 2620:fe::fe (secure)
    OR
    2620:fe::10 (unsecure)
    CleanBrowsing (Family filter) 185.228.168.168 2a0d:2a00:1::
    CleanBrowsing (Adult filter) 185.228.168.10 2a0d:2a00:1::1

    Change IPv4 and IPv6 DNS Server Address in Windows-netsh_interface_ipv6_primary.jpg


    B) Enter the command below into the elevated command prompt, press Enter, and go to step 6 below. (see screenshot below)

    (IPv4 DNS)
    netsh interface ipv4 add dnsservers "Connection Name" Alternate DNS address index=2

    OR

    (IPv6 DNS)
    netsh interface ipv6 add dnsservers "Connection Name" Alternate DNS address index=2

    Substitute Connection Name in the command above with the connection name (ex: "Ethernet") from step 2 above.

    Substitute Alternate DNS address in the command above with the actual alternate IPv4 or IPv6 DNS server address (see table below) you want to use for this network connection.

    For example: netsh interface ipv6 add dnsservers "Ethernet" 2001:4860:4860:0:0:0:0:8844 index=2


    Third-party DNS servers Alternate IPv4 DNS server address Alternate IPv6 DNS server address
    Google Public DNS 8.8.4.4 2001:4860:4860:0:0:0:0:8844
    OpenDNS 208.67.220.220 2620:0:ccd::2
    1.1.1.1 by Cloudflare 1.0.0.1 2606:4700:4700::1001
    Cloudflare (block malware only) 1.0.0.2 2606:4700:4700::1002
    Cloudflare (block malware and adult content) 1.0.0.3 2606:4700:4700::1003
    Quad9 149.112.112.112 (secure)
    OR
    149.112.112.10 (unsecure)
    CleanBrowsing (Family filter) 185.228.168.169 2a0d:2a00:2::
    CleanBrowsing (Adult filter) 185.228.168.11 2a0d:2a00:2::1

    Change IPv4 and IPv6 DNS Server Address in Windows-netsh_interface_ipv6_alternate.jpg


    6 If you like or needed, you can flush the DNS resolver cache to make sure the new DNS server is applied.

    7 You can now close the elevated command prompt if you like.






    OPTION FIVE

    To Change IPv4 and IPv6 DNS Server Address in Settings


    This option is only available starting with Windows 10 build 18252.


    1 Open Settings, and click/tap on the Network & Internet icon.

    2 Perform the action below you want to do depending on if you want to change the IPv4 and/or IPv6 DNS address for an Ethernet or Wi-Fi connection. (see screenshots below)

    (Ethernet)
    A) Click/tap on Ethernet on the left side, and click/tap on the connection (ex: "Brink-Router2") on the right side you want to edit the DNS address settings for.

    OR

    (Wi-Fi)
    B) Click/tap on Wi-Fi on the left side, and click/tap on the connection (ex: "Brink-Router2") on the right side you want to edit the DNS address for.

    Change IPv4 and IPv6 DNS Server Address in Windows-ethernet_ip_settings-1.jpg Change IPv4 and IPv6 DNS Server Address in Windows-wi-fi_ip_settings-1.jpg

    3 Click/tap on the Edit button under IP settings. (see screenshot below)

    Change IPv4 and IPv6 DNS Server Address in Windows-edit_ip_assignment.png

    4 Do step 5 (Obtain DNS automatically) or step 6 (Change DNS) below for what you want to do.


     5. To Obtain IPv4 and IPv6 DNS Server Address Automatically from ISP

    This is the default setting.

    A) Select Automatic (DHCP) in the Edit IP settings drop menu, click/tap on Save, and go to step 7 below. (see screenshot below)

    Change IPv4 and IPv6 DNS Server Address in Windows-network_ip_settings-1.jpg


     6. To Use Custom or Third-party IPv4 and/or IPv6 DNS Server Address

    A) Select Manual in the Edit IP settings drop menu. (see screenshots below)

    B) Turn on IPv4, and enter the Preferred DNS and Alternate DNS addresses you want to use.

    If you turn off IPv4, its DNS address will be obtained automatically instead of using a custom DNS.


    Third-party DNS servers Preferred IPv4 DNS server address Alternate IPv4 DNS server address
    Google Public DNS 8.8.8.8 8.8.4.4
    OpenDNS 208.67.222.222 208.67.220.220
    1.1.1.1 by Cloudflare 1.1.1.1 1.0.0.1
    Cloudflare (block malware only) 1.1.1.2 1.0.0.2
    Cloudflare (block malware and adult content) 1.1.1.3 1.0.0.3
    Quad9 9.9.9.9 149.112.112.112 (secure)
    OR
    149.112.112.10 (unsecure)
    CleanBrowsing (Family filter) 185.228.168.168 185.228.168.169
    CleanBrowsing (Adult filter) 185.228.168.10 185.228.168.11

    C) Turn on IPv6, and enter the Preferred DNS and Alternate DNS addresses you want to use.

    If you turn off IPv6, its DNS address will be obtained automatically instead of using a custom DNS.


    Third-party DNS servers Preferred IPv6 DNS server Alternate IPv6 DNS server address
    Google Public DNS 2001:4860:4860:0:0:0:0:8888 2001:4860:4860:0:0:0:0:8844
    OpenDNS 2620:0:ccc::2 2620:0:ccd::2
    1.1.1.1 by Cloudflare 2606:4700:4700::1111 2606:4700:4700::1001
    Cloudflare (block malware only) 2606:4700:4700::1112 2606:4700:4700::1002
    Cloudflare (block malware and adult content) 2606:4700:4700::1113 2606:4700:4700::1003
    Quad9 2620:fe::fe (secure)
    OR
    2620:fe::10 (unsecure)
    CleanBrowsing (Family filter) 2a0d:2a00:1:: 2a0d:2a00:2::
    CleanBrowsing (Adult filter) 2a0d:2a00:1::1 2a0d:2a00:2::1

    D) When finished, click/tap on Save, and go to step 7 below.

    Change IPv4 and IPv6 DNS Server Address in Windows-network_ip_settings-2.jpg Change IPv4 and IPv6 DNS Server Address in Windows-network_ip_settings-3.jpg

    7 You can now close Settings if you like.


    That's it,
    Shawn



  1. TairikuOkami's Avatar
    Posts : 4,160
    Home 2004 x64 10.0.19041.331
       #1

    To change DNS on DHCP enabled network (without the need to enter the name):
    Code:
    wmic nicconfig where DHCPEnabled=TRUE call SetDNSServerSearchOrder ("208.67.222.222","208.67.220.220")

    To change DNS based on MAC address:
    Code:
    wmic nicconfig where macaddress="D0:25:C2:D0:30:DC" call SetDNSServerSearchOrder ("208.67.222.222","208.67.220.220")
      My Computer

  2. Brink's Avatar
    Posts : 49,694
    64-bit Windows 10 Pro for Workstations build 20161
    Thread Starter
       #2

    Tutorial updated for IPv6, and added more free DNS servers. :)
      My Computers

  3. lx07's Avatar
    Posts : 5,478
    2004
       #3

    TairikuOkami said:
    To change DNS on DHCP enabled network (without the need to enter the name):
    Code:
    wmic nicconfig where DHCPEnabled=TRUE call SetDNSServerSearchOrder ("208.67.222.222","208.67.220.220")
    That is pretty neat - it is nice to be able to run a command without having to find interface name manually - but SetDNSServerSearchOrder doesn't seem to work for IPv6 - I get error 70 invalid IP address.

    In Powershell you do both IPv4 and IPv6 at once for all valid adapters.
    Code:
    Get-NetAdapter | `
      Where-Object {$_.InterfaceIndex -in $(Get-DnsClientServerAddress).InterfaceIndex} | `
      Set-DnsClientServerAddress -Addresses ('1.1.1.1','1.0.0.1','2606:4700:4700::1111','2606:4700:4700::1001')
    Set-DnsClientServerAddress is worse than SetDNSServerSearchOrder in that it fails if it finds an invalid network adapter (such as a network bridge) - that is why you need the Where-Object bit. Conversely SetDNSServerSearchOrder just carries on and reports its failed attempts.

    Pros and cons I suppose but in section 3 of the tutorial steps 5 and 6 could be combined - no need to do them separately if you don't want to.
      My Computer

  4. Brink's Avatar
    Posts : 49,694
    64-bit Windows 10 Pro for Workstations build 20161
    Thread Starter
       #4

    Thank you for the addition. :)
      My Computers

  5. TairikuOkami's Avatar
    Posts : 4,160
    Home 2004 x64 10.0.19041.331
       #5

    Brink said:
    added more free DNS servers. :)
    How about making a tutorial for Family friendly DNS?

    Sorted by effectiveness: CleanBrowsing / UltraDNS / NortonDNS / OpenDNS

    There also those 2, but they are questionable, though Adguard has a nice landing page.

    Yandex (servers mostly for Russia ) / Adguard (blocks ADs and thus break some webpages)
      My Computer

  6. Brink's Avatar
    Posts : 49,694
    64-bit Windows 10 Pro for Workstations build 20161
    Thread Starter
       #6

    Thank you for the additional DNS servers. :)
      My Computers


  7. Brink's Avatar
    Posts : 49,694
    64-bit Windows 10 Pro for Workstations build 20161
    Thread Starter
       #7

    Tutorial updated to add Option 5 to change DNS address in Settings.
      My Computers

  8. Brink's Avatar
    Posts : 49,694
    64-bit Windows 10 Pro for Workstations build 20161
    Thread Starter
       #8
      My Computers


  9. Posts : 88
    Windows 10 Pro x64
       #9

    Zemana AntiMalware detects Cloudflare (block malware only) ​as Hijack DNS.
      My Computer


 

Tutorial Categories

Change IPv4 and IPv6 DNS Server Address in Windows Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


Related Threads
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:03.
Find Us




Windows 10 Forums