How to Set IPv4 and IPv6 DNS in Windows 11
Configuring custom DNS servers for both IPv4 and IPv6 simultaneously in Windows 11 enhances internet speed, security, and resolution across modern dual-stack networks. This guide walks you through the steps to assign custom Domain Name System addresses for both protocols using the modern Windows 11 Settings app, the classic Control Panel, and PowerShell.
Method 1: Using Windows 11 Settings (Recommended)
The modern Settings interface in Windows 11 allows you to configure both IPv4 and IPv6 DNS addresses in a single configuration panel.
- Open Settings by pressing
Win + I. - Navigate to Network & internet on the left menu.
- Click on your active connection type: Ethernet or Wi-Fi.
- If using Wi-Fi, click Manage known networks and select your active network.
- Locate the DNS server assignment section and click the Edit button.
- In the drop-down menu, change the setting from Automatic (DHCP) to Manual.
- Toggle the IPv4 switch to On:
- Preferred DNS: Enter your primary IPv4 address
(e.g.,
1.1.1.1or8.8.8.8). - Alternate DNS: Enter your secondary IPv4 address
(e.g.,
1.0.0.1or8.8.4.4). - (Optional) Set DNS encryption to Encrypted only (DNS over HTTPS) or Encrypted preferred.
- Preferred DNS: Enter your primary IPv4 address
(e.g.,
- Toggle the IPv6 switch to On:
- Preferred DNS: Enter your primary IPv6 address
(e.g.,
2606:4700:4700::1111or2001:4860:4860::8888). - Alternate DNS: Enter your secondary IPv6 address
(e.g.,
2606:4700:4700::1001or2001:4860:4860::8844). - (Optional) Configure DNS encryption for IPv6 if supported.
- Preferred DNS: Enter your primary IPv6 address
(e.g.,
- Click Save to apply both sets of DNS configurations at once.
Method 2: Using the Network Connections Control Panel
- Press
Win + R, typencpa.cpl, and press Enter. - Right-click your active network adapter (Wi-Fi or Ethernet) and select Properties.
- Configure IPv4:
- Select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
- Select Use the following DNS server addresses.
- Enter your Preferred DNS server and Alternate DNS server values.
- Click OK.
- Configure IPv6:
- Select Internet Protocol Version 6 (TCP/IPv6) and click Properties.
- Select Use the following DNS server addresses.
- Enter your Preferred DNS server and Alternate DNS server IPv6 addresses.
- Click OK.
- Click OK or Close in the main network properties window to apply the changes.
Method 3: Using PowerShell
To set both IPv4 and IPv6 DNS addresses simultaneously across an interface using a single terminal command:
Right-click the Start button and select Terminal (Admin) or PowerShell (Admin).
Identify your network adapter name by running:
Get-NetAdapterRun the following command, replacing
"Ethernet"with your actual adapter name and adding your desired IPv4 and IPv6 addresses separated by commas:Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001")
Verifying the Configuration
To verify that both IPv4 and IPv6 DNS servers are active:
Open Terminal or Command Prompt.
Run the command:
ipconfig /allLocate your active adapter and confirm that both the IPv4 and IPv6 addresses appear under the DNS Servers entry.