DNS concepts
DNS records
Supported record types, validated fields, and safe intent examples.
Pass between 1 and 100 records in intent.records. The SDK validates every
record locally before sending it to Domain0.
const { connection } = await platform.createConnection({
intent: {
domain: 'customer.example',
records: [
{ host: '@', type: 'A', value: '192.0.2.10', ttl: 300 },
{ host: 'www', type: 'CNAME', value: 'edge.example.net', ttl: 300 },
],
},
})Supported types
| Type | Value | Notes |
|---|---|---|
A | IPv4 address | Example: 192.0.2.10 |
AAAA | IPv6 address | Example: 2001:db8::10 |
CNAME | Domain name | Do not combine with other data at the same name |
CAA | Flags, tag, and value | Example: 0 issue "letsencrypt.org" |
MX | Mail-server domain | Requires priority |
TXT | Text value | Must not contain NUL characters or newlines |
NS | Nameserver domain | Use only when your product intentionally delegates DNS |
Fields
| Field | Required | Behavior |
|---|---|---|
host | Yes | @ or a relative DNS name; a leading wildcard is supported |
type | Yes | One of the supported record types above |
value | Yes | Validated according to type |
ttl | No | Integer in seconds; defaults to 300 |
priority | MX only | Integer from 0 to 65535 |
optional | No | Defaults to false; optional failures do not block required records |
Records come from trusted product data
Build the intent from your product configuration or database. Do not accept arbitrary records from an untrusted browser request.
Common examples
[
{ host: '@', type: 'A', value: '192.0.2.10', ttl: 300 },
{ host: 'www', type: 'CNAME', value: 'edge.example.net', ttl: 300 },
]Existing-record validation
Use the optional policy only when an existing valid DMARC or CAA record can satisfy your product requirement:
await platform.createConnection({
intent: {
domain: 'customer.example',
existingRecordPolicy: {
validateDmarc: true,
validateCAA: true,
},
records,
},
})Both switches default to false. Domain0 shows and verifies the resolved
effective intent, which may contain fewer records than the original request.