Configure Adapter DNS Server Order Using Regedit
Administrators can manually configure custom DNS server search orders
for specific network adapters in Windows using the Windows Registry
Editor (regedit). By directly modifying the registry keys
associated with a network interface’s unique identifier (GUID), you can
set a comma-separated list of DNS servers that defines the exact order
in which Windows queries them for name resolution.
Step 1: Identify the Network Adapter GUID
Before making changes in the registry, identify the GUID of the target network interface:
Open PowerShell as an Administrator.
Run the command:
Get-NetAdapter | Select-Object Name, InterfaceDescription, InterfaceGuidLocate the adapter you want to configure and copy its InterfaceGuid (e.g.,
{12345678-ABCD-1234-ABCD-1234567890AB}).
Step 2: Open the Registry Editor
- Press
Windows Key + Rto open the Run dialog. - Type
regeditand press Enter. - If prompted by User Account Control (UAC), click Yes.
Step 3: Navigate to the Adapter’s Registry Key
In the Registry Editor, navigate to the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
Expand the Interfaces key and select the subkey matching
the GUID you identified in Step 1.
Step 4: Configure the DNS Server Search Order
Inside the interface’s GUID folder, update the DNS server values:
- Locate the
NameServerstring value (for static DNS configurations). If it does not exist, right-click an empty area in the right pane, select New > String Value, and name itNameServer. - Double-click
NameServer. - In the Value data field, enter your DNS server IP
addresses separated by a comma (or a space), listed in the exact search
priority order you want.
- Example:
192.168.1.10,1.1.1.1,8.8.8.8
- Example:
- Click OK.
(Note: If the adapter relies on DHCP and you want to override the
assigned DNS, ensure NameServer is set. The system
prioritizes NameServer over
DhcpNameServer.)
Step 5: Apply the Changes
For the changes to take immediate effect without rebooting the system:
Open Command Prompt as an Administrator.
Restart the DNS cache and renew network settings by running:
ipconfig /flushdns ipconfig /registerdnsAlternatively, disable and re-enable the network adapter via the Network Connections control panel.