# Domain & SSL Expiry Monitor – Certificates, RDAP & Alerts (`quietjoy/domain-ssl-expiry-monitor`) Actor

Check SSL/TLS certificates and domain registration expiry for any list of domains. Flags certificates and domains expiring within N days, invalid certificates, and changes in issuer, registrar or nameservers since the last run.

- **URL**: https://apify.com/quietjoy/domain-ssl-expiry-monitor.md
- **Developed by:** [Moduvant Systems](https://apify.com/quietjoy) (community)
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 host checkeds

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 & SSL Expiry Monitor – certificates, RDAP & change alerts

**Domain & SSL Expiry Monitor** checks a list of domains for **SSL/TLS certificate expiry** and **domain registration expiry**, flags anything expiring soon or broken, and detects **changes** since the previous run (certificate replaced, issuer, registrar or nameservers changed). Schedule it weekly and never get caught by an expired certificate or a lapsed domain again.

- 🔒 **SSL**: direct TLS handshake – expiry date, days left, issuer, subject, SANs, TLS version, trusted / untrusted (self-signed, expired, hostname mismatch)
- 🌐 **Domain**: official **RDAP** (the successor of WHOIS) via the IANA bootstrap – expiry, registrar, created/updated dates, status, nameservers. Works for .com/.net/.org, most new gTLDs and many ccTLDs such as .uk
- 🚦 Status per host: `ok`, `warning` (≤ 30 days), `critical` (≤ 7 days or untrusted/unreachable), `expired`
- 🔁 **Change detection** with a named key-value store; **only alerts** mode for quiet scheduled runs
- No login, no API keys, no browser

### Input

| Field | Description |
|---|---|
| `domains` | Domains, hostnames or URLs. Empty = demo list. |
| `checkSsl` / `checkDomain` | Turn either check off (default both on). |
| `warnDays` / `criticalDays` | Thresholds in days (default 30 / 7). |
| `onlyAlerts` | Output only hosts that are not `ok` or have changes (default off). |
| `port` | TLS port (default 443). |
| `stateStoreName` | Named key-value store for change detection. |

```json
{
  "domains": ["example.com", "shop.example.co.uk", "api.example.io"],
  "warnDays": 21,
  "onlyAlerts": true
}
```

### Output

```json
{
  "input": "apify.com",
  "host": "apify.com",
  "registrableDomain": "apify.com",
  "status": "ok",
  "alerts": [],
  "changes": [],
  "sslDaysLeft": 75,
  "sslValidTo": "2027-01-16T23:59:59.000Z",
  "sslValidFrom": "2025-12-18T00:00:00.000Z",
  "sslValid": true,
  "sslIssuer": "Amazon",
  "sslSubject": "apify.com",
  "sslAltNames": ["apify.com", "*.apify.com"],
  "tlsProtocol": "TLSv1.3",
  "sslFingerprint256": "AB:CD:…",
  "sslError": null,
  "domainDaysLeft": 3133,
  "domainExpires": "2035-06-07T…Z",
  "domainCreated": "…",
  "domainUpdated": "…",
  "domainRegistrar": "Amazon Registrar, Inc.",
  "domainStatus": ["client transfer prohibited"],
  "nameservers": ["ns-….awsdns-….com"],
  "domainError": null,
  "rdapUrl": "https://rdap.verisign.com/com/v1/domain/apify.com",
  "checkedAt": "2026-11-02T17:45:00.000Z"
}
```

A `RUN_SUMMARY` record has counts per status.

### Use cases

- **Agencies & MSPs** – one scheduled check for all client domains and certificates
- **DevOps / SRE** – catch failed auto-renewals (Let's Encrypt, ACM) before users see warnings
- **Domain portfolio owners** – registration expiry and registrar / nameserver change alerts (possible hijack or transfer)
- **Security & vendor due diligence** – certificate issuers and validity across third-party domains
- Send alerts to Slack, email or webhooks with Apify integrations

### Limitations

- Some registries publish **no RDAP** (e.g. .de, .es, several ccTLDs) – their domain expiry is reported as unknown; SSL checks still work.
- Some registries return limited data or rate-limit RDAP; failures are reported in `domainError` rather than failing the run.
- The SSL check reads the certificate the server presents to SNI on the given port; it does not perform a full TLS configuration audit.

### Legal note

The Actor uses only **public information**: the certificate every HTTPS server presents to any visitor and the registries' public RDAP services. It does not log in or probe for vulnerabilities. RDAP responses may contain registrant contact data for some domains; the Actor outputs only registrar, dates, status and nameservers, not personal contact details. Use the results in line with applicable law and registry terms.

# Actor input Schema

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

E.g. `example.com`, `shop.example.co.uk` or `https://example.com/page`. The SSL certificate is checked on the exact hostname; domain registration is checked on its registrable domain (e.g. `example.co.uk`). If empty, a demo list is used.

## `checkSsl` (type: `boolean`):

Connect over TLS and read the certificate (expiry, issuer, validity, SANs).

## `checkDomain` (type: `boolean`):

Look up registration expiry, registrar, status and nameservers via the registry's official RDAP service. Some country-code TLDs (e.g. .de, .es) publish no RDAP; their expiry is reported as unknown.

## `warnDays` (type: `integer`):

Status `warning` when a certificate or domain expires within this many days.

## `criticalDays` (type: `integer`):

Status `critical` when a certificate or domain expires within this many days.

## `onlyAlerts` (type: `boolean`):

Skip domains whose status is `ok` and which have no changes since the previous run. Ideal for scheduled runs that notify you only when action is needed.

## `port` (type: `integer`):

Port used for the certificate check.

## `stateStoreName` (type: `string`):

Name of the key-value store that remembers the previous certificate, registrar and nameservers for change detection. Use a different name for separate monitors.

## `requestDelayMs` (type: `integer`):

Polite pause between domains (RDAP registries rate-limit).

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com",
    "bbc.co.uk",
    "expired.badssl.com"
  ],
  "checkSsl": true,
  "checkDomain": true,
  "warnDays": 30,
  "criticalDays": 7,
  "onlyAlerts": false,
  "port": 443,
  "stateStoreName": "domain-ssl-expiry-monitor-state",
  "requestDelayMs": 500
}
```

# Actor output Schema

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

One item per checked host with SSL and domain expiry, status, alerts and changes.

## `runSummary` (type: `string`):

Counts by status (RUN_SUMMARY record in the default key-value store).

# 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",
        "github.com",
        "bbc.co.uk",
        "expired.badssl.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("quietjoy/domain-ssl-expiry-monitor").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",
        "github.com",
        "bbc.co.uk",
        "expired.badssl.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("quietjoy/domain-ssl-expiry-monitor").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",
    "github.com",
    "bbc.co.uk",
    "expired.badssl.com"
  ]
}' |
apify call quietjoy/domain-ssl-expiry-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,quietjoy/domain-ssl-expiry-monitor"
        }
    }
}
```

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/7kxuypLvDi2sBF94f/builds/zG4sqMPzGtbAPBmXh/openapi.json
