# Check SPF and DMARC records for many domains

**Use case:** 

Check SPF and DMARC email security for a list of domains in one run: whether each domain has an SPF record, a DMARC record, which DMARC policy it uses (none, quarantine, reject) and its MX records. Rows get warnings such as no_spf, no_dmarc or dmarc_policy_none. Paste up to 5,000 domains.

## Input

```json
{
  "domains": [
    "google.com",
    "github.com",
    "stripe.com",
    "shopify.com",
    "heise.de",
    "python.net"
  ],
  "checkRdap": false,
  "checkSsl": false,
  "checkDns": true,
  "checkEmailSecurity": true,
  "dnsRecordTypes": [
    "MX"
  ],
  "expiryWarningDays": 30,
  "maxConcurrency": 5,
  "timeoutSecs": 15
}
```

## Output

```json
{
  "domain": {
    "label": "domain",
    "format": "string"
  },
  "status": {
    "label": "status",
    "format": "string"
  },
  "warnings": {
    "label": "warnings",
    "format": "array"
  },
  "expirationDate": {
    "label": "expirationDate",
    "format": "string"
  },
  "daysUntilDomainExpiry": {
    "label": "daysUntilDomainExpiry",
    "format": "integer"
  },
  "sslNotAfter": {
    "label": "sslNotAfter",
    "format": "string"
  },
  "daysUntilSslExpiry": {
    "label": "daysUntilSslExpiry",
    "format": "integer"
  },
  "sslValid": {
    "label": "sslValid",
    "format": "boolean"
  },
  "registrar": {
    "label": "registrar",
    "format": "string"
  },
  "hasSpf": {
    "label": "hasSpf",
    "format": "boolean"
  },
  "hasDmarc": {
    "label": "hasDmarc",
    "format": "boolean"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Bulk Domain Expiry, SSL & DNS Checker Actor is ready to run with the inputs already set for "Check SPF and DMARC records for many domains". [Sign up or log in](https://console.apify.com/create-task-from-example/bj8XCBoo9E80ecjtO) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Check SPF and DMARC records for many domains" task

The Bulk Domain Expiry, SSL & DNS Checker Actor will start running based on the input automatically. You can also change all the input fields, like domains, check registration (rdap), and more, to match your specific use case.

### 3. Receive the "Check SPF and DMARC records for many domains" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as domain, status, warnings, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Check SPF and DMARC records for many domains" task via API](https://apify.com/echolab/domain-health-monitor.md).

## FAQ

### What does the bulk SPF and DMARC check return?

The bulk SPF and DMARC check returns one row per domain: hasSpf and the SPF record, hasDmarc, the DMARC record and policy, MX records, and warnings like no_spf, no_dmarc or dmarc_policy_none.

### Does it validate the full SPF include chain?

No. It detects the SPF and DMARC records and reads the DMARC policy. It does not expand SPF includes, count DNS lookups or test real mail delivery.

### Where is DMARC looked up?

DMARC is read from the TXT record at _dmarc.<domain> and SPF from the TXT records of the domain itself, over DNS-over-HTTPS (Cloudflare, with Google as fallback).

### Are email addresses in DMARC reports exposed?

No. Mailbox addresses inside rua/ruf tags and TXT records are replaced with [redacted-email] in the output.

### How much does one run cost?

Each domain is one result at $1.50 per 1,000 domains (see the Pricing tab). This example checks 6 domains, about $0.01 per run.

## About this Actor

This example demonstrates how to use [Bulk Domain Expiry, SSL & DNS Checker](https://apify.com/echolab/domain-health-monitor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/echolab/domain-health-monitor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/echolab/domain-health-monitor.md

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`).
