# URL Health Check: Status, Redirects & SSL (`hydrocore/url-health-check`) Actor

Bulk URL check for SEO, ops and AI agents: HTTP status, full redirect chain, final URL, response time, SSL certificate expiry and issuer, HSTS and security headers with an A-F grade, plus a health verdict and plain issues for every URL.

- **URL**: https://apify.com/hydrocore/url-health-check.md
- **Developed by:** [Hydrocore Data](https://apify.com/hydrocore) (community)
- **Categories:** SEO tools, Developer 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 $0.72 / 1,000 url 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

## URL Health Check: Bulk Status, Redirect Chain, SSL Expiry & Security Headers

Check a list of **URLs or domains in bulk** and get one flat row per URL: **HTTP status**, the full **redirect chain** and **final URL**, **response time**, the **SSL certificate** (valid or not, issuer, expiry date, days left, TLS version) and the **security headers** (HSTS, Content-Security-Policy, nosniff, frame protection, Referrer-Policy, Permissions-Policy) with an **A-F grade**, plus a **health verdict** (healthy, warning or broken) and plain-language issues. It answers "is this link alive, where does it really go, and is its certificate about to expire?" for SEO audits, uptime checks, link cleaning and AI agents.

### ✅ What you get

- Health verdict (healthy, warning, broken) and status (ok, client-error, server-error, access-denied, timeout, dns-error, tls-error, redirect-loop)
- HTTP status, final URL, redirect count and the redirect chain
- Response time in milliseconds, content type and server header
- SSL: valid or not, issuer, valid from and to, days to expiry, TLS version, error reason
- Security headers with score and A-F grade, plus the list of missing headers
- Plain issues such as "SSL certificate expires in 12 days"

### 🏆 Why this Actor

- **Four checks in one row:** status and redirects, speed, SSL certificate and security headers, so you do not need four tools.
- **Sorted by what needs fixing:** worstFirst puts broken URLs on top, soonestSslExpiry puts the next expiring certificates on top; onlyProblems skips (and never charges) healthy URLs.
- **Redirects explained:** every hop with its status, the number of redirects, whether http upgrades to https, and a warning for long chains.
- **Safe by design:** only public http(s) hosts are requested; localhost and private networks are skipped for free.
- **Flat, fixed JSON:** the same 32 keys on every row, missing values are null, plus a summaryText sentence for agents.

### 💡 Use cases

- SEO and content teams: clean up broken links and redirect chains after a migration
- Ops and agencies: monitor client sites for expiring certificates and downtime on a schedule
- Security reviews: grade the security headers of many domains at once
- Link-building and outreach: drop dead pages before sending emails
- AI agents: check that a URL is alive and where it leads before citing or crawling it

### 🚀 How to use

1. Enter **URLs or domains** (one per line).
2. Optional: switch redirects, SSL or security checks off, keep only problems and pick a sort.
3. Run, then open **Overview**, **Redirects & speed**, **SSL certificate** or **Security headers**, or call the Actor from an agent via the API or MCP.

### ⚙️ Input

| Field | What it does |
|---|---|
| `urls` | One URL or domain per line. Bare domains get https://. The prefilled example list is used when the input is empty. |
| `followRedirects` | On (default) follows redirects and reports the chain. |
| `maxRedirects` | Longest chain to follow (default 10, maximum 20). |
| `checkSsl` | Read the SSL certificate of the final HTTPS host (default on). |
| `checkSecurityHeaders` | Grade the security headers (default on). |
| `onlyProblems` | Save only warning and broken URLs; healthy ones are not charged. |
| `sortBy` | input, worstFirst, slowestFirst or soonestSslExpiry. |
| `maxResults` | Cap on saved URLs after sorting (default 500, maximum 5000). |

Example input:

```json
{
  "urls": [
    "http://github.com",
    "https://expired.badssl.com/"
  ],
  "onlyProblems": true,
  "sortBy": "worstFirst"
}
```

### ⬆️ Output

One row per URL. Invalid URLs and blocked private hosts get a free row with `recordType` = `status` and the reason in `summaryText`. Every row has the same 32 keys in the same order; missing values are `null`. The example is a real row from a test run of the current build.

Overview fields:

| Field | Type | Example | Description |
|---|---|---|---|
| `url` | string | "http://github.com/" | The URL that was checked (normalised, https:// added to bare domains). |
| `health` | string | "healthy" | healthy, warning or broken. broken = HTTP 4xx/5xx, unreachable, timeout, redirect loop, certificate problem or a certificate that expires within 14 days; warning = access denied, long redirect chain, certificate expiring within 30 days, final URL not HTTPS or weak security headers. |
| `status` | string | "ok" | ok, client-error, server-error, access-denied (401/403/429), redirect-not-followed, redirect-loop, timeout, dns-error, tls-error or unreachable. |
| `httpStatus` | integer | 200 | HTTP status of the final response. Null when no response. |
| `finalUrl` | string | "https://github.com/" | URL after following redirects. |
| `redirectCount` | integer | 1 | Number of redirects followed (0 = none). |
| `responseMs` | integer | 70 | Total time for all hops, in milliseconds. |
| `tlsDaysToExpiry` | integer | 72 | Whole days until the certificate expires; negative when it has expired. |
| `securityGrade` | string | "A" | A to F from the six security headers below (A 90+, B 75+, C 55+, D 35+, else F). Null when the check is off or there was no response. |
| `summaryText` | string | "http://github.com/ -> ok (HTTP 200), 1 redirect to https://… | One plain-English sentence for an AI agent or a review. |

All 32 fields (in order): `recordType`, `url`, `health`, `status`, `httpStatus`, `finalUrl`, `redirectCount`, `redirectChain`, `upgradesToHttps`, `responseMs`, `contentType`, `serverHeader`, `tlsValid`, `tlsIssuer`, `tlsValidFrom`, `tlsValidTo`, `tlsDaysToExpiry`, `tlsProtocol`, `tlsError`, `securityGrade`, `securityScore`, `hasHsts`, `hasCsp`, `hasXContentTypeOptions`, `hasFrameProtection`, `hasReferrerPolicy`, `hasPermissionsPolicy`, `missingSecurityHeaders`, `issues`, `summaryText`, `inputValue`, `scrapedAt`.

Real row from a test run of the current build:

```json
{
  "recordType": "url",
  "url": "http://github.com/",
  "health": "healthy",
  "status": "ok",
  "httpStatus": 200,
  "finalUrl": "https://github.com/",
  "redirectCount": 1,
  "redirectChain": "301 http://github.com/ -> 200 https://github.com/",
  "upgradesToHttps": true,
  "responseMs": 70,
  "contentType": "text/html",
  "serverHeader": "github.com",
  "tlsValid": true,
  "tlsIssuer": "Sectigo Limited / Sectigo Public Server Authentication CA DV E36",
  "tlsValidFrom": "2026-10-30T00:00:00.000Z",
  "tlsValidTo": "2027-01-27T23:59:59.000Z",
  "tlsDaysToExpiry": 72,
  "tlsProtocol": "TLSv1.3",
  "tlsError": null,
  "securityGrade": "A",
  "securityScore": 90,
  "hasHsts": true,
  "hasCsp": true,
  "hasXContentTypeOptions": true,
  "hasFrameProtection": true,
  "hasReferrerPolicy": true,
  "hasPermissionsPolicy": false,
  "missingSecurityHeaders": [
    "Permissions-Policy"
  ],
  "issues": null,
  "summaryText": "http://github.com/ -> ok (HTTP 200), 1 redirect to https://github.com/, 70 ms, SSL valid 72 more days, security headers A; healthy.",
  "inputValue": "http://github.com",
  "scrapedAt": "2026-11-16T21:02:52.369Z"
}
```

Views: **Overview**, **Redirects & speed**, **SSL certificate**, **Security headers**, **Detailed (all fields)**. Export as JSON, CSV, Excel, XML or HTML from the Storage tab or the API (`/datasets/{id}/items?format=csv&view=overview`). The run summary (`OUTPUT` record in the key-value store) counts inputs, invalid URLs, duplicates, blocked hosts, checked, healthy, warning, broken, filtered, over the cap and saved URLs, plus the settings and sort used.

### 💰 Pricing

Competitive pricing, pay per result: **$0.0009 per URL** on the Free plan, less on higher plans, plus the $0.0005 Actor start. The default run (5 URLs) costs about $0.005; checking 1,000 URLs costs about $0.90. Invalid URLs, blocked private hosts, duplicates and filtered URLs are never charged.

| Event | What it is | Free | Bronze | Silver | Gold+ |
|---|---|---|---|---|---|
| URL checked | One URL checked and saved (health verdict, HTTP status, redirect chain and final URL, response time, SSL certificate details, security header grade, issues). Invalid URLs, blocked private hosts, duplicates and filtered URLs are free. | $0.0009 | $0.00081 | $0.00076 | $0.00072 |
| Actor start | Once per run (Apify standard start event, per GB of memory; the default 256 MB = one fee) | $0.0005 | $0.0005 | $0.0005 | $0.0005 |

### 🔁 Integrations

Works with the Apify API, MCP (AI agents), Make, n8n, Zapier, Google Sheets and webhooks. Field names are stable camelCase, so mappings do not break between runs.

### ❓ FAQ

**What does the health verdict mean?**

broken: HTTP 4xx or 5xx, no connection, timeout, DNS failure, redirect loop, an untrusted or expired certificate, or a certificate that expires within 14 days. warning: access denied (401, 403, 429), more than 2 redirects, a certificate expiring within 30 days, a final URL that is not HTTPS, or a security grade of D or F. healthy: none of those.

**Why does a site return "access-denied"?**

Some sites block automated requests with 403 or 429 even though the page works in a browser. The row says so in issues, so you can check those URLs by hand.

**How are redirects followed?**

Each hop is requested without auto-following, so the chain, the status of every hop and the final URL are recorded. The default limit is 10 redirects; beyond it the URL is reported as a redirect loop.

**What is checked for the SSL certificate?**

The certificate of the final HTTPS host: whether the chain is trusted and matches the host, the issuer, the valid-from and valid-to dates, whole days left and the TLS version. For an invalid certificate the reason (for example CERT_HAS_EXPIRED) is in tlsError.

**How is the security grade calculated?**

Strict-Transport-Security 25 points, Content-Security-Policy 25, X-Content-Type-Options nosniff 15, frame protection (X-Frame-Options or CSP frame-ancestors) 15, Referrer-Policy 10, Permissions-Policy 10. A is 90 or more, B 75, C 55, D 35, otherwise F. It checks that headers are present, not that every policy is perfect.

**Does it crawl the whole website?**

No. It checks exactly the URLs you give it. To find the URLs of a site first, use a sitemap extractor and feed the list in.

**Which requests does it send?**

One GET request per hop with a normal browser-like header set and a 15 second timeout, and the body is not downloaded. It reads only headers and the certificate.

**Can I check internal or localhost URLs?**

No. Only public http(s) hosts are requested; localhost and private network addresses are skipped for free.

**Can I monitor certificates on a schedule?**

Yes. Schedule the Actor with your domains, set onlyProblems to true and sort by soonestSslExpiry; you only pay for URLs that need attention.

**Is it good for AI agents?**

Yes. Tiny input, flat rows and a summaryText sentence let an agent verify a link and see where it really leads in one call.

### 🛟 Support

Found a problem or need a field? Open an issue on the Issues tab; we read every issue.

### Changelog

- 1.0 (2026-11-16): first release.

# Actor input Schema

## `urls` (type: `array`):

One URL or domain per line (example.com or https://example.com/page). Bare domains get https://. Duplicates are skipped for free. The prefilled example list is used when the input is empty.

## `followRedirects` (type: `boolean`):

On (default): follow redirects up to the limit and report the full chain and the final URL. Off: report the first response only.

## `maxRedirects` (type: `integer`):

Longest redirect chain to follow before the URL is reported as a redirect loop. Default 10, maximum 20.

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

Read the certificate of the final HTTPS host: validity, issuer, expiry date and days left, TLS version.

## `checkSecurityHeaders` (type: `boolean`):

Grade HSTS, Content-Security-Policy, X-Content-Type-Options, frame protection, Referrer-Policy and Permissions-Policy (A to F).

## `onlyProblems` (type: `boolean`):

Save only URLs with a warning or that are broken. Healthy URLs are skipped and never charged.

## `sortBy` (type: `string`):

input keeps your order, worstFirst lists broken URLs first, slowestFirst sorts by response time, soonestSslExpiry puts the certificates that expire first on top.

## `maxResults` (type: `integer`):

Cap on saved URLs (sorted first, then capped). Default 500, maximum 5000.

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "http://github.com",
    "github.com/this-page-does-not-exist-xyz",
    "https://expired.badssl.com/",
    "https://www.wikipedia.org"
  ],
  "followRedirects": true,
  "maxRedirects": 10,
  "checkSsl": true,
  "checkSecurityHeaders": true,
  "onlyProblems": false,
  "sortBy": "input",
  "maxResults": 500
}
```

# Actor output Schema

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

Health, status, final URL, redirects, speed, SSL days left and security grade.

## `redirects` (type: `string`):

Redirect chain, HTTPS upgrade, response time and server.

## `ssl` (type: `string`):

Certificate validity, issuer, dates and days left.

## `security` (type: `string`):

Grade and each header.

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

Every field for each row.

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

Run summary: inputs, invalid URLs, duplicates, blocked hosts, checked, healthy, warning, broken, filtered, over the cap, saved and status rows.

# 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 = {
    "urls": [
        "https://example.com",
        "http://github.com",
        "github.com/this-page-does-not-exist-xyz",
        "https://expired.badssl.com/",
        "https://www.wikipedia.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hydrocore/url-health-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 = { "urls": [
        "https://example.com",
        "http://github.com",
        "github.com/this-page-does-not-exist-xyz",
        "https://expired.badssl.com/",
        "https://www.wikipedia.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hydrocore/url-health-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 '{
  "urls": [
    "https://example.com",
    "http://github.com",
    "github.com/this-page-does-not-exist-xyz",
    "https://expired.badssl.com/",
    "https://www.wikipedia.org"
  ]
}' |
apify call hydrocore/url-health-check --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hydrocore/url-health-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/fj4Fy4vC5qnVdwsU7/builds/9YyVZbjiyzRBc8US8/openapi.json
