This site is not affiliated with or endorsed by Cloudflare, Inc. It showcases deployable experiments across most Cloudflare products.

Blog18 min read

Check if a website is down from Cloudflare's network

Build production-grade edge reachability checks on Cloudflare Workers - fetch timing, DNS pairing, cron alerts, error codes, and the Is It Down experiment.

Dense network cabling inside a data center rack
Photo by Taylor Vick on Unsplash

When a site “looks down,” the truth often depends on where you measure from. Your laptop, a single VPS, and Cloudflare’s edge can all disagree. Probing from Cloudflare’s network gives a view closer to how many users reach origins through the edge - and it is straightforward to expose as a small Worker API using the platform Fetch API.

This guide covers definitions of “down,” probe design, pairing diagnostics, scheduled alerts, and the Is It Down experiment you can deploy today.

Cloudflare products in this pattern

ProductRoleDocs
WorkersTimed probe APIEdge compute
FetchOutbound HTTP from the edgeRuntime API
request.cfColo / network context for the probe itselfRequest properties
Cron TriggersScheduled uptime checksTriggers
D1 (optional)Store check historySQL
Email Workers / send_emailAlert deliveryEmail
Radar (adjacent)Broader internet health / ASN contextRadar API

What “down” should mean

Be explicit. For APIs and status tools, a useful definition is:

  • DNS resolves (optional separate check)
  • TCP/TLS succeeds
  • An HTTP response returns within a timeout
  • Optionally: status is not 5xx

A site can return 200 with a broken app, or 503 while intentionally in maintenance. Encode the policy in your JSON so clients do not guess.

Example success payload:

{
  "url": "https://example.com",
  "ok": true,
  "status": 200,
  "latencyMs": 142
}

Document redirect policy: follow or not, and max hops. Open redirects and file: schemes must be rejected by URL validation.

Edge probe architecture

Client → Worker → timed fetch(url) → JSON { ok, status, latencyMs }

Worker responsibilities:

  1. Validate url (http/https) with a shared helper
  2. Time the request (performance marks or Date.now())
  3. Catch network failures as structured errors (FETCH_ERROR)
  4. Never follow redirects into private or non-http(s) schemes
  5. Optionally attach probe colo from request.cf

Do not turn this into a full uptime SaaS on day one. Ship the probe, then add schedules and storage.

Pair diagnostics instead of one mega-endpoint

When an origin fails, operators want more than a boolean. Compose focused Cloudflare-backed experiments:

QuestionExperimentProduct angle
Is it reachable?Is It DownWorkers Fetch
What headers came back?Response HeadersFetch
Does DNS look sane?URL DNS LookupDNS via Workers
Cron + email alerts?Uptime Monitor AlertsCron Triggers + D1 + email
Multi-region latency?Multi-POP Latency MapWorkers across POPs

Wire them from a status page, chatops bot, or MCP tool. Each stays under ~60 seconds and single-purpose.

Scheduled monitoring with Cron Triggers

Cron Triggers let a Worker run on a schedule without an external scheduler:

Cron → Worker scheduled handler → probe targets → write D1 → email on failure

That is the path Uptime Monitor Alerts demonstrates. Use the one-shot Is It Down API for ad-hoc checks and agent tools; use cron when you need history and pages.

Operational cautions

  • Respect robots and ToS for third-party targets; this is a diagnostic tool, not a scraper
  • Rate-limit public deployments - open probes get abused as free scanners
  • Timeouts beat hanging Workers; fail with FETCH_ERROR
  • One colo ≠ global truth - a single Worker invocation runs in one location; sample multiple regions if you need that story
  • TLS and SNI - some failures are certificate issues; pair with an SSL inspector experiment when needed

Error codes worth standardizing

CodeMeaning
INVALID_URLBad or missing URL
FETCH_ERRORNetwork / TLS / timeout
UNEXPECTED_STATUSOptional: non-2xx treated as down

Keep codes stable so dashboards and agents can branch without scraping English messages.

Deploy and verify

  1. Read Workers Fetch once for semantics (redirects, cf properties)
  2. Deploy Is It Down
  3. Call it with a known-good URL and a known-bad host
  4. Confirm JSON error codes for invalid input
  5. Graduate to Uptime Monitor Alerts when you need cron + history

You get a tested reachability Worker with the same error conventions as the rest of the catalog - ready to embed in bigger monitoring flows built on Cloudflare products rather than a random VPS cron.

Production checklist

  1. Define “down” in writing (status codes, timeouts, redirect policy).
  2. Separate ad-hoc probes (Is It Down) from scheduled monitors (Uptime Monitor Alerts + Cron Triggers).
  3. Store history in D1 if humans need trends.
  4. Alert via email/webhook - avoid paging on single blips; require N failures.
  5. Rate-limit public probe APIs.
  6. Pair with DNS and header inspectors before declaring “origin broken.”

Multi-region truth

A single Worker invocation sees one colo. If you need “down globally,” sample multiple regions or accept that your probe is “down from Cloudflare’s network in colo X.” Document that limitation next to the green/red badge.

FAQ

Is this a replacement for paid uptime SaaS?

It is a building block. You own alerting, multi-region sampling, and SLAs. Many teams start here then graduate complexity only where needed.

Can I probe internal hosts?

Only if the Worker can reach them (public internet or appropriately configured tunnels/services). Private RFC1918 targets usually fail from the public edge.

Related experiments

These deployable references implement the patterns in this article. Open the docs for API details, then Deploy or clone the source.

  • Is It Down? - Check if a website is reachable from Cloudflare's edge network - uptime and latency probe API for any URL
  • Response Headers - Inspect HTTP response headers for any URL from Cloudflare's edge - security, cache, and CORS header debugging
  • URL DNS Lookup - DNS lookup for any URL's hostname via Cloudflare DNS-over-HTTPS (1.1.1.1) - A, AAAA, MX, TXT, and more from a Worker
  • Uptime Monitor Alerts - Persistent URL monitors with D1 history, cron checks, and email alerts on downtime - edge uptime monitoring starter
  • Multi-PoP Latency Map - Measure fetch latency and report the Cloudflare colo that served the Worker - edge PoP latency visibility for any URL

Cloudflare Experiments is an independent open-source catalog - not affiliated with Cloudflare, Inc.