# Mixed Content Checker – Find HTTP Resources on HTTPS (`adamplaenitz/mixed-content-checker`) Actor

Find insecure http:// resources on HTTPS pages: scripts, stylesheets, iframes, images, fonts, CSS url()/@import and form actions. Active vs passive, severity, HTTPS availability and fix per finding. Check URL lists or crawl a site; fast HTML mode or browser mode.

- **URL**: https://apify.com/adamplaenitz/mixed-content-checker.md
- **Developed by:** [Adam Plänitz](https://apify.com/adamplaenitz) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 page 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

## Mixed Content Checker – Find HTTP Resources on HTTPS

**Find every insecure `http://` resource on your HTTPS pages before your visitors' browsers do.** Mixed content breaks pages (browsers block insecure scripts, stylesheets, iframes and fonts), removes the padlock and makes forms send data unencrypted. This Actor checks a list of URLs or crawls a whole site and reports, per page, every insecure reference with its type, *active* or *passive* category, severity, where it was found (HTML, inline style, stylesheet, `@import`, browser), whether the same file is available over HTTPS and how to fix it. Export as JSON, CSV or Excel, or connect to Google Sheets, Slack, Make, Zapier, n8n or webhooks.

### What does it do?

1. Downloads each page (no browser, default) and parses the HTML: `<script>`, `<link rel=stylesheet|preload|modulepreload|icon|manifest>`, `<iframe>`, `<frame>`, `<object>`, `<embed>`, `<img src/srcset/data-src>`, `<picture><source>`, `<video>`/`<audio>`/`<source>`/`<track>`, `poster`, SVG `<image>`, `<input type=image>`, `<form action>`, `formaction`, `<base href>`.
2. Scans `<style>` blocks and `style` attributes, then downloads the page's HTTPS stylesheets (and their `@import`s, two levels deep) and finds `http://` URLs in `url()` and `@import` – background images and `@font-face` fonts.
3. Reads the `Content-Security-Policy` header / meta tag (`upgrade-insecure-requests`, `block-all-mixed-content`) and the HSTS header.
4. Optionally sends one `HEAD` request to the `https://` version of each insecure URL – if it answers, the fix is simply to change the scheme.
5. **Browser mode (optional):** loads the page in headless Chrome so resources added by JavaScript are found too, and records Chrome's own mixed-content console reports, including whether Chrome *blocked* or *auto-upgraded* the request.
6. **Crawl (optional):** follows links to other pages of the same host until *Maximum pages* is reached; `http://` links to the same host are checked as `https://`.

#### Categories and severity

| Category | Examples | Browser behaviour | Severity |
|---|---|---|---|
| **active** | script, stylesheet (incl. CSS `@import`), iframe, object/embed, web font, manifest, preload, `<base href>` | blocked – the resource does not load | **high** |
| **passive** | image, video, audio, CSS background image | auto-upgraded to HTTPS (breaks if the host has no HTTPS) or shown as "not secure" | **medium** |
| **form** | `<form action="http://…">`, `formaction` | warning before submit; data is sent unencrypted | **medium**, **high** with a password field |
| passive (icon) | `<link rel=icon href="http://…">` | | **low** |

If the page sends `Content-Security-Policy: upgrade-insecure-requests`, browsers fetch every reference over HTTPS instead; findings are then reported as **info** – unless the HTTPS check showed that the HTTPS version does not exist. Every page row gets the highest severity of its findings (`high`, `medium`, `low`, `info` or `none`). A page that is itself served over plain HTTP (or whose HTTPS URL redirects to HTTP) gets severity `high` with a note – mixed content does not apply there, the whole page is unencrypted.

### Who is it for?

- **Website owners and agencies** after an HTTPS migration, a CMS/theme update or a domain move.
- **SEO and QA teams** who need a site-wide list of insecure references with the exact page and element.
- **Developers** who want a cheap scheduled check in CI or as a weekly monitor.

### Input

| Field | Default | Description |
|---|---|---|
| URLs to check | 5 example pages | One per line. Bare domains open as `https://domain/`. |
| Also check linked pages on the same site | off | Same-host crawl. |
| Maximum pages | 20 | Cap for checked pages per run (start URLs + crawled pages). |
| Use a headless browser | off | Finds JavaScript-added resources and Chrome's own reports. Slower, separate price. |
| Check linked stylesheets | on | Downloads HTTPS stylesheets and their `@import`s. |
| Check if the resource exists on HTTPS | on | One HEAD request per insecure URL (max. 30 per page, cached per run). |
| Also list plain http:// links | off | `<a href>` links to http:// pages (not mixed content, but often worth updating). |
| Respect robots.txt when crawling | on | Applies to crawled pages; start URLs are always checked. |
| Browser mode: wait after page load | 2 s | |
| Page timeout | 20 s / 45 s | HTML mode / browser mode. |
| Parallel requests | 10 / 3 | HTML mode / browser mode. |
| Proxy configuration | none | Only needed for sites that block cloud servers. |

### Output example (shortened)

```json
{
  "url": "https://very.badssl.com/",
  "finalUrl": "https://very.badssl.com/",
  "statusCode": 200,
  "pageTitle": "very.badssl.com",
  "pageIsHttps": true,
  "mode": "html",
  "mixedContentFound": true,
  "severity": "high",
  "counts": { "total": 3, "active": 1, "passive": 1, "form": 1, "high": 1, "medium": 2, "low": 0, "info": 0, "hosts": 2 },
  "findings": [
    {
      "url": "http://http.badssl.com/test/imported.js",
      "type": "script",
      "category": "active",
      "element": "<script src>",
      "attribute": "src",
      "foundIn": "html",
      "browserAction": null,
      "severity": "high",
      "httpsAvailable": true,
      "httpsStatus": 200,
      "fix": "Browsers block this request, so the resource does not load. Change the URL to https:// (or a relative URL) or host the file yourself."
    },
    { "url": "http://very.badssl.com/image.jpg", "type": "image", "category": "passive", "element": "<img src>", "foundIn": "html", "severity": "medium", "httpsAvailable": true, "…": "…" },
    { "url": "http://http.badssl.com/resources/form-submitted.html", "type": "form", "category": "form", "element": "<form action>", "hasPasswordField": false, "severity": "medium", "…": "…" }
  ],
  "upgradeInsecureRequests": false,
  "blockAllMixedContent": false,
  "hsts": false,
  "stylesheetsChecked": 1,
  "crawlDepth": 0,
  "checkedAt": "2026-11-20T21:05:12.901Z",
  "error": null
}
```

`foundIn` is `html`, `<style> block`, `style attribute of <div>`, the URL of the stylesheet that contains the reference, `network` or `browser console` (browser mode). In browser mode `browserAction` shows what Chrome did: `blocked`, `auto-upgraded` or `loaded`.

Pages that could not be checked (HTTP 4xx/5xx, DNS errors, timeouts, TLS certificate errors, non-HTML files, invalid input) produce a row with `errorCode` and `error`. The **Overview** table shows URL, severity, counts per category, CSP upgrade and HSTS. The run summary (key-value store record `RUN-SUMMARY`) adds the severity distribution, the most frequent finding types and the hosts that serve insecure content most often.

### Pricing and speed

See the **Pricing** tab. You pay per checked page; **rows for pages that could not be checked are free**. Duplicates are removed. You can set a maximum cost per run – the Actor stops cleanly when it is reached.

The default HTML mode needs no browser and is fast and cheap: one request for the page, one per stylesheet (cached across pages) and one per insecure URL for the HTTPS check; ten pages run in parallel by default, with requests to the same host spaced out. The **browser mode** loads each page in headless Chrome (secure images, media and fonts are skipped to save traffic) and is charged with the separate event "Page checked in headless browser". If you select the Apify proxy group *RESIDENTIAL*, pages are charged with the event "Page checked via Apify residential proxy", which includes the residential traffic.

### Data, licence and privacy

- All data comes from the checked pages themselves; no third-party database or API is used.
- No page content, cookies or form data are stored – only URLs of insecure references, element names, the page title and security headers. Forms are never submitted, no logins.
- HTML mode identifies itself as `mixed-content-checker/0.1 (Apify Actor)`. Please check only websites you own or are allowed to test. Private and internal addresses are refused.
- This Actor is **not affiliated with or endorsed by** badssl.com, Google or any browser vendor. The example pages come from the public test site badssl.com.

### Limits

- HTML mode does not run JavaScript: resources that scripts add later (tag managers, widgets, single-page apps) are only found in browser mode.
- Content inside cross-origin iframes is only covered in browser mode (via Chrome's reports).
- `http://` URLs in inline JavaScript, JSON or `<noscript>` blocks are not reported.
- Implicit favicon requests (`/favicon.ico` without a `<link>`) and redirects of HTTPS resources to HTTP are not followed.
- Stylesheets: max. 25 per page plus `@import`s (2 levels, max. 40 files), each up to 2 MB.
- Sites with strong bot protection may answer with 403 (free row); the browser mode or a proxy can help.

Questions or feature requests? Please open an issue in the **Issues** tab.

# Actor input Schema

## `startUrls` (type: `array`):

HTTPS pages to check, one per line (e.g. https://www.example.com). Bare domains are opened as https://domain/. If empty, a few example pages are checked.

## `crawlSameDomain` (type: `boolean`):

Follow links on the checked pages to other pages of the same website (same host, "www." ignored) until "Maximum pages" is reached. http:// links to the same host are checked as https://.

## `maxPages` (type: `integer`):

Upper limit for checked pages in this run (start URLs plus crawled pages). You pay per checked page, so this also caps the cost.

## `useBrowser` (type: `boolean`):

Off (default): fast and cheap – the HTML and its stylesheets are downloaded and parsed, no JavaScript runs. On: every page is loaded in headless Chrome, so resources added by JavaScript and inside iframes are found too, plus Chrome's own mixed-content messages (blocked / auto-upgraded). Slower and charged with a separate, higher-priced event.

## `checkStylesheets` (type: `boolean`):

Download the page's HTTPS stylesheets (and their @imports, up to 2 levels) and find http:// URLs in url() and @import – e.g. background images and web fonts.

## `checkHttpsAvailability` (type: `boolean`):

For every insecure URL, send one HEAD request to the https:// version (up to 30 per page, each URL once per run). Tells you whether simply changing http:// to https:// fixes the problem.

## `reportInsecureLinks` (type: `boolean`):

Count and list (up to 10 examples) <a href> links to http:// pages. Links are not mixed content, but often worth updating.

## `respectRobotsTxt` (type: `boolean`):

Pages found by the crawl that robots.txt disallows are skipped. The start URLs are always checked.

## `waitAfterLoadSecs` (type: `integer`):

Only in browser mode: extra time after the load event and network idle (max. 10 s), so late scripts can add their resources.

## `pageTimeoutSecs` (type: `integer`):

Pages that do not load within this time are retried once and then reported as a free error row. Default: 20 s (HTML mode), 45 s (browser mode).

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

Maximum pages checked at the same time. Default: 10 (HTML mode, max. 50) or 3 (browser mode, max. 10). Requests to the same host are spaced out politely.

## `proxyConfiguration` (type: `object`):

Optional. Only needed if a site blocks cloud servers. The Apify RESIDENTIAL group is charged with a separate, higher-priced event (it includes the residential traffic).

## Actor input object example

```json
{
  "startUrls": [
    "https://mixed-script.badssl.com/",
    "https://mixed.badssl.com/",
    "https://mixed-form.badssl.com/",
    "https://very.badssl.com/",
    "https://www.wikipedia.org/"
  ],
  "crawlSameDomain": false,
  "maxPages": 20,
  "useBrowser": false,
  "checkStylesheets": true,
  "checkHttpsAvailability": true,
  "reportInsecureLinks": false,
  "respectRobotsTxt": true,
  "waitAfterLoadSecs": 2,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

One item per checked page with all insecure http:// references (type, active/passive, severity, where found, HTTPS availability, fix), plus free rows for pages that could not be checked.

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

Pages with mixed content, severity distribution, most frequent finding types and insecure hosts.

# 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 = {
    "startUrls": [
        "https://mixed-script.badssl.com/",
        "https://mixed.badssl.com/",
        "https://mixed-form.badssl.com/",
        "https://very.badssl.com/",
        "https://www.wikipedia.org/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("adamplaenitz/mixed-content-checker").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 = { "startUrls": [
        "https://mixed-script.badssl.com/",
        "https://mixed.badssl.com/",
        "https://mixed-form.badssl.com/",
        "https://very.badssl.com/",
        "https://www.wikipedia.org/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("adamplaenitz/mixed-content-checker").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 '{
  "startUrls": [
    "https://mixed-script.badssl.com/",
    "https://mixed.badssl.com/",
    "https://mixed-form.badssl.com/",
    "https://very.badssl.com/",
    "https://www.wikipedia.org/"
  ]
}' |
apify call adamplaenitz/mixed-content-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,adamplaenitz/mixed-content-checker"
        }
    }
}
```

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/iKZIY8oWg83xJXjzb/builds/wbWirCrD2ZzKdHivG/openapi.json
