# Domain Health + Email Deliverability Checker \[USD 1.5/1K] (`usefulapi/domain-health-checker`) Actor

Check SPF (with the 10-lookup count), DMARC, DKIM, MX and mail provider, MTA-STS, TLS-RPT, BIMI, CAA, DNSSEC, the SSL certificate, http to https redirect, HSTS and security headers for any domain in bulk. One row per domain with a score, plain-language issues and a fix-first item. No WHOIS.

- **URL**: https://apify.com/usefulapi/domain-health-checker.md
- **Developed by:** [Useful API](https://apify.com/usefulapi) (community)
- **Categories:** Developer tools, SEO tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 domain auditeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Domain Health + Email Deliverability Checker

Check the **email deliverability and domain health** of any domain, in bulk. One row per domain with a **score, a grade, a plain-language list of issues and a "fix first" item**: SPF with the DNS lookup count against the limit of 10, DMARC, DKIM, MX and the mail provider, MTA-STS, TLS-RPT, BIMI, CAA, DNSSEC, the SSL certificate, the http to https redirect, HSTS and the common security headers.

No WHOIS and no registration data: this Actor is about whether mail from a domain is trusted and delivered, and whether the domain is set up safely.

### What you get for each domain

- **SPF**: the record, the `all` qualifier (`-all`, `~all`, `?all`, `+all`), **how many DNS lookups it needs with every include followed** against the limit of 10, the void lookups against the limit of 2, a breakdown of the heaviest includes (so you know what to flatten), use of the discouraged `ptr` mechanism, more than one SPF record, includes that point at nothing.
- **DMARC**: policy, subdomain policy, percentage, alignment modes, whether aggregate and failure reports are requested, and whether reports sent to another domain are authorised there. Mailboxes are shown as domains only.
- **DKIM**: keys found under **43 common selectors** (the list is below) plus your own, with the key type, the real key length read from the key (RSA 1024 vs 2048), revoked keys and test mode. When the mail host is Google Workspace, Microsoft 365, Zoho, Proton or Fastmail and its default selector has no key, the row says signing is probably not turned on.
- **MX**: the hosts, whether each resolves, whether any is a CNAME (not allowed), a null MX, and the **mail provider** guessed from the MX hosts (Google Workspace, Microsoft 365, Zoho, Proton, Fastmail, Mimecast, Proofpoint, Cloudflare Email Routing and more).
- **MTA-STS** (the TXT record and the policy file: mode, MX coverage), **TLS-RPT**, **BIMI** (logo and certificate present, and whether DMARC is strict enough for it).
- **DNS**: A, AAAA, NS (and the DNS provider), CAA, SOA, the kinds of TXT records, **DNSSEC** (DS record and whether a validating resolver accepts it).
- **SSL certificate** on the host: issuer, valid to, days left, whether it covers the host name, whether the chain is trusted.
- **Web basics**: does `http://` redirect to `https://` (and with a permanent redirect), HSTS with its max-age, and the six common security headers.
- **Score and issues**: every issue has a severity (critical, high, medium, low, info), a message in plain words and a fix. The score is 100 minus 25 per critical, 12 per high, 6 per medium and 2 per low issue (floor 0); the grade is A from 90, B from 80, C from 70, D from 60, else F. `fixFirst` is the most severe issue with its fix.

Example issue from a real run: *"SPF needs 12 DNS lookups, the limit is 10: receivers may stop checking and SPF fails. The largest part is include:... (4 lookups)."*

### How it differs from a DNS lookup tool

DNS lookup Actors return the records. This one reads them for you: it counts the SPF lookups through nested includes, checks that the DKIM key is strong enough, that DMARC reports can arrive, that the MX hosts exist, that MTA-STS covers your MX, and says what to fix first. It does not return the full TXT list (verification tokens are named, not copied).

### Polite and honest

- DNS questions go to public resolvers (Cloudflare, Google, Quad9, rotating) and, for the DNSSEC answer and as a fallback, to Cloudflare's DNS over HTTPS.
- The website part is optional (`checkWebsite`). It reads `robots.txt` first and requests the homepage only when it is allowed (once on http, once on https, 32 KB each); the group name is `domain-health-checker`. Sites that disallow it are reported as skipped. The certificate check is a plain TLS handshake, not a page request.
- Private, loopback and cloud-metadata addresses are never contacted, whether typed in or reached through a redirect.
- DKIM keys live under names a domain chooses and cannot be listed, so a domain that signs with an unusual selector shows no key unless you add it under `extraDkimSelectors`. The row says so instead of claiming there is none.

### DKIM selectors tried

google, selector1, selector2, default, dkim, mail, email, k1, k2, k3, s1, s2, smtp, mandrill, mxvault, zoho, zmail, sig1, protonmail, protonmail2, protonmail3, fm1, fm2, fm3, everlytickey1, everlytickey2, mailjet, cm, dk, sendgrid, smtpapi, hs1, hs2, krs, brevo1, brevo2, resend, mte1, mte2, pic, kl, kl2, mailo.

### Input

| Field | What it does |
|---|---|
| `domains` | Domains, one per line (a URL or `www.` name also works: email checks run on the registered domain, the certificate and web checks on the host you give). If the host has no address but `www.` has, `www.` is used and the row says `webHost`. |
| `checkDkim` | On by default. Probe the 43 selectors. |
| `extraDkimSelectors` | Your own selector names (up to 20). |
| `checkWebsite` | On by default. http to https, HSTS and security headers. |
| `sslExpiryWarningDays` | Certificates with this many days left or fewer are flagged (default 30). |
| `maxDomains` | Stop after this many domains. |

Example:

```json
{
  "domains": ["github.com", "nailsandnumbers.com", "stripe.com"],
  "checkDkim": true,
  "checkWebsite": true
}
```

### Output

One row per domain. Main fields:

- `status`: `ok`, `dns_not_found` (the domain does not exist), `dns_error` or `invalid_input`, with `error` explaining it.
- `score`, `grade`, `fixFirst`, `issueCounts`, `issues` (each with `severity`, `area`, `message`, `fix`).
- `mail`: `acceptsMail`, `provider`, `spf`, `dmarc`, `dkim`, `mtaSts`, `tlsRpt`, `bimi`.
- `dns`: `a`, `aaaa`, `hasIpv6`, `mx`, `ns`, `nsProvider`, `caa`, `soa`, `txt` (kinds), `dnssec`.
- `ssl`: `issuer`, `validTo`, `daysLeft`, `coversHost`, `trustedChain`, `protocol`.
- `web`: `http` (redirect), `https`, `hsts`, `securityHeaders`, or `skipped` with the reason.
- `billedAs`: the event this row was billed.

### Price

Pay per event, no subscription. See the Pricing tab for the current prices: a small run start fee, a price per audited domain, and a much smaller price for a domain that does not exist or whose DNS did not answer. You can set a maximum cost per run; the Actor stops cleanly before passing it and keeps every row it already wrote.

### Good to know

- Results are a snapshot from public DNS and one request per site; DNS caches can lag a change by the record's TTL.
- A domain that publishes no MX is shown as not accepting mail; advice for such domains is to publish `v=spf1 -all` and a DMARC reject policy.
- Large lists are fine: each domain takes about 0.8 seconds of run time when many are checked together.

# Actor input Schema

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

One per line: example.com. A full URL or www.example.com also works (the domain is taken from it). Email checks run on the registered domain; the certificate and web checks run on the host name you give. Duplicates are dropped.

## `checkDkim` (type: `boolean`):

Looks for DKIM keys under 43 common selector names (google, selector1, selector2, k1, s1, default, zoho, fm1 and more; the list is in the README) and checks key strength. DKIM keys cannot be listed, so a domain that signs with an unusual selector shows no key unless you add it below.

## `extraDkimSelectors` (type: `array`):

Selector names to try as well, for example the one your mail platform gave you (at most 20).

## `checkWebsite` (type: `boolean`):

Requests the homepage once on http and once on https (32 KB each) to check the redirect, HSTS and the common security headers. Only done when robots.txt allows it. Switch off for DNS, email and certificate checks only.

## `sslExpiryWarningDays` (type: `integer`):

A certificate with this many days or fewer left is reported as expiring soon.

## `maxDomains` (type: `integer`):

Stop after this many domains. Leave empty for all.

## Actor input object example

```json
{
  "domains": [
    "github.com",
    "nailsandnumbers.com",
    "stripe.com"
  ],
  "checkDkim": true,
  "checkWebsite": true,
  "sslExpiryWarningDays": 30
}
```

# Actor output Schema

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

No description

## `email` (type: `string`):

No description

## `issues` (type: `string`):

No description

## `summary` (type: `string`):

No description

# 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": [
        "github.com",
        "nailsandnumbers.com",
        "stripe.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("usefulapi/domain-health-checker").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": [
        "github.com",
        "nailsandnumbers.com",
        "stripe.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("usefulapi/domain-health-checker").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": [
    "github.com",
    "nailsandnumbers.com",
    "stripe.com"
  ]
}' |
apify call usefulapi/domain-health-checker --silent --output-dataset

```

## MCP server setup

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

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/DNUI7Klh11vYtBhXq/builds/MeFAo9bx4dvpTHrnU/openapi.json
