Is It Down?
Check if a website is reachable from Cloudflare's edge network - uptime and latency probe API for any URL
Check whether any website is reachable from Cloudflare's edge, with response time, status code, and edge location information.
API Reference
GET /check
Checks if the specified URL is reachable and returns timing and status information.
Prop
Type
Example Request
curl "https://your-worker.workers.dev/check?url=https://www.cloudflare.com"Success Response (Reachable)
status string
Reachability status: "reachable" or "unreachable"
responseTime number
Round-trip response time in milliseconds
statusCode number
HTTP status code returned by the target server
colo string
Cloudflare edge data center (IATA code) that served this check (only available when deployed)
{
"status": "reachable",
"responseTime": 87,
"statusCode": 200,
"colo": "LHR"
}Success Response (Unreachable)
error string
Error message explaining why the site is unreachable (only present when status is "unreachable")
{
"status": "unreachable",
"responseTime": 5000,
"statusCode": 0,
"colo": "SFO",
"error": "The operation was aborted."
}Error Response
{
"error": "Missing or invalid query parameter: url",
"code": "INVALID_URL"
}Error Codes
400- Missing or invalidurlparameter (not http/https)
Use Cases
- Monitor website availability from the edge
- Measure response times from different geographic locations
- Build uptime monitoring tools
- Check if a site is down globally or just from your location
Limitations
- Checks from the edge colo serving the request, not from every region globally
- Fetch timeout may mark slow but reachable sites as down
- HTTP reachability only; no SSL certificate or DNS health checks
Use in your project
Copy these files into an existing Worker. Prefer Deployment to try the full experiment first. Source: apps/experiments/is-it-down.
import { FETCH_TIMEOUT_MS } from "../constants/defaults";export interface FetchResult { ok: boolean; statusCode: number; responseTimeMs: number; error?: string;}/** * Fetches a URL and returns status and response time. * Uses AbortController for timeout. */export async function fetchWithTiming(url: string): Promise<FetchResult> { const start = Date.now(); const controller = new AbortController(); const timeoutId = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS); try { const res = await fetch(url, { method: "GET", signal: controller.signal, headers: { "User-Agent": "Cloudflare-Experiments-IsItDown/1.0" }, }); const responseTimeMs = Date.now() - start; clearTimeout(timeoutId); return { ok: res.ok, statusCode: res.status, responseTimeMs, }; } catch (e) { clearTimeout(timeoutId); const responseTimeMs = Date.now() - start; const message = e instanceof Error ? e.message : "Unknown error"; return { ok: false, statusCode: 0, responseTimeMs, error: message, }; }}Deployment
Deploy
Follow the deployment wizard to deploy the Worker to your Cloudflare account. No additional configuration required.
Test your deployment
curl "https://your-worker.workers.dev/check?url=https://example.com"Local Development
cd apps/experiments/is-it-down
npm install
npm run devTest locally:
curl "http://localhost:8787/check?url=https://www.cloudflare.com"The colo field will not be populated during local development. It only appears when deployed to Cloudflare Workers.
Cloudflare Features Used
- Workers - Edge compute runtime
- Fetch API - HTTP requests with timing
- Edge network - Request metadata including data center location