# Website Security Headers & Email DMARC/SPF Checker (`mrdexter4/website-security-email-check`) Actor

Bulk-check domains for HTTPS, TLS, HSTS, CSP and other security headers, SPF, DKIM, DMARC, MTA-STS, DNSSEC and security.txt. 0-100 score, grade and fix list per domain, plus an HTML report. No browser, no API key. Pay per domain.

- **URL**: https://apify.com/mrdexter4/website-security-email-check.md
- **Developed by:** [Mateus Correia](https://apify.com/mrdexter4) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.00 / 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

### What does Website Security & Email Trust Check do?

**Website Security & Email Trust Check** tests any list of domains for the basics that customers, insurers and security questionnaires ask about. You get a **0–100 score, an A–F grade and a prioritised fix list** for each domain. It covers:

- **Web:** HTTP → HTTPS redirect, TLS version, certificate validity and expiry, **HSTS**, **Content-Security-Policy**, X-Content-Type-Options, clickjacking protection, Referrer-Policy, Permissions-Policy, software version leaks and **security.txt** (RFC 9116).
- **Email:** **SPF** (including the 10-lookup limit), **DMARC** policy and reporting, **DKIM** keys on common selectors, **MTA-STS** and **SMTP TLS reporting**.
- **DNS:** **DNSSEC** validation.

It's a bulk, API-friendly alternative to checking domains one by one in online header and DMARC checkers. It uses only public HTTP, TLS and DNS data. No browser, no proxy and no API key.

### Why use this security headers and DMARC checker?

- 🏢 **Agencies and web developers:** audit every client site in one run and send the HTML report.
- 📧 **Email deliverability:** Google and Yahoo require SPF, DKIM and DMARC from bulk senders. See which domains are missing them.
- 🛡️ **Security questionnaires, NIS2 and cyber-insurance forms:** document the current state of HTTPS, HSTS and email authentication for all your domains.
- 🔁 **Monitoring:** schedule it weekly on Apify and get notified through webhooks, Slack, Zapier, Make or n8n when a score drops or a certificate is about to expire.
- 🤖 **AI agents:** small input, flat output and fast runs make it easy to call from Claude, ChatGPT or other agents through the Apify MCP server.

### What does the security check return?

| Field | Description |
|---|---|
| `domain` | Domain that was checked |
| `score`, `grade` | Overall 0–100 score and A–F grade |
| `webScore`, `emailScore` | Sub-scores for website and email security |
| `failCount`, `warnCount` | Number of failed and warning checks |
| `httpRedirectsToHttps`, `tlsVersion`, `certDaysLeft` | HTTPS facts |
| `hsts`, `csp`, `securityTxt` | Whether these protections are present |
| `spf`, `dmarcPolicy`, `dkimSelectorsFound`, `mtaStsMode`, `dnssec` | Email and DNS facts |
| `topFixes` | Up to 5 most important fixes, in plain language |
| `checks` | Every check with status (`pass` / `warn` / `fail` / `info`), finding, fix and reference (RFC or standard) |

### How to check website security headers and DMARC in bulk

1. Click **Try for free**.
2. Paste your domains (one per line), e.g. `example.com`.
3. Click **Start**.
4. Open the **Overview** table, or download `report.html` from the key-value store to share with a client.

### How much does it cost?

Pay per event: you pay **per domain checked** (see the Pricing tab), plus a small amount of platform usage. Domains that don't resolve and aren't reachable are **not charged**. A run with 100 domains typically finishes in a few minutes at 256 MB memory.

### Input

Only `domains` is required. Optional settings: your own DKIM selectors, whether to generate the HTML report, concurrency and timeout. See the **Input** tab.

### Output example

```json
{
  "domain": "example.com",
  "score": 58,
  "grade": "D",
  "webScore": 55,
  "emailScore": 50,
  "failCount": 3,
  "httpRedirectsToHttps": true,
  "tlsVersion": "TLSv1.3",
  "certDaysLeft": 71,
  "hsts": false,
  "spf": "v=spf1 -all",
  "dmarcPolicy": "reject",
  "dnssec": true,
  "topFixes": ["Add \"Strict-Transport-Security: max-age=31536000; includeSubDomains\" once all subdomains support HTTPS."]
}
```

You can download the dataset as JSON, CSV, Excel or HTML, or read it through the Apify API.

### How is the score calculated?

Each check scores 1 for **pass**, 0.5 for **warn** and 0 for **fail**. Critical checks (certificate, HTTPS, HSTS, SPF, DMARC, DNSSEC) count double or triple. Informational checks (MX, optional MTA-STS, missing DKIM on common selectors) don't affect the score. The categories follow the public **internet.nl** tests and **NCSC-NL** TLS guidelines, but this Actor is independent and not affiliated with them.

### FAQ

**Why is DKIM "info" instead of "fail"?** DNS can't list DKIM selectors. The Actor probes the most common ones (Google Workspace, Microsoft 365, Mailchimp and others). If you use a custom selector, add it under *Custom DKIM selectors*.

**Is this a penetration test?** No. It reads only public HTTP headers, TLS handshakes and DNS records, the same data any browser or mail server sees. It doesn't scan ports or try exploits.

**Does it collect personal data?** No. It only collects technical configuration data about the domains you enter.

**Something looks wrong?** Open an issue on the **Issues** tab. Issues get a reply within a couple of days.

Related: [EU Accessibility Scanner](https://apify.com/mrdexter4/eu-accessibility-scanner) · [GDPR Cookie Consent Verifier](https://apify.com/mrdexter4/cookie-consent-verifier) · [Bulk Core Web Vitals Monitor](https://apify.com/mrdexter4/core-web-vitals-monitor)

*Automated technical checks for information purposes; not legal or security advice.*

# Actor input Schema

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

One per line, e.g. example.com or https://www.example.com/. Paths are ignored. Email checks run on the domain without 'www.'.

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

DKIM selectors can't be listed via DNS, so the Actor probes ~18 common ones (google, selector1/2 for Microsoft 365, k1 for Mailchimp, …). A miss is reported as 'info', never as a failure.

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

Replace the default selector list, e.g. if you know your mail provider's selector.

## `generateReport` (type: `boolean`):

Save a client-ready report.html with every check, finding and fix to the key-value store.

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

How many domains to check at the same time.

## `timeoutSecs` (type: `integer`):

Timeout for each HTTP, TLS or DNS request.

## Actor input object example

```json
{
  "domains": [
    "internet.nl",
    "example.com"
  ],
  "checkDkim": true,
  "generateReport": true,
  "maxConcurrency": 5,
  "timeoutSecs": 15
}
```

# Actor output Schema

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

No description

## `checks` (type: `string`):

No description

## `report` (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": [
        "internet.nl",
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrdexter4/website-security-email-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": [
        "internet.nl",
        "example.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mrdexter4/website-security-email-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": [
    "internet.nl",
    "example.com"
  ]
}' |
apify call mrdexter4/website-security-email-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrdexter4/website-security-email-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/0haY9dEiDJs5wepmJ/builds/E3Wixg5W04B65ilFz/openapi.json
