# Website Security Grader: Bulk SSL, Headers, SPF & DMARC Check (`kryptoryn/website-security-grader`) Actor

Grade hundreds of websites A-F in one run with passive checks: HTTPS, redirect, TLS certificate, security headers, cookies, security.txt, SPF and DMARC. Every issue comes with a plain-language fix, in English or Spanish.

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

## Pricing

from $5.00 / 1,000 website gradeds

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

## Website Security Grader: bulk SSL, security headers, SPF and DMARC check

Paste a list of websites and get an **A–F security grade for each one**, with every problem explained in plain language and a **ready-to-apply fix**. Built for agencies, MSPs, web developers and sales teams who need to audit many sites at once, not one by one.

All checks are **passive**: the Actor loads the public home page, reads response headers and public DNS records, exactly like a browser would. No port scanning, no vulnerability probing, no login attempts.

### What it checks

| Area | Checks |
|---|---|
| HTTPS | HTTPS available, HTTP → HTTPS redirect |
| TLS certificate | Valid and trusted, days to expiry, issuer, negotiated protocol (flags TLS 1.0/1.1) |
| Security headers | HSTS (and max-age), Content-Security-Policy, clickjacking protection (X-Frame-Options / frame-ancestors), X-Content-Type-Options, Referrer-Policy, Permissions-Policy |
| Information leaks | Server version, X-Powered-By, CMS version in meta generator |
| Cookies | Secure, HttpOnly and SameSite flags |
| Disclosure | security.txt (RFC 9116) |
| Email security | SPF record and `+all`/`?all`, DMARC record and policy (`none` / `quarantine` / `reject`) |
| Technology | WordPress, Shopify, Wix, Squarespace, Joomla, PrestaShop, Cloudflare |

### What can you use it for?

- **Agencies and MSPs**: audit every client site in one run and send each client a list of fixes.
- **Lead generation**: find prospects with an F grade, an expiring certificate or no DMARC, and offer to fix it.
- **Monitoring**: schedule it weekly and get alerted when a certificate is about to expire or a grade drops.
- **Due diligence**: quick security hygiene snapshot of a supplier or acquisition target.

### Example output

```json
{
  "domain": "example.com",
  "grade": "D",
  "score": 42,
  "summary": "example.com: grade D (42/100), 1 high, 3 medium, 2 low",
  "https": true,
  "httpToHttpsRedirect": false,
  "tls": {"valid": true, "protocol": "TLSv1.3", "expiresAt": "2027-01-15", "daysToExpiry": 75},
  "email": {"domain": "example.com", "spf": "v=spf1 -all", "dmarc": "v=DMARC1;p=reject", "dmarcPolicy": "reject"},
  "issues": [
    {"id": "no_redirect", "severity": "high", "issue": "HTTP does not redirect to HTTPS", "fix": "Redirect all http:// requests to https:// with a 301."},
    {"id": "no_hsts", "severity": "medium", "issue": "Missing Strict-Transport-Security (HSTS)", "fix": "Add: Strict-Transport-Security: max-age=31536000; includeSubDomains"}
  ]
}
```

The dataset has two views: **Grades** (one row per site) and **Issues and fixes** (one row per issue), both exportable to CSV, Excel or JSON.

### How the grade works

Every site starts at 100. Each issue subtracts points by severity: critical −40, high −20, medium −10, low −4, info 0. Grades: **A** 90+, **B** 75+, **C** 60+, **D** 40+, **E** 20+, **F** below 20. Sites with an invalid or expired certificate are still analysed. Sites that cannot be reached at all get grade **N/A** and the connection error.

### Input

| Field | Description |
|---|---|
| Websites or domains | One per line: `example.com`, `https://shop.example.com` |
| Report language | English or Spanish (Español) |
| Check email security | SPF and DMARC lookups (on by default) |
| Max concurrency | Sites checked in parallel (default 10) |
| Max domains | Safety cap per run |

### Pricing

Pay per result: you are charged for each website in the results, including sites reported as unreachable.

### Español

Analiza en bloque la seguridad de muchas webs y obtén una nota de la A a la F con cada problema explicado y su solución en español (elige **Español** en *Report language*). Revisa HTTPS, certificado, cabeceras de seguridad, cookies, security.txt, SPF y DMARC. Solo comprobaciones pasivas.

### Notes

Only use it on websites you own, manage or have a legitimate reason to review. Results reflect the public home page at the time of the check; a high grade does not guarantee a site is secure.

# Actor input Schema

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

Domains or URLs to grade, one per line, e.g. example.com or https://shop.example.com. Duplicates are removed.

## `language` (type: `string`):

Language of the issue descriptions and fixes.

## `checkEmailSecurity` (type: `boolean`):

Look up the domain's SPF and DMARC DNS records to detect email spoofing risk.

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

How many websites to check in parallel.

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

Safety cap on the number of domains graded in one run.

## Actor input object example

```json
{
  "domains": [
    "example.com",
    "wikipedia.org",
    "github.com"
  ],
  "language": "en",
  "checkEmailSecurity": true,
  "maxConcurrency": 10,
  "maxDomains": 1000
}
```

# Actor output Schema

## `results` (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": [
        "example.com",
        "wikipedia.org",
        "github.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kryptoryn/website-security-grader").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": [
        "example.com",
        "wikipedia.org",
        "github.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("kryptoryn/website-security-grader").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": [
    "example.com",
    "wikipedia.org",
    "github.com"
  ]
}' |
apify call kryptoryn/website-security-grader --silent --output-dataset

```

## MCP server setup

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

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/YDG5bZ4KTUfceShku/builds/iSp9RnKd7GrVRjZcA/openapi.json
