HTTP Header & Redirect Checker

HTTP Header & Redirect Checker API

Web Development

Check any URL's redirect chain and HTTP response headers, with the status code and timing of every hop and a security-headers grade explained in plain words.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

20 requests per minute

Endpoints

1 endpoint available

Overview

Request a URL from our server, follow its redirect chain one hop at a time, and get each hop's status code, target, IP, timing and response headers. The final response's security headers are graded from A+ to F, the same way the HTTP Header & Redirect Checker page grades them.

Notes

  • Send fields as query parameters (GET) or in a JSON body (POST).
  • Up to 10 requests per check (the first plus 9 redirects), 8 seconds per hop, 25 seconds in total.
  • Only http and https on port 80, 443 or a port from 1024 up are allowed. Hostnames that resolve to private, loopback, link-local or other reserved addresses are refused, on every hop.
  • Only headers are read; the response body is never downloaded. Requests go out over HTTP/1.1 with no cookies.
  • Headers are returned as [name, value] pairs in the order sent, with original casing and duplicates kept.
  • If the first request fails the API returns an error. If a later hop fails, the result comes back with final: null and a stopped object that says why.
  • Certificate problems do not stop the check; they show up in the hop's tls field.
  • security is null when there is no final response. Its checks array always has six entries: hsts, csp, xcto, frame, referrer and permissions (the example below shows two).

Endpoints

GET
https://opentools.ca/api/v1/tools/http-header-checker
Follow a URL's redirects and return every hop's headers plus a security-headers grade. POST with the same fields in a JSON body also works.

Query Parameters

ParameterTypeRequiredDescription
url
string
Required
URL to check, e.g. example.com or https://example.com/page. https:// is added when no scheme is given. Max 2048 characters.
method
string
Enum: GET, HEAD
OptionalHTTP method to send on every hop.Default: GET
userAgent
string
Enum: chrome, iphone, googlebot, curl, opentools
OptionalUser-Agent preset to send: Chrome desktop, Safari on iPhone, Googlebot, curl, or the OpenTools checker.Default: chrome

Response Example

{
  "success": true,
  "requestedUrl": "http://example.com/",
  "method": "GET",
  "userAgent": "chrome",
  "hops": [
    {
      "url": "http://example.com/",
      "method": "GET",
      "ip": "93.184.215.14",
      "status": 301,
      "statusText": "Moved Permanently",
      "httpVersion": "1.1",
      "timeMs": 84,
      "location": "https://example.com/",
      "headers": [
        [
          "Location",
          "https://example.com/"
        ],
        [
          "Content-Length",
          "0"
        ]
      ],
      "tls": null
    },
    {
      "url": "https://example.com/",
      "method": "GET",
      "ip": "93.184.215.14",
      "status": 200,
      "statusText": "OK",
      "httpVersion": "1.1",
      "timeMs": 142,
      "location": null,
      "headers": [
        [
          "Content-Type",
          "text/html; charset=UTF-8"
        ],
        [
          "Strict-Transport-Security",
          "max-age=31536000; includeSubDomains"
        ],
        [
          "X-Content-Type-Options",
          "nosniff"
        ]
      ],
      "tls": {
        "authorized": true,
        "error": null,
        "protocol": "TLSv1.3"
      }
    }
  ],
  "final": {
    "url": "https://example.com/",
    "method": "GET",
    "ip": "93.184.215.14",
    "status": 200,
    "statusText": "OK",
    "httpVersion": "1.1",
    "timeMs": 142,
    "location": null,
    "headers": [
      [
        "Content-Type",
        "text/html; charset=UTF-8"
      ],
      [
        "Strict-Transport-Security",
        "max-age=31536000; includeSubDomains"
      ],
      [
        "X-Content-Type-Options",
        "nosniff"
      ]
    ],
    "tls": {
      "authorized": true,
      "error": null,
      "protocol": "TLSv1.3"
    }
  },
  "stopped": null,
  "totalMs": 231,
  "checkedAt": "2026-11-25T15:04:05.000Z",
  "security": {
    "grade": "D",
    "score": 45,
    "checks": [
      {
        "id": "hsts",
        "name": "Strict-Transport-Security",
        "status": "pass",
        "points": 25,
        "maxPoints": 25,
        "value": "max-age=31536000; includeSubDomains",
        "about": "Tells browsers to only ever use HTTPS for this site, so a connection cannot be quietly downgraded to plain HTTP.",
        "verdict": "Set with a long max-age, covering subdomains."
      },
      {
        "id": "csp",
        "name": "Content-Security-Policy",
        "status": "fail",
        "points": 0,
        "maxPoints": 25,
        "value": null,
        "about": "Lists where scripts, styles, images and frames may load from. The strongest defence against cross-site scripting (XSS).",
        "verdict": "Missing. Start with a report-only policy, then enforce it once it stops reporting problems."
      }
    ],
    "notes": []
  }
}

Error Codes

400
Invalid URL, scheme or port, or the host points to a private or reserved address
401
Missing or invalid API key
403
API key inactive, expired, or not allowed from this IP
404
The domain does not exist or has no IP addresses
429
Rate limit exceeded
500
Internal server error
502
The site refused the connection, closed it, or did not answer with valid HTTP or TLS
504
The site did not respond in time

Code Examples

curl "https://opentools.ca/api/v1/tools/http-header-checker?url=http://example.com&userAgent=googlebot" \
  -H "Authorization: Bearer YOUR_API_KEY"

Ready to get started?

Create an API key to start using the HTTP Header & Redirect Checker API.

Rather use it in your browser? Open the HTTP Header & Redirect Checker