Site Health
Real-time site health check — HTTPS enforcement, security headers, robots.txt analysis, and key URL availability.
GET /v1/site-health
Checks a domain's health in real time by probing key URLs. Costs 2 credits.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | The domain to check |
Request
curl "https://api.rankparse.com/v1/site-health?domain=example.com" \
-H "X-API-Key: rp_your_key"Response
{
"data": {
"domain": "example.com",
"https": {
"enforced": true,
"hsts": true,
"hsts_max_age": 31536000
},
"www_redirect": { "enabled": false, "target": null },
"checks": [
{ "url": "https://example.com/", "status": 200, "content_type": "text/html", "response_time_ms": 180 },
{ "url": "https://example.com/robots.txt", "status": 200, "content_type": "text/plain", "response_time_ms": 95 },
{ "url": "https://example.com/sitemap.xml", "status": 200, "content_type": "application/xml", "response_time_ms": 112 }
],
"security_headers": {
"x_frame_options": "SAMEORIGIN",
"x_content_type_options": "nosniff",
"content_security_policy": true,
"strict_transport_security": "max-age=31536000; includeSubDomains",
"referrer_policy": "strict-origin-when-cross-origin"
},
"robots_txt": {
"present": true,
"disallow_all": false,
"sitemap_declared": true
}
},
"credits_used": 2
}Notes
https.enforcedistruewhenhttp://requests redirect tohttps://www_redirect.enabledistruewhenwww.requests redirect to the apex domainchecksarray probes homepage,/robots.txt, and/sitemap.xmlin parallelstatus: nullin a check means the URL was unreachable within 5 seconds