# Domain Security Audit: SPF, DMARC, DKIM, TLS & Headers (`fluted_mirror/domain-security-audit`) Actor

Grade any list of domains A-F: SPF, DMARC, DKIM, MX, CAA, TLS certificate expiry, HTTPS redirect, security headers and security.txt. Public data only.

- **URL**: https://apify.com/fluted_mirror/domain-security-audit.md
- **Developed by:** [Troy Daniels](https://apify.com/fluted_mirror) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

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 Security Audit

Give it a list of domains and get each one back with a grade from A to F, a score out of 100 and a plain-English list of fixes. It checks:

- **Email spoofing protection:** SPF (missing, several records, weak `~all`/`+all`, too many lookups), DMARC policy (`none`, `quarantine` or `reject`), and DKIM keys at common selectors
- **TLS:** whether the certificate is valid, when it expires, who issued it, and the protocol version
- **HTTPS hygiene:** whether http redirects to https, plus the HSTS, CSP, X-Content-Type-Options, Referrer-Policy and Permissions-Policy headers and clickjacking protection
- **Hardening:** server version leaks, CAA records and `/.well-known/security.txt`
- **MX records**, so you can tell domains that send email from ones that don't

It only uses public data: DNS over HTTPS (Cloudflare, with Google as fallback), a single HTTPS request to the homepage, the TLS handshake, and the security.txt file. There's no crawling, no login and no personal data.

### Who it's for

- **Agencies and MSPs** prospecting for clients: "your domain can be spoofed, and here's the fix"
- **Cold-email teams** checking deliverability prerequisites (SPF, DKIM and DMARC) across their sending domains
- **Security and IT teams** watching certificate expiry and header drift across a portfolio (schedule it daily)
- **AI agents** through the Apify MCP server: "audit these 50 domains and list the ones without DMARC"

### Input

```json
{ "domains": ["example.com", "https://www.example.org/page"], "checkDkim": true, "maxConcurrency": 5 }
```

### Output (one row per domain)

```json
{ "domain": "example.com", "grade": "C", "score": 63,
  "findings": [{"severity": "high", "code": "NO_DMARC", "message": "No DMARC record"}],
  "spf": {...}, "dmarc": {...}, "mx": [...], "caa": [...], "dkim_selectors_found": [...],
  "tls": {"valid": true, "days_left": 64, "issuer": "..."}, "https": {...},
  "http_redirects_to_https": true, "security_txt": false, "checked_at": "2026-10-17T01:00:00+00:00" }
```

You can export the results as JSON, CSV or Excel, or pull them from the API.

### Pricing (pay per event)

- `domain-audited`: **$0.004 per domain** ($4 per 1,000). Invalid inputs and failed audits are not charged.

### Limitations

- DKIM is only probed at common selectors, so a custom selector shows as "not found" (severity: info).
- The score is a heuristic for prioritising fixes. It is not a penetration test.

# Actor input Schema

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

Domains or URLs to audit (e.g. example.com, https://www.example.org/page).

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

Looks up DKIM keys at common selectors (google, selector1, selector2, ...).

## `maxConcurrency` (type: `integer`):

Domains audited in parallel.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "example.com"
  ],
  "checkDkim": true,
  "maxConcurrency": 5
}
```

# Actor output Schema

## `auditResults` (type: `string`):

Every audited domain with its grade (A-F), score (0-100), findings and raw check details.

## `overview` (type: `string`):

The overview view: domain, grade, score, findings and check time.

## `details` (type: `string`):

The details view: SPF, DMARC, DKIM selectors, MX, CAA, TLS and HTTPS details per domain.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fluted_mirror/domain-security-audit").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",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("fluted_mirror/domain-security-audit").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"
  ]
}' |
apify call fluted_mirror/domain-security-audit --silent --output-dataset

```

## MCP server setup

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

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/FuTEjqoQsf7qqSLDF/builds/h7yUB7ei48efuZeWY/openapi.json
