Skip to Content

Site Health

Real-time domain health check covering HTTPS enforcement, HSTS, www redirect, security headers and robots.txt.

GEThttps://api.rankparse.com/v1/site-health2 credits (refunded on failure)API key

Probes 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

domainstringrequired

Bare 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

domainstring

The normalized domain you queried (top level and inside data).

dataobject

The health report.

Show properties
httpsobject

enforced: 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_redirectobject

enabled: 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.

checksarray

Three 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_headersobject

From 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_txtobject

present: 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_usedinteger

Always 2 on success.

credits_remaininginteger

Your 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 plain http:// homepage and https://www.<domain>/ (5 seconds each); and, when robots.txt answers 200, 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 or www HEAD 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). checks reports what the HEAD request received, and a non-200 HEAD on robots.txt means present: false.
  • Required fetches. The HTTPS homepage GET is required, and so is the robots.txt body GET once the HEAD answered 200. 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

HTTPCodeWhen
400invalid_urldomain is missing, not a bare domain (scheme, path, port or invalid characters), or longer than 253 characters.
400private_ipThe domain is a private, reserved or local host (for example a literal private IP).
400fetch_failedThe HTTPS homepage (or the robots.txt body) could not be fetched. Refunded.
400timeoutThe HTTPS homepage did not respond within 8 seconds. Refunded.
400response_too_largeThe homepage or robots.txt exceeded 2 MB. Refunded.
401invalid_api_keyMissing, invalid or revoked API key.
402insufficient_creditsBalance is lower than 2 credits.
402spend_cap_reachedYour monthly spend cap is reached.
429rate_limitedMore 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.

MCP tool: get_site_health (argument domain).