# Domain Health Checker: SSL Expiry, SPF, DMARC, Security Headers (`mauve_bunch/domain-health-checker`) Actor

Audit domains in bulk: SSL certificate expiry, DNS, SPF/DMARC/DKIM, HTTPS redirects, security headers, robots.txt, sitemap, llms.txt and AI-crawler rules. One scored A-F report per domain with prioritized issues. Ideal for agencies, IT teams and monitoring.

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

## Pricing

from $2.30 / 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.
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

## Domain Health Checker: SSL Expiry, SPF/DMARC, Security Headers, robots.txt & llms.txt

**Audit any list of domains and get one scored report per domain.** The Actor checks SSL/TLS certificate expiry, DNS, email authentication (SPF, DMARC, DKIM, MTA-STS), HTTPS redirects, security headers (HSTS, CSP, clickjacking, nosniff), robots.txt, sitemaps, `llms.txt`, `security.txt` and which **AI crawlers** (GPTBot, ClaudeBot, PerplexityBot, Google-Extended and more) the site blocks. You get a 0-100 score, an A-F grade and a prioritized list of issues with plain-language explanations.

It is built for agencies, MSPs, IT and security teams, SEO teams and founders who need to watch many domains cheaply: certificate expiry alerts, email deliverability hygiene before a campaign, quick due diligence on a vendor or acquisition target, or a client audit report.

Everything is passive and lightweight: public DNS records plus one request each for the homepage and a few standard public files on the domains **you** provide. No browser, no port scanning, no login, no proxies.

### What it checks

| Area | Checks |
|---|---|
| **DNS** | Resolves, A/AAAA, NS count, MX, CAA, IPv6 |
| **SSL/TLS** | Days until expiry, issuer, trusted chain, hostname match, protocol version (flags TLS 1.0/1.1), key type |
| **Email authentication** | SPF present, multiple SPF records, `+all`/`?all`, DNS-lookup count; DMARC present, policy (`none`/`quarantine`/`reject`), `rua`, `pct`; MTA-STS; common DKIM selectors (google, selector1/2, k1/k2, s1/s2, default, ...) plus your own |
| **HTTPS and headers** | HTTPS reachable, response time, redirect chain, HTTP to HTTPS redirect, HSTS (max-age, includeSubDomains, preload), CSP, X-Frame-Options / frame-ancestors, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, `Server` / `X-Powered-By` disclosure |
| **Crawlers and AI readiness** | robots.txt, declared sitemaps, `/sitemap.xml`, `/llms.txt`, `/.well-known/security.txt`, blocks-all-crawlers detection, per-bot status for 14 AI crawlers |

#### Scoring

Each issue has a severity: **critical** (-30), **high** (-15), **medium** (-7), **low** (-3) or **info** (0). The score starts at 100. A: 90+, B: 80+, C: 65+, D: 50+, F below. The full issue list with codes (for example `cert_expires_soon`, `dmarc_policy_none`, `hsts_missing`) is in every record so you can build your own rules.

#### Input example

```json
{
  "domains": ["apify.com", "example.com"],
  "checks": ["dns", "email", "tls", "http", "crawlers"],
  "onlyWithIssues": false
}
```

#### Output example (shortened)

```json
{
  "domain": "github.com",
  "score": 93,
  "grade": "A",
  "summary": "0 critical, 0 high, 1 medium, 0 low issue(s). Top: Plain HTTP does not redirect to HTTPS.",
  "tls": { "protocol": "TLSv1.3", "issuer": "Sectigo Limited", "validTo": "2027-01-27T23:59:59.000Z", "daysRemaining": 69, "trusted": true },
  "emailAuth": {
    "spf": { "present": true, "all": "~all", "dnsLookups": 8 },
    "dmarc": { "present": true, "policy": "quarantine", "pct": 100 },
    "dkim": { "selectorsFound": ["google", "k1", "s1", "selector1"] }
  },
  "crawlers": { "robotsTxt": true, "llmsTxt": true, "securityTxt": true, "aiCrawlersBlocked": ["Bytespider"] },
  "issues": [ { "severity": "medium", "code": "no_http_to_https", "message": "Plain HTTP does not redirect to HTTPS." } ]
}
```

