← Blog

Health check URL for SaaS — 5-minute quickstart

Before you buy observability platforms, ship one boring thing: a stable URL that returns HTTP 200 when your app and its critical dependencies are alive. External uptime tools — including StillOnline — only see that URL. They do not read your logs.

This guide is stack-agnostic. For platform-specific routes, continue to Vercel or Railway.

Step 1 — Pick the path

Common choices:

  • GET /health — minimal liveness (process up).
  • GET /api/health — API service behind a gateway.
  • GET /ready — stricter readiness (DB ping) — use only if you accept false negatives during deploys.

Stick to one canonical URL in docs and monitoring. Changing paths later breaks bookmarks and checks.

Step 2 — Implement a fast handler

Rules of thumb:

  • Respond in < 2s (StillOnline times out like most monitors).
  • Return JSON with { "status": "ok" } or plain ok — consistency matters more than schema.
  • Ping Postgres/Redis only if you want downtime when the DB blips; otherwise keep liveness shallow and add a separate deep check on Pro if needed.

Do not put secrets, PII, or stack traces in the body.

Step 3 — Deploy and curl from outside

From any machine not on your laptop:

curl -sS -o /dev/null -w "%{http_code}\n" https://api.yourproduct.com/health

Expect 200. If you get 301, fix redirects (monitors may not follow the chain you expect). If 401, you accidentally protected the health route — loosen it for this path only.

Step 4 — Register in StillOnline

  1. Start free.
  2. New project → name + public status slug (yourproduct).
  3. Add check → paste the full HTTPS URL, method GET, expect 200, interval 5 min (Free).
  4. Open the generated status page and confirm green after 2–3 probe cycles.

Free: 1 project, 1 URL, 24h history. More URLs, private status, API/MCP: Pricing (Pro $9/mo).

Step 5 — Tell humans and agents

  • Link the status page in your app footer and support docs.
  • Subscribe to email updates on the status page for stakeholders.
  • On Pro, wire stillonline-mcp in Cursor to recreate checks after infra churn (MCP post).

What this does not solve

  • SSL expiry — use registrar or dedicated SSL monitors unless you encode it in health (we do not on Free).
  • Background jobs only — if users hit the API but workers are stuck, a shallow /health may lie; add business metrics elsewhere.
  • Local agents (OpenClaw) — publish health via tunnel first (OpenClaw guide).

Choosing a vendor? See Best uptime tools 2026.

FAQ

Root domain or /api/health?

Monitor what customers use. API-first SaaS usually checks the API host path, not the marketing site.

503 vs 200 when DB is down?

Your choice. 503 is honest for readiness; 200 with "db":"error" still fails keyword checks if you add them later. StillOnline Free checks status code only.

Can I use HEAD instead of GET?

Prefer GET unless you verified your host supports HEAD the same way.

One check for staging and production?

Free allows one URL. Use separate accounts, upgrade to Pro for ten URLs, or monitor production only externally.

How is this different from Vercel Analytics?

Analytics measures traffic; health URLs measure availability for alerts and status pages.