Skip to content

Main content

HSTS Include Sub Domains Flag Tool

Detect a standalone case-insensitive includeSubDomains directive in an HSTS field value; this is not a complete HSTS policy validator.

Loading tool…

Description

Reject CR/LF and split headerValue at semicolons outside quoted strings, respecting backslash escapes inside quotes.

HTTP response headers and content-security tokens carry separate pieces of a browser policy. Recognizing one directive or formatting one token does not establish that the complete policy is valid or effective.

Reject CR/LF and split headerValue at semicolons outside quoted strings, respecting backslash escapes inside quotes.

When to use this tool

Use HSTS Include Sub Domains Flag when you need a narrowly scoped header component check or formatter before assembling and testing a complete response policy.

How to use the tool and how it works

  1. Enter headerValue. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read includeSubDomains. Inspect includeSubDomains before interpreting the associated values.

Reject CR/LF and split headerValue at semicolons outside quoted strings, respecting backslash escapes inside quotes. Require closed quoting, trim spaces and tabs around directives, and detect an exact case-insensitive includeSubDomains token.1

includeSubDomains extends a valid HSTS policy to subdomains. Its presence alone does not establish an effective policy: max-age=0 removes the cached policy, including its subdomain setting.2

Input fieldMeaning and unitsAccepted input
headerValueHSTS header value only, without the field name. This is a lexical directive-presence check.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
includeSubDomainsInclude Sub DomainsRequired. Boolean.
json
{
  "input": {
    "headerValue": "max-age=31536000; includeSubDomains"
  },
  "output": {
    "includeSubDomains": true
  }
}

Limitations and assumptions

  • This does not validate max-age, duplicate directives, TLS delivery, or the complete HSTS policy; a value-bearing includeSubDomains spelling does not match.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Parse the complete header and test its behavior in the intended browser when policy effectiveness matters.

References

  1. Calculation and input contract: web/hsts-include-sub-domains-flag — tool.io

  2. HTTP Strict Transport Security (HSTS), RFC 6797 — RFC Editor / IETF

Similar or alternative tools