Browsers use response headers to control HTTPS access, scripts, framing, and the information shared with other sites. An audit of HTTP security headers identifies missing or weak browser policies that a normal-looking web page can hide.

The public response matters because a CDN or reverse proxy can add, remove, or replace headers sent by the application. A GET request with curl exposes those headers without rendering the page, and keeps redirect responses separate from the final document.

Policy requirements depend on the resource. A public document, a signed-in page, and an API can legitimately need different cookie, caching, or cross-origin rules. A header audit covers the selected response and its declared policies; it does not prove that the application is free of vulnerabilities or that every route has the same protection.

Steps to audit HTTP security headers:

  1. Select the public HTTPS URL of the resource to audit.

    The sample URL is an anonymous HTML page. The intended resource type and whether it contains private information determine which policies apply. No credentials are needed for a public-page audit.

  2. Capture the response headers and final URL with a GET request.
    $ curl --silent --show-error --location --dump-header - --output /dev/null --write-out '\nFinal URL: %{url_effective}\nHTTP status: %{http_code}\n' https://www.simplified.guide/
    HTTP/2 200 
    content-type: text/html; charset=utf-8
    ##### snipped #####
    cache-control: public, max-age=2678400
    strict-transport-security: max-age=31536000; includeSubDomains
    ##### snipped #####
    Final URL: https://www.simplified.guide/
    HTTP status: 200

    The URL at the end is the replacement point for your own site. –dump-header - prints headers, –output /dev/null discards the downloaded body, and –location follows redirects. Each HTTP/... line starts a separate response block; the last block belongs to Final URL. A redirect's headers do not protect the final page. A GET request avoids the different headers some servers return for HEAD requests.

    A TLS error, an unexpected final hostname, or a login/error response does not establish the intended page's policy. Certificate validation remains enabled; bypassing it would hide a transport failure. Responses can contain session cookies, so cookie values must be removed before sharing the output.

  3. Record the observed value or absence and a reasoned decision for each applicable policy in the final response.

    The audit record includes the URL, response type, observed value or absence, and a decision with a reason. The decision keep means the observed value suits the resource, fix identifies a missing or weak control, and escalate identifies a policy choice or behavior that the response cannot establish.

    Transport. Strict-Transport-Security needs a positive max-age on an HTTPS response. Missing HSTS, max-age=0, or a policy seen only over HTTP leaves that protection absent. includeSubDomains requires HTTPS on all affected subdomains. HSTS behavior

    Scripts and resources. Content-Security-Policy should restrict sources to what the page needs. Missing CSP or overly broad script sources leave a gap; Content-Security-Policy-Report-Only does not block violations. CSP behavior

    Framing. CSP frame-ancestors defines allowed embedding origins; 'none' blocks embedding. X-Frame-Options: DENY or SAMEORIGIN can support older clients, while ALLOW-FROM is obsolete. Missing both controls leaves framing unrestricted by these headers. frame-ancestors is not inherited from default-src.

    MIME handling. X-Content-Type-Options: nosniff should accompany an accurate Content-Type. Missing nosniff or a mismatched MIME type needs attention.

    Referrer information. Referrer-Policy should express the intended disclosure, such as strict-origin-when-cross-origin or no-referrer. unsafe-url exposes paths and queries across sites; an absent header relies on browser defaults.

    Cookies. Session cookies normally need Secure, HttpOnly, and a suitable SameSite value. SameSite=None requires Secure. No Set-Cookie on an anonymous response says nothing about login cookies.

    Caching. Cache-Control: public can suit public content; no-store prevents storage where sensitive content requires it. Public caching of private content is a finding, and no-cache does not prohibit storage.

    Cross-origin access. CORS should grant access only where needed. Credentialed access requires an explicit trusted origin rather than Access-Control-Allow-Origin: *. A GET without an Origin header cannot establish the full CORS policy.

    Header names are case-insensitive. Presence alone does not establish protection, and an HTTP 200 is not a security score. CSP source choices, embedding permissions, and cross-origin access may need application-owner review. Obsolete fields such as X-XSS-Protection and Expect-CT are not substitutes for current policies. OWASP's HTTP security header recommendations provide additional context.

  4. Verify that the audit record accounts for the applicable policies in the captured response.

    For the public HTML response shown above, the result is:

    Policy Audit finding
    HSTS Positive one-year max-age observed; escalate confirmation that every affected subdomain supports HTTPS.
    CSP and framing Fix missing enforced CSP and missing framing controls. Approved script sources and embedding requirements need owner input.
    MIME handling Fix missing X-Content-Type-Options: nosniff; the response declares HTML.
    Referrer policy No explicit header observed; escalate the choice to rely on browser defaults or declare a policy.
    Caching Keep public caching for this anonymous public document; this decision does not cover private pages.
    Cookies and CORS No cookies or CORS headers observed; authenticated cookies and origin-dependent behavior remain outside this capture.

    A completed audit can contain failures and unresolved policy decisions. It is complete when those findings are tied to the captured response, rather than converted into an unsupported all-clear. Different routes, redirects, and authenticated states require their own observations when their policies differ.

Share this guide