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:

  1. Open PowerShell as an Administrator.

  2. Run the command:

    Get-NetAdapter | Select-Object Name, InterfaceDescription, InterfaceGuid
  3. Locate the adapter you want to configure and copy its InterfaceGuid (e.g., {12345678-ABCD-1234-ABCD-1234567890AB}).

Step 2: Open the Registry Editor

  1. Press Windows Key + R to open the Run dialog.
  2. Type regedit and press Enter.
  3. 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:

  1. Locate the NameServer string 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 it NameServer.
  2. Double-click NameServer.
  3. 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
  4. 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:

  1. Open Command Prompt as an Administrator.

  2. Restart the DNS cache and renew network settings by running:

    ipconfig /flushdns
    ipconfig /registerdns
  3. Alternatively, disable and re-enable the network adapter via the Network Connections control panel.