Ouvrir dans l'explorateur

Allow cookies on specific sites

Cette stratégie n'a pas de traduction française dans les modèles de l'éditeur ; le texte original est en anglais.

Type
Ordinateur et utilisateur
Chemin GPO
Configuration ordinateur › Stratégies › Modèles d'administration › Microsoft Edge › Paramètres de contenu Configuration utilisateur › Stratégies › Modèles d'administration › Microsoft Edge › Paramètres de contenu EN : Computer Configuration › Policies › Administrative Templates › Microsoft Edge › Content settingsEN : User Configuration › Policies › Administrative Templates › Microsoft Edge › Content settings
Pris en charge sur
Microsoft Edge version 77, Windows 7 or later
Fichier ADMX
msedge.admx
Nom interne
msedge/CookiesAllowedForUrls

Explication

Define a list of sites, based on URL patterns, that are allowed to set cookies. URL patterns can be a single URL indicating that the site can use cookies on all top-level sites. Patterns can also be two URLs delimited by a comma. The first specifies the site that should be allowed to use cookies. The second specifies the top-level site that the first value should be applied on. If you use a pair of URLs, the first value in the pair supports *, but the second value doesn't. Using * for the first value indicates that all sites can use cookies when the second URL is the top-level site.

If you don't configure this policy, the global default value from the 'DefaultCookiesSetting' (Configure cookies) policy (if set) or the user's personal configuration is used for all sites.

For more information, see the 'CookiesBlockedForUrls' (Block cookies on specific sites) and 'CookiesSessionOnlyForUrls' (Limit cookies from specific websites to the current session) policies.

Note there can't be conflicting URL patterns set between these three policies:

- 'CookiesBlockedForUrls'

- CookiesAllowedForUrls

- 'CookiesSessionOnlyForUrls'

For detailed information about valid URL patterns, see https://go.microsoft.com/fwlink/?linkid=2095322. * isn't an accepted value for this policy.

To allow third-party cookies to be set, specify a pair of URL patterns delimited by a comma. The first value in the pair specifies the third-party site that should be allowed to use cookies. The second value in the pair specifies the top-level site that the first value should be applied on. The first value in the pair supports * but the second value doesn't.

To exclude cookies from being deleted on exit, configure the 'SaveCookiesOnExit' (Save cookies when Microsoft Edge closes) policy.

Example value:

https://www.contoso.com
[*.]contoso.edu
https://loaded-as-third-party.fabrikam.com,https://www.contoso.com
*,https://www.contoso.com

Registre

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge
HKEY_CURRENT_USER\Software\Policies\Microsoft\Edge
Nom de la valeur
non défini dans l'ADMX

Valeurs d'activation / désactivation : non défini dans l'ADMX (voir les options ci-dessous).

PowerShell

Commandes PowerShell qui écrivent dans le registre ce que la stratégie écrirait. Les valeurs entre chevrons (<…>) sont à remplacer.

Écrire directement dans le registre contourne la stratégie de groupe : si une GPO gère cette valeur, elle sera réécrite au prochain gpupdate ; sinon la valeur reste en place (effet « tatouage »). Préférez une GPO ou, en local, LGPO.exe. Exécutez PowerShell en administrateur pour HKLM. Certaines stratégies demandent un redémarrage ou gpupdate /force.

Ordinateur (HKLM)

Activer

# Activer : msedge/CookiesAllowedForUrls
$k = 'HKLM:\Software\Policies\Microsoft\Edge\CookiesAllowedForUrls'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Allow cookies on specific sites
# Liste non additive : les valeurs existantes de la clé sont d'abord effacées
if (Test-Path -Path $k) { (Get-Item -Path $k).Property | ForEach-Object { Remove-ItemProperty -Path $k -Name ([WildcardPattern]::Escape($_)) -ErrorAction SilentlyContinue } }
$values = @('<valeur1>', '<valeur2>')  # Remplacez les valeurs par les vôtres
$i = 1
foreach ($v in $values) { Set-ItemProperty -Path $k -Name ('' + $i) -Value $v -Type String; $i++ }

Désactiver

# Désactiver : msedge/CookiesAllowedForUrls
# Aucune valeur n'est écrite à l'état « Désactivé » (rien de défini dans l'ADMX)

Revenir à « Non configuré »

# Revenir à « Non configuré » : msedge/CookiesAllowedForUrls
$k = 'HKLM:\Software\Policies\Microsoft\Edge\CookiesAllowedForUrls'
Remove-Item -Path $k -Recurse -Force -ErrorAction SilentlyContinue

Utilisateur (HKCU)

Activer

Désactiver

Revenir à « Non configuré »

Options (1)

LibelléContrôleValeur de registreType REGContraintes / détails
Allow cookies on specific sitesCookiesAllowedForUrlsDescListe (tableau)listSoftware\Policies\Microsoft\Edge\CookiesAllowedForUrlsValeurs nommées « » + n°REG_SZ (valeurs sous la clé)

Application

Microsoft Edge (+ Edge Update, WebView2) (Microsoft) — modèles de novembre 2026

Modèles officiels téléchargés le 12 novembre 2026.