Open in the explorer

Configure cookies

Type
Computer and user
GPO path
Computer Configuration › Policies › Administrative Templates › Microsoft Edge › Content settings User Configuration › Policies › Administrative Templates › Microsoft Edge › Content settings
Supported on
Microsoft Edge version 77, Windows 7 or later
ADMX file
msedge.admx
Internal name
msedge/DefaultCookiesSetting

Explanation

Control whether websites can create cookies on the user's device. This policy is all or nothing - you can let all websites create cookies, or no websites create cookies. You can't use this policy to enable cookies from specific websites.

Set the policy to 'SessionOnly' to clear cookies when the session closes.

If you don't configure this policy, the default 'AllowCookies' is used, and users can change this setting in Microsoft Edge Settings. (If you don't want users to be able to change this setting, set the policy.)

Policy options mapping:

* AllowCookies (1) = Let all sites create cookies

* BlockCookies (2) = Don't let any site create cookies

* SessionOnly (4) = Keep cookies for the duration of the session, except ones listed in 'SaveCookiesOnExit' (Save cookies when Microsoft Edge closes)

Use the preceding information when configuring this policy.

Registry

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge
HKEY_CURRENT_USER\Software\Policies\Microsoft\Edge
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Computer (HKLM)

Enable

# Enable: msedge/DefaultCookiesSetting
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Configure cookies
# Possible options:
#   Let all sites create cookies = 1
#   Don't let any site create cookies = 2
#   Keep cookies for the duration of the session, except ones listed in "SaveCookiesOnExit" = 4
Set-ItemProperty -Path $k -Name 'DefaultCookiesSetting' -Value 1 -Type DWord

Disable

# Disable: msedge/DefaultCookiesSetting
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": msedge/DefaultCookiesSetting
$k = 'HKLM:\Software\Policies\Microsoft\Edge'
Remove-ItemProperty -Path $k -Name 'DefaultCookiesSetting' -ErrorAction SilentlyContinue

User (HKCU)

Enable

Disable

Revert to "Not configured"

Options (1)

LabelControlRegistry valueREG typeConstraints / details
Configure cookiesDefaultCookiesSettingDrop-down listenumDefaultCookiesSettingREG_DWORD
LabelValue
Let all sites create cookiesREG_DWORD = 1
Don't let any site create cookiesREG_DWORD = 2
Keep cookies for the duration of the session, except ones listed in "SaveCookiesOnExit"REG_DWORD = 4

Application

Microsoft Edge (+ Edge Update, WebView2) (Microsoft) — November 2026 templates

Official templates downloaded on November 12, 2026.