# DNS Health Check: Records, DNSSEC, CAA & Nameservers (`centorprat/dns-health-check`) Actor

Give it domains. For each it resolves the core DNS records over keyless DoH and runs best-practice checks - does it resolve, enough diverse nameservers, DNSSEC, CAA, IPv6, SPF/DMARC present - into a health signal with findings. Read-only public DNS, agent-callable.

- **URL**: https://apify.com/centorprat/dns-health-check.md
- **Developed by:** [Centor Prat](https://apify.com/centorprat) (community)
- **Categories:** Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.75 / 1,000 domain checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## DNS Health Check: Records, DNSSEC, CAA & Nameservers

**A fast best-practice audit of a domain's DNS.** Give it domains; for each it resolves the core records
over keyless DNS-over-HTTPS and checks the things that matter — does it resolve, does it have enough
**redundant nameservers**, **DNSSEC**, a **CAA** record, **IPv6**, and SPF/DMARC — into a health signal
with specific findings. Keyless, agent-callable, built to answer *"is this domain's DNS set up right?"*

> 🔎 **Read-only public DNS.** It queries DNS over DoH — it never contacts the domain's own servers.
> Findings are recommendations, not a verdict.

### ⚡ Why it's useful

DNS misconfigurations cause outages and security gaps quietly: a single nameserver provider, no DNSSEC,
no CAA (so any CA can issue certs for you), email set up without SPF/DMARC. This surfaces them all in one
call with a clear pass/warn per check.

### 📋 What each report contains

| Field | Meaning |
|---|---|
| `signal` | `healthy` / `ok-with-recommendations` / `needs-attention` |
| `score` | Checks passed out of total |
| `records` | Resolved A/AAAA, MX, NS, CAA, and DNSSEC / SPF / DMARC presence |
| `checks` | Each best-practice check with `pass` / `warn` / `fail` and detail |
| `findings` | The specific warnings and failures to act on |

Checks: resolves, IPv6, nameserver count, nameserver provider diversity, DNSSEC, CAA, SOA, and (if email
is configured) SPF and DMARC presence.

### 📥 Input

```json
{ "domains": ["example.com", "your-brand.org"] }
```

Set `onlyProblems: true` for scheduled alerting. One report per domain.

### 📤 Example output (real run, trimmed)

```json
{ "domain": "github.com", "signal": "ok-with-recommendations", "score": "6/8",
  "records": { "dnssec": false, "caa": ["0 issue \"digicert.com\""], "spf": true, "dmarc": true },
  "findings": ["No IPv6 (AAAA) record.", "DNSSEC not enabled."] }
```

In the same run `apify.com` scored `8/8` (`healthy`), and `example.com` was flagged for a single
nameserver provider and a missing CAA record.

### 💰 Pricing (pay-per-event)

- **Domain checked — $0.015** per domain.

### 💡 Use cases

- **IT / ops / DevOps:** a quick DNS hygiene audit across every domain you run.
- **Agencies / MSPs:** check a whole client portfolio's DNS best practices from one place.
- **Security / due diligence:** catch missing DNSSEC/CAA and single-provider nameserver risk.
- **Agents:** callable as an MCP tool — give it domains, get back a DNS health report.

### 🔑 Keyless & agent-callable

No API keys, no accounts, no paid child Actors — just public DNS over DoH.

### 🚀 Ready-made tasks (one click)

- [DNS Health Checker - Records, Nameservers & Score](https://apify.com/centorprat/dns-health-check/examples/dns-health-checker)

### 🤖 For AI agents (MCP)

```
https://mcp.apify.com/?tools=actors,docs,centorprat/dns-health-check
```

Loads as `centorprat--dns-health-check`. Claude Code:

```
claude mcp add apify -- npx -y @apify/actors-mcp-server --actors centorprat/dns-health-check
```

# Actor input Schema

## `domains` (type: `array`):

Domains to check, e.g. \["example.com", "your-brand.org"]. One health report per domain.

## `onlyProblems` (type: `boolean`):

On: return only domains that aren't fully healthy (ideal for scheduled alerting).

## `webhookUrl` (type: `string`):

If set, domains needing attention are POSTed here as JSON.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com"
  ],
  "onlyProblems": false
}
```

# Actor output Schema

## `domains` (type: `string`):

One report per domain: a signal (healthy / ok-with-recommendations / needs-attention), a score, the resolved records (A/AAAA, MX, NS, CAA, DNSSEC, SPF/DMARC presence), the per-check results, and findings. Read-only public DNS.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "apify.com",
        "github.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("centorprat/dns-health-check").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "domains": [
        "apify.com",
        "github.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("centorprat/dns-health-check").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "apify.com",
    "github.com"
  ]
}' |
apify call centorprat/dns-health-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,centorprat/dns-health-check"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/oAvWqw5eZg97Qb4ai/builds/fUJqotsJs28aIf6IF/openapi.json
