# Website Uptime & SSL Monitor (`macgyver_dev/website-uptime-ssl-monitor`) Actor

Check client websites for downtime, HTTP errors, expiring or broken SSL, error pages and missing content. Schedule it daily and get alerts. Built for web agencies and freelancers.

- **URL**: https://apify.com/macgyver_dev/website-uptime-ssl-monitor.md
- **Developed by:** [Macgyver Cseh](https://apify.com/macgyver_dev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 website 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

## Website Uptime & SSL Monitor

Keep client websites healthy with a lightweight, browser-free monitor for agencies. Give it a list of URLs and receive one clear health record per site: **OK**, **WARNING**, or **DOWN**.

### What it checks

| Check | What you get |
|---|---|
| Availability | Online/offline, HTTP status, response time and final URL |
| Redirects | Redirect chain, count and whether HTTP redirects to HTTPS |
| SSL/TLS | Certificate validity, issuer, expiry date, days remaining and trust errors |
| Domain style | Whether the final hostname uses `www` or the bare domain |
| Mobile readiness | Whether a responsive `width=device-width` viewport is present |
| Required text | Optional check for a company name, slogan or other required text |
| Error content | Database errors, fatal errors, directory indexes, suspended accounts and 404 titles |

The Actor uses Node.js `http`, `https`, `tls` and HTML inspection only. It does not launch a browser, execute page JavaScript or crawl beyond the homepage.

### Input

- **Websites:** URLs or domains, one per line.
- **SSL warning threshold:** warn when a certificate expires in fewer than this many days (default: 14).
- **Required text:** optional case-insensitive text that must be present in the homepage HTML.
- **Save only websites with problems:** when enabled, healthy `OK` sites are not saved.
- **Parallel checks:** configure concurrency for your plan and network.
- **Timeout:** maximum seconds per request.

### Output

Each saved item includes `status`, `problems`, `online`, `statusCode`, `responseTimeMs`, `redirects`, `ssl`, `domainStyle`, `mobileViewport`, `requiredTextFound`, `errorWordsFound`, `title`, and timestamps. Problems are written in simple English so an account manager can act on them immediately.

```json
{
  "url": "https://example.com/",
  "status": "OK",
  "online": true,
  "statusCode": 200,
  "responseTimeMs": 180,
  "ssl": { "valid": true, "issuer": "DigiCert Inc", "expiresAt": "2027-01-01T00:00:00.000Z", "daysUntilExpiry": 48, "authorizationError": null },
  "redirectCount": 0,
  "httpToHttps": true,
  "domainStyle": "non-www",
  "mobileViewport": true,
  "requiredTextFound": null,
  "errorWordsFound": [],
  "problems": []
}
```

### Step by step

1. Click **Start** and paste your sites into **Websites** (the prefill includes `example.com`, `expired.badssl.com` and `www.cloudflare.com`).
2. Choose the SSL threshold and optional required text.
3. Enable **Save only websites with problems** if you want a compact alert dataset.
4. Click **Start** and open the **Output** tab. The included table view makes status, HTTP, SSL and problem fields easy to scan.
5. Export JSON, CSV or Excel, or connect the dataset to another Apify integration.

### Daily monitoring and alerts

Create an Apify **Schedule** for this Actor, select daily (or hourly), and keep the same input so every run checks the client list. In the Schedule's integrations, add an email or Slack integration to send a run-finished notification. For richer alerts, connect Apify to Make, Zapier, n8n or a webhook and filter dataset items where `status` is `WARNING` or `DOWN`.

### Pricing

The Actor costs **$0.40 per 1,000 website checks** ($0.0004 each). Checking 100 client sites every day for a month costs about **$1.20**. You pay only for websites saved to your results: turn on **Save only websites with problems** and healthy sites are checked for free.

### FAQ

**Does it use a browser?** No. It uses Node.js HTTP(S), TLS and HTML inspection, which keeps checks fast and memory-light.

**Does it crawl every page?** No. It checks each homepage only.

**Can it detect an expired or self-signed certificate?** Yes. It reads the peer certificate with `tls.connect`, records expiry and reports trust errors.

**Why is `mobileViewport` false on a modern site?** The check looks for the standard responsive viewport meta tag in the returned HTML. Sites that inject it with JavaScript may be reported false.

**What does `httpToHttps` mean?** It is true when the HTTP version of the final host redirects to an HTTPS URL. A site can be HTTPS-accessible while still failing this best-practice check.

**What does `onlyProblems` save?** It saves WARNING and DOWN records and skips OK records. The check still runs for every input URL.

**Can I run it every day?** Yes. Use Apify Schedules and an email, Slack, Make, Zapier or n8n integration for notifications.

**Will it follow redirects?** Yes, up to ten redirects, and it records every hop.

**What happens for a nonexistent domain?** The item is retained as DOWN with a concise network error, unless you use a future filter outside this Actor.

**Is it safe for client sites?** It sends ordinary GET requests to public homepages and does not submit forms or execute scripts. Keep concurrency reasonable and follow the site's terms and applicable laws.

# Actor input Schema

## `websites` (type: `array`):

Website URLs to check, one per line.

## `sslWarningDays` (type: `integer`):

Warn when the certificate expires in fewer than this many days.

## `requiredText` (type: `string`):

Text that must appear in the homepage HTML, such as a company name.

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

Skip healthy OK results to reduce dataset items and cost.

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

Number of websites checked concurrently.

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

Give up on a website after this many seconds.

## Actor input object example

```json
{
  "websites": [
    "example.com",
    "expired.badssl.com",
    "www.cloudflare.com"
  ],
  "sslWarningDays": 14,
  "onlyProblems": false,
  "maxConcurrency": 10,
  "timeoutSecs": 20
}
```

# 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 = {
    "websites": [
        "example.com",
        "expired.badssl.com",
        "www.cloudflare.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("macgyver_dev/website-uptime-ssl-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 = { "websites": [
        "example.com",
        "expired.badssl.com",
        "www.cloudflare.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("macgyver_dev/website-uptime-ssl-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 '{
  "websites": [
    "example.com",
    "expired.badssl.com",
    "www.cloudflare.com"
  ]
}' |
apify call macgyver_dev/website-uptime-ssl-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,macgyver_dev/website-uptime-ssl-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/yWL8WWxRBCiRSv16f/builds/8tZaaeSjjEXAKUcS9/openapi.json
