Configure encrypted name resolution: registry value DoHPolicy and 2 moreComputerHKLM\Software\Policies\Microsoft\Windows NT\DNSClient

Policy ID
DNS_Doh
Scope
Computer Configuration
Supported on
At least Windows Server 20H2, Windows 10 Version 20H2
Source
Administrative Templates (.admx) for Windows 11 2026 Update (26H2) (version 1.0)
Category
Network › DNS Client

Registry

DoHPolicy

REG_DWORDComputer
Enabled value
Depends on the option value
Element
Configure encryption options:
Options
ItemStored value
Require encryption3
Allow encryption2
Prohibit encryption1
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\DNSClient]

; Options (use only one)
; Require encryption
"DoHPolicy"=dword:00000003
; Allow encryption
"DoHPolicy"=dword:00000002
; Prohibit encryption
"DoHPolicy"=dword:00000001
CMD
:: Options (use only one)

:: Require encryption
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DNSClient" /v "DoHPolicy" /t REG_DWORD /d 3 /f
:: Allow encryption
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DNSClient" /v "DoHPolicy" /t REG_DWORD /d 2 /f
:: Prohibit encryption
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DNSClient" /v "DoHPolicy" /t REG_DWORD /d 1 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Force | Out-Null

# Options (use only one)
# Require encryption
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Name 'DoHPolicy' -PropertyType DWord -Value 3 -Force | Out-Null
# Allow encryption
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Name 'DoHPolicy' -PropertyType DWord -Value 2 -Force | Out-Null
# Prohibit encryption
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Name 'DoHPolicy' -PropertyType DWord -Value 1 -Force | Out-Null

DohPolicySetting

REG_DWORDComputer
Enabled value
Depends on the option value
Element
Configure DoH specific options:
Options
ItemStored value
Allow DoH0
Block DoH1
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\DNSClient]

; Options (use only one)
; Allow DoH
"DohPolicySetting"=dword:00000000
; Block DoH
"DohPolicySetting"=dword:00000001
CMD
:: Options (use only one)

:: Allow DoH
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DNSClient" /v "DohPolicySetting" /t REG_DWORD /d 0 /f
:: Block DoH
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DNSClient" /v "DohPolicySetting" /t REG_DWORD /d 1 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Force | Out-Null

# Options (use only one)
# Allow DoH
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Name 'DohPolicySetting' -PropertyType DWord -Value 0 -Force | Out-Null
# Block DoH
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Name 'DohPolicySetting' -PropertyType DWord -Value 1 -Force | Out-Null

DotPolicySetting

REG_DWORDComputer
Enabled value
Depends on the option value
Element
Configure DoT specific options:
Options
ItemStored value
Allow DoT0
Block DoT1
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows NT\DNSClient]

; Options (use only one)
; Allow DoT
"DotPolicySetting"=dword:00000000
; Block DoT
"DotPolicySetting"=dword:00000001
CMD
:: Options (use only one)

:: Allow DoT
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DNSClient" /v "DotPolicySetting" /t REG_DWORD /d 0 /f
:: Block DoT
reg add "HKLM\Software\Policies\Microsoft\Windows NT\DNSClient" /v "DotPolicySetting" /t REG_DWORD /d 1 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Force | Out-Null

# Options (use only one)
# Allow DoT
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Name 'DotPolicySetting' -PropertyType DWord -Value 0 -Force | Out-Null
# Block DoT
New-ItemProperty -Path 'HKLM:\Software\Policies\Microsoft\Windows NT\DNSClient' -Name 'DotPolicySetting' -PropertyType DWord -Value 1 -Force | Out-Null