Check all deployed LP domains for uptime, SSL validity, and DNS correctness
Periodically verify that all deployed landing page domains are live, SSL is valid, and DNS records point to the correct Cloudflare Pages project.
Run on cron every 6 hours. Alert immediately when a domain goes down, SSL is expiring soon, or DNS is misconfigured.
Required environment variables:
LP_API_BASE: LP Factory API base URL (e.g., https://your-worker.workers.dev)TELEGRAM_BOT_TOKEN: Telegram bot API tokenTELEGRAM_CHAT_ID: Target chat IDFetch all active sites:
curl -s "${LP_API_BASE}/sites" | jq '.sites[] | select(.status == "active")'
For each domain, run 3 checks:
HTTP Check — Domain responds with 200:
curl -sL -o /dev/null -w "%{http_code}" --max-time 10 "https://${DOMAIN}"
SSL Check — Certificate not expiring within 7 days:
echo | openssl s_client -servername ${DOMAIN} -connect ${DOMAIN}:443 2>/dev/null | openssl x509 -noout -enddate
DNS Check — CNAME points to *.pages.dev:
dig +short CNAME ${DOMAIN}
Collect failures and send single Telegram summary.
Domain Health: All 15 domains OK
Next check: 6 hours
DOMAIN HEALTH ALERT
DOWN (HTTP != 200):
- badloan.com (503)
- quickcash.net (timeout)
SSL EXPIRING (<7 days):
- fastoffer.com (expires Mar 25)
DNS MISMATCH:
- newloan.com (CNAME -> old-project.pages.dev)
Healthy: 12/15 domains
openclaw cron add \
--name "LP Domain Health" \
--cron "0 */6 * * *" \
--session isolated \
--message "Run domain health check on all active LP Factory sites. Check HTTP status, SSL expiry, and DNS CNAME for each domain. Report issues via Telegram." \
--announce --channel telegram