### Monitoring and alerts

Create a **Schedule** (daily or weekly), turn on **Only report domains with medium or higher issues**, and attach a webhook, Slack, email or Zapier/Make/n8n integration. Domains that pass are neither reported nor billed, so you only pay for what needs attention. To alert on certificates, filter `issues[].code` for `cert_expires_soon` and `cert_expired`.

### Pricing

Pay per event, no subscription:

| Event | Price |
|---|---|
| Actor start | $0.0001 |
| Each domain audited | $0.0029 (about **$2.90 per 1,000 domains**, discounts on paid Apify plans) |

100 domains cost about **$0.29**. With *Only report domains with medium or higher issues* enabled, passing domains are free. Choose fewer checks for faster runs; the price per domain is the same.

### Good to know

- **DKIM selectors cannot be discovered in general.** The Actor probes common ones; not finding one is not flagged as an error. Add your own selectors under *Extra DKIM selectors*. An empty `p=` is a revoked key, not a selector in use. If a random selector returns the same record, the domain has a DKIM wildcard and those hits are not reported as found.
- **SPF lookup count** is estimated from the top-level record, not by expanding nested includes.
- **Some sites block automated requests** (for example with a 403). The Actor reports what it sees; a 403 is not treated as an error.
- The audit tests the **apex domain** you provide (for example `example.com`, not `www.example.com`). Run both if you need both.
- It checks configuration only. It is **not** a vulnerability scanner and does not test for exploits.

### Privacy and legality

The Actor reads public DNS records and requests the homepage and standard public metadata files (`robots.txt`, `sitemap.xml`, `llms.txt`, `security.txt`) of the domains you list, with a clear User-Agent and one request each. Only audit domains you own or are allowed to assess. No personal data is collected.

### FAQ

**Does it need a proxy or API key?** No.

**Can it check thousands of domains?** Yes. Concurrency is adjustable; typical throughput is several domains per second.

**Why does an A-grade site still show issues?** Info and low items (for example no `llms.txt`) are suggestions and cost little or nothing in the score.

**Can I get a PDF report?** Not directly. Export the dataset to CSV, Excel or JSON, or use the API.

### Feedback

Found this useful? A quick review on the Store helps others find it. Issues or feature requests? Open an issue and I'll reply fast.

# Actor input Schema

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

Domains to audit, e.g. example.com. URLs are accepted and cleaned to the hostname.

## `checks` (type: `array`):

Pick which parts of the audit to run. Fewer checks run faster.

## `onlyWithIssues` (type: `boolean`):

Domains that pass are skipped and not billed. Handy for scheduled monitoring.

## `dkimSelectors` (type: `array`):

Besides about a dozen common selectors (google, selector1, k1, s1, ...) you can probe your own.

## `concurrency` (type: `integer`):

Domains audited in parallel.

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

Safety cap per run.

## `dnsResolver` (type: `string`):

System resolver or Cloudflare DNS-over-HTTPS.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "example.com"
  ],
  "checks": [
    "dns",
    "email",
    "tls",
    "http",
    "crawlers"
  ],
  "onlyWithIssues": false,
  "dkimSelectors": [],
  "concurrency": 10,
  "maxDomains": 2000,
  "dnsResolver": "system"
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items: the domain audit reports returned by the run (JSON, CSV, Excel, XML via the dataset API).

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

Key-value store record SUMMARY with counts and per-input status for this run.

# 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",
        "example.com"
    ],
    "checks": [
        "dns",
        "email",
        "tls",
        "http",
        "crawlers"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mauve_bunch/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": [
        "apify.com",
        "example.com",
    ],
    "checks": [
        "dns",
        "email",
        "tls",
        "http",
        "crawlers",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("mauve_bunch/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": [
    "apify.com",
    "example.com"
  ],
  "checks": [
    "dns",
    "email",
    "tls",
    "http",
    "crawlers"
  ]
}' |
apify call mauve_bunch/domain-health-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mauve_bunch/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/6U0REHgHuCYoYfOWF/builds/1ZQtsk7ckPuhmdo80/openapi.json
