> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devhelm.io/llms.txt
> Use this file to discover all available pages before exploring further.

# DNS Monitors

> Monitor domain name resolution and DNS record health with DevHelm DNS monitors

DNS monitors verify that domain names resolve correctly, checking resolution time, expected records, and nameserver behavior. They catch DNS misconfigurations, propagation issues, and record tampering.

<Tip>
  **Define this in code.** [YAML format](/mac/yaml/monitors) · [Terraform](/mac/terraform/monitors)
</Tip>

## When to use DNS monitors

* **Domain resolution** — verify your domains resolve to expected IP addresses
* **Record validation** — check A, AAAA, CNAME, MX, NS, TXT, SRV, SOA, CAA, PTR records
* **Nameserver health** — test specific nameservers for correct responses
* **DNS propagation** — detect stale records after migrations
* **DMARC/SPF/DKIM** — validate email authentication TXT records

## How it works

1. DevHelm queries the configured hostname for the specified record types from each probe region
2. The response is evaluated against assertions (expected IPs, CNAMEs, record values, TTLs)
3. Resolution time is measured and checked against latency assertions

## Quick example

<CodeGroup>
  ```bash CLI theme={null}
  devhelm monitors create \
    --name "Example DNS" \
    --type DNS \
    --url example.com \
    --frequency 300 \
    --regions us-east,eu-west
  ```

  ```yaml devhelm.yml theme={null}
  monitors:
    - name: Example DNS
      type: DNS
      config:
        hostname: example.com
        recordTypes: [A, AAAA]
      frequencySeconds: 300
      regions: [us-east, eu-west]
      assertions:
        - config:
            type: dns_resolves
          severity: fail
        - config:
            type: dns_expected_ips
            ips: ["93.184.216.34"]
          severity: fail
  ```
</CodeGroup>

With the CLI, `--url` is the hostname to resolve and default record types apply. To check specific record types, use YAML config-as-code (`config.recordTypes`) or the API.

## Next steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/monitoring/dns/configuration">
    Hostname, record types, nameservers, and all DNS assertions.
  </Card>

  <Card title="Monitoring overview" icon="signal" href="/monitoring/overview">
    Compare all six monitor types.
  </Card>
</CardGroup>
