<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceManagement",
  "identifier" : "/documentation/DeviceManagement/NetworkDNSSettings",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Device Management"
    ],
    "preciseIdentifier" : "rmdm-declarations:NetworkDNSSettings"
  },
  "title" : "NetworkDNSSettings"
}
-->

# NetworkDNSSettings

The declaration to configure encrypted DNS settings.

```
object NetworkDNSSettings
```

## Discussion

Specify `com.apple.configuration.network.dns-settings` as the declaration type.

The following rules determine which networks the settings apply to:

- For supervised enrollments, the settings apply to all networks.
- For device enrollments, the settings are limited to only managed networks.
- For local installs, the settings apply to all networks.

### Configuration availability

|||
|--------------------------------|----------------------------------------------|
|Allowed in supervised enrollment|iOS, macOS, Shared iPad, visionOS             |
|Allowed in device enrollment    |iOS, Shared iPad, visionOS                    |
|Allowed in user enrollment      |N/A                                           |
|Allowed in local enrollment     |iOS, macOS, Shared iPad, visionOS             |
|Allowed in system scope         |iOS, macOS, Shared iPad, visionOS             |
|Allowed in user scope           |N/A                                           |
|Apply                           |Multiple configurations are applied separately|

### Configuration example

This configuration sets up encrypted DNS using DNS-over-HTTPS.

```json
{
    "Type": "com.apple.configuration.network.dns-settings",
    "Identifier": "EB13EE2B-5D63-4EBA-810F-5B81D07F5017",
    "ServerToken": "E180CA9A-F089-4FA3-BBDF-94CC159C4AE8",
    "Payload": {
        "VisibleName": "DNS Settings",
        "DNSSettings": {
            "DNSProtocol": "HTTPS",
            "ServerURL": "https://dns.example.com/dns-query",
            "ServerAddresses": [
                "12.12.12.12"
            ],
            "AllowFailover": false,
            "SupplementalMatchDomains": [
                "example.com"
            ]
        }
    }
}
```

## Topics

### Objects

[`NetworkDNSSettingsDNSSettingsObject`](/documentation/DeviceManagement/NetworkDNSSettingsDNSSettingsObject)

A dictionary that defines a configuration for an encrypted DNS server.

[`NetworkDNSSettingsOnDemandRulesElementObject`](/documentation/DeviceManagement/NetworkDNSSettingsOnDemandRulesElementObject)

An array of rules that define the DNS settings. If not set, the system always applies the DNS settings. These rules are identical to the `OnDemandRules` array in VPN payloads.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)