Site Health
Real-time domain health check covering HTTPS enforcement, HSTS, www redirect, security headers and robots.txt.
https://api.rankparse.com/v1/site-health2 credits (refunded on failure)API keyProbes a domain's homepage, robots.txt and sitemap.xml at request time and reports transport and header hygiene: whether plain HTTP redirects to HTTPS, whether HSTS is set, how www. behaves, which security headers the homepage sends, and what robots.txt declares. This is a live check, not link graph data.
Query parameters
domainstringrequiredBare domain such as stripe.com. No scheme, path or port. Up to 253 characters of letters, digits, hyphens and dots, with at least one dot. It is lowercased. A missing or invalid value returns 400 invalid_url (or private_ip) before any charge.
Response
domainstringThe normalized domain you queried (top level and inside data).
dataobjectThe health report.
Show propertiesHide properties
httpsobjectenforced: true when a request to http://<domain>/ ends up on an https:// URL after redirects (false also when that probe failed). hsts: true when the homepage response carries a Strict-Transport-Security header. hsts_max_age: its max-age in seconds, or null.
www_redirectobjectenabled: true when https://www.<domain>/ ends up on a URL that does not contain www.<domain> (it redirects to the apex or elsewhere). Always false when the domain already starts with www. or the probe failed. target: the final URL of that probe when enabled is true, else null.
checksarrayThree entries, in order: homepage, /robots.txt, /sitemap.xml. Each has url, status (final HTTP status after redirects), content_type (lowercased, without parameters) and response_time_ms. All three values are null when that probe failed.
security_headersobjectFrom the homepage response: x_frame_options, x_content_type_options, strict_transport_security and referrer_policy (raw header values or null), and content_security_policy (true when a CSP header is present; the policy itself is not returned).
robots_txtobjectpresent: true when /robots.txt answered 200. sitemap_declared: true when the file contains a Sitemap: line. disallow_all: a heuristic, true when the file contains any Disallow: rule starting with / and a User-agent: * line anywhere. It does not parse groups, so it is also true for a file that only disallows a subpath. Read the file yourself when this matters.
credits_usedintegerAlways 2 on success.
credits_remainingintegerYour balance after the charge.
Behavior and limits
- What is fetched. One GET of the HTTPS homepage (8 second timeout, 2 MB cap, up to 5 redirects); HEAD requests for
/robots.txt,/sitemap.xml, the plainhttp://homepage andhttps://www.<domain>/(5 seconds each); and, whenrobots.txtanswers200, a GET of its body (8 seconds, 2 MB). Security headers and HSTS come from the homepage response. Fetch rules are the same as Page SEO. - Optional probes degrade quietly. If the
robots.txt,sitemap.xml, HTTP orwwwHEAD probe fails or times out, the rest of the report is still returned. - HEAD quirks. Some servers answer HEAD differently from GET (for example
405).checksreports what the HEAD request received, and a non-200HEAD onrobots.txtmeanspresent: false. - Required fetches. The HTTPS homepage GET is required, and so is the
robots.txtbody GET once the HEAD answered200. If either fails, the whole call fails with that fetch error and is refunded. - Credits: 2 per call, refunded on any non-2xx response. Invalid or private domains are rejected before billing. No caching.
- Rate limit: 60 requests per minute per key. See Rate limiting.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_url | domain is missing, not a bare domain (scheme, path, port or invalid characters), or longer than 253 characters. |
| 400 | private_ip | The domain is a private, reserved or local host (for example a literal private IP). |
| 400 | fetch_failed | The HTTPS homepage (or the robots.txt body) could not be fetched. Refunded. |
| 400 | timeout | The HTTPS homepage did not respond within 8 seconds. Refunded. |
| 400 | response_too_large | The homepage or robots.txt exceeded 2 MB. Refunded. |
| 401 | invalid_api_key | Missing, invalid or revoked API key. |
| 402 | insufficient_credits | Balance is lower than 2 credits. |
| 402 | spend_cap_reached | Your monthly spend cap is reached. |
| 429 | rate_limited | More than 60 requests in a minute. |
Unlike Page SEO, Tech Stack and Schema Markup, which answer 503 when the target is unreachable, Site Health answers 400 with fetch_failed or timeout. Branch on code, not on the status, to treat them the same way.
See Errors for the shared error format.
Related
MCP tool: get_site_health (argument domain).