Fact-checked by Grok 2 weeks ago

HTTP Strict Transport Security

HTTP Strict Transport Security () is a security policy mechanism that enables HTTP websites to declare themselves accessible only over secure connections, instructing user agents like web browsers to automatically upgrade any HTTP requests to and reject insecure connections for the specified . This opt-in enhancement protects against man-in-the-middle attacks, protocol downgrade exploits, and the unintended leakage of sensitive data via HTTP, such as . Specified in RFC 6797 as an IETF standards-track protocol and published in November 2012, operates by having the server include a Strict-Transport-Security HTTP response header in valid responses. The header defines an through required and optional directives: max-age specifies the duration in seconds (e.g., 31536000 for ) during which the applies, while includeSubDomains optionally extends enforcement to all subdomains of the host. An additional preload directive, introduced later, signals eligibility for inclusion in browser preload lists when combined with a max-age of at least and includeSubDomains. The header must be sent exclusively over secure transport to prevent , and user agents maintain a list of known hosts, applying the across all ports but only to domain names, not IP addresses. Upon receiving a valid HSTS header, compliant user agents the policy and rewrite future HTTP URIs for the host to , refusing connections if fails or presents certificate errors. does not retroactively secure initial HTTP visits, leaving sites vulnerable until the policy is established, but preload lists address this by hardcoding policies into browser binaries for immediate enforcement on . The official preload submission site manages entries for major browsers, requiring sites to serve valid headers and certificates. HSTS enjoys broad adoption, with full support in all modern web browsers including (since version 4), Mozilla Firefox (since version 4), Apple Safari (since version 7), , and . As of 2025, it remains a foundational practice for HTTPS-only standards, recommended by organizations like for enhancing transport layer protection.

History and Specification

Origins and Development

HTTP Strict Transport Security () originated as a response to vulnerabilities in deployments, particularly SSL stripping attacks demonstrated by security researcher at DC 2009, where an attacker could transparently downgrade secure connections to unencrypted HTTP, enabling eavesdropping and . This attack highlighted the risks of browsers and users accepting mixed HTTP/HTTPS content, prompting the need for a mechanism to enforce strict HTTPS-only access for sensitive web applications. The foundational work began with a titled "ForceHTTPS: Protecting High-Security Web Sites from Network Attacks" by Collin Jackson and Adam Barth, which proposed an opt-in policy using to mandate and mitigate protocol downgrades, cookie hijacking, and mixed content issues in high-value sites like . This evolved into the first HSTS draft specification, published on September 18, 2009, by Jeff Hodges of , Collin Jackson of , and Adam Barth of the , refining the approach into an HTTP response header to declare sites as -only and prevent downgrade attacks by network adversaries. Early discussions of occurred in web communities during 2009–2010, with active involvement from browser vendors; for instance, engineers, led by Sid Stamm, initiated implementation efforts in through tickets starting in late 2009, integrating the policy to block HTTP requests to opted-in domains and addressing error handling to enhance user protection against man-in-the-middle threats. These conversations, shared via mailing lists like W3C's www-archive and IETF working groups, emphasized 's role in bolstering web security without requiring widespread infrastructure changes.

RFC Publication and Revisions

HTTP Strict Transport Security (HSTS) was formally standardized by the (IETF) through RFC 6797, titled "HTTP Strict Transport Security (HSTS)", published on November 19, 2012, as a Proposed Standard. The document was authored by Jeff Hodges, Collin Jackson, and Adam Barth, who detailed the protocol's syntax, semantics, and deployment guidelines to mitigate protocol downgrade attacks and cookie hijacking. Post-publication, several errata were reported to clarify aspects of the specification, though none resulted in official updates. Notably, ID 5372, reported on May 29, 2018, addressed potential contradictions in how user agents should update caches for the max-age and includeSubDomains directives, specifically reconciling behaviors described in sections 8.1 and 11.2 of the . Another relevant clarification came via ID 4075, reported on August 8, 2014, which highlighted vulnerabilities related to the includeSubDomains directive in scenarios involving cookie injection attacks and proposed mitigations like background fetches, though it emphasized no changes to the core policy mechanics. All reported errata for RFC 6797—totaling five as of late 2024—were ultimately rejected, serving primarily as interpretive guidance rather than amendments. As of 2025, RFC 6797 remains the definitive specification for HSTS, with no major revisions issued by the IETF. Ongoing discussions within IETF working groups, such as those on web security evolution in the context of HTTP/2 and beyond, have referenced HSTS but focused on complementary enhancements like certificate transparency rather than overhauling the original protocol.

Mechanism Overview

Header Structure and Directives

The Strict-Transport-Security (STS) header is an HTTP response header that declares a web site's intention to communicate exclusively over secure HTTPS connections, with its syntax defined in RFC 6797. The header follows the Augmented Backus-Naur Form (ABNF) notation: Strict-Transport-Security = "Strict-Transport-Security" ":" OWS [ strict-transport-security-field-value ] OWS, where strict-transport-security-field-value consists of one or more directives separated by semicolons, each optionally including a value. Directives are case-insensitive, and their order does not matter; unrecognized directives are ignored by user agents. If multiple STS headers appear in a response, only the first valid one is processed. The required max-age directive specifies the time, in seconds, for which the HSTS policy applies after reception, expressed as a non-negative (with a value of 0 effectively removing any existing policy). Servers must include exactly one max-age directive per header; duplicate or invalid values (such as negative numbers or non-integers) render the header invalid. While the minimum value is 0, a value of at least 31536000 seconds (one year) is recommended for effective protection and eligibility for browser preload lists. The optional includeSubDomains directive, which takes no value, extends the HSTS policy to all subdomains of the host sending the header. It must appear at most once; including a value (e.g., includeSubDomains=yes) invalidates the directive. A non-standard optional preload directive, recognized by major browsers but not defined in RFC 6797, signals the site owner's consent for inclusion in hardcoded browser preload lists to enforce before a user's first visit. Like includeSubDomains, it appears at most once and must not include a value; when present, max-age must be at least 31536000 and includeSubDomains must be included for preload submission eligibility. Valid header examples include:
Strict-Transport-Security: max-age=31536000
Strict-Transport-Security: max-age=31536000; includeSubDomains
Strict-Transport-Security: max-age=15768000; includeSubDomains; preload
These conform to RFC 6797 by including a single required max-age directive with a non-negative value and optional valueless directives separated by semicolons, allowing optional whitespace. Invalid cases encompass multiple max-age directives (e.g., Strict-Transport-Security: max-age=31536000; max-age=0), valued optional directives (e.g., Strict-Transport-Security: includeSubDomains=true), or non-integer max-age values (e.g., Strict-Transport-Security: max-age=one-year), all of which cause user agents to ignore the header per the specification.

Enforcement and Policy Application

When a receives the Strict-Transport-Security () header over a valid connection, it stores the HSTS policy for the specified host in its local , associating the policy with the , the maximum age (max-age) value in seconds, and any applicable directives such as includeSubDomains. The max-age directive determines the policy's expiration time; upon expiration, the entry is evicted from the cache, and the host is no longer treated as an HSTS host unless a new policy is received. This storage occurs only after the initial secure connection, ensuring the policy is not applied based on insecure transmissions. Once stored, the policy is enforced on all subsequent requests to the host by automatically upgrading any HTTP requests to equivalents, rewriting the scheme and default port (from 80 to 443 if necessary). If the connection encounters any security errors, such as an invalid , the terminates the connection without providing user options to bypass or proceed, thereby preventing insecure access. This enforcement applies across all ports for the host, ensuring comprehensive protection against downgrade attacks. The includeSubDomains directive, if present, extends the policy to all subdomains of the host, inheriting the same max-age and enforcement rules without requiring separate headers for those subdomains. In contrast, preloaded policies—distributed via vendor-maintained lists embedded in s—enable stricter enforcement from the outset, applying the policy to the host and its subdomains without necessitating an initial visit to receive the header. This preload mechanism mitigates man-in-the-middle risks during the first connection by treating prelisted hosts as known hosts immediately upon startup.

Applicability and Scope

Activation Conditions

HTTP Strict Transport Security () becomes active for a website only after a establishes a secure connection to the server and receives a valid Strict-Transport-Security response header without any underlying errors or warnings. Upon successful receipt, the caches the host as a Known HSTS Host and enforces the policy for the duration specified by the max-age directive, typically measured in seconds. This initial requirement ensures that the policy declaration occurs over a protected , preventing interception or tampering during transmission. Sites accessible solely via HTTP cannot activate HSTS, as user agents must ignore any Strict-Transport-Security header received over insecure HTTP connections to avoid policy injection by attackers. Consequently, administrators of HTTP-only sites must first enable support, including a valid TLS , before deploying the header; without this, the policy remains unenforced and visitors remain vulnerable to downgrade attacks on initial requests. To mitigate risks associated with first-time visits—where an attacker could intercept an initial HTTP request and redirect to a malicious site— activation can occur proactively through prior visits or integration with preload lists. In the case of prior visits, if a user has previously connected via and the cached policy remains valid (i.e., max-age has not expired), the automatically upgrades subsequent HTTP requests to without needing to re-receive the header. Preload lists, maintained by browser vendors, embed policies directly into configurations, enabling enforcement from the very first connection to preloaded domains and bypassing the need for an initial secure visit. The activation process interacts closely with TLS certificate validity, as any certificate errors, such as expiration, mismatch, or , result in connection failure, preventing the header from being received or processed. User agents treat such errors as fatal during HSTS policy retrieval, ensuring that only sites with trustworthy TLS configurations can enforce the policy, thereby reinforcing overall transport security without user intervention.

Domain Matching and Coverage

HSTS policies apply to the from which the Strict-Transport-Security header is received via a congruent , where the requested host's exactly matches the host's using an ASCII case-insensitive, label-by-label comparison. This ensures the policy is enforced precisely for the specified host without unintended extension. The optional includeSubDomains directive modifies this scope by asserting that the policy also covers all s, enabling superdomain matches where the requested host is a of the host (e.g., a policy received on example.com with includeSubDomains applies to www.example.com or api.example.com). Without this directive, subdomains must receive and assert their own policies independently. To avoid overreach where a superdomain match could enforce the policy across unrelated registrable domains, user agents employ public suffix lists, such as Mozilla's Public Suffix List (PSL), to delineate the registrable (or effective top-level) domain and restrict matching accordingly. For instance, if an HSTS policy with includeSubDomains is set on example.co.uk (where co.uk is a public suffix), it extends only to subdomains like sub.example.co.uk but not to separate registrable domains like other.co.uk, preventing broad enforcement beyond the owner's control. This integration of the PSL ensures domain coverage aligns with administrative boundaries defined by domain registrars and top-level domain operators. Additionally, owners of public suffixes like TLDs can submit for preloading across all registrable domains under their control, as seen with the .gov preload effective since 2020 and maintained as of 2025. Per the specification, user agents must not recognize IP addresses (including IP literals or IPv4 addresses) as known HSTS hosts, limiting policies to domain names for compatibility with practices. is not explicitly addressed in the but is treated as a special case in implementations, often with its public suffix defined as "localhost" to avoid unintended policy application during local development; for example, although browsers resolve to addresses (127.0.0.1 or ::1) and enforce HSTS policies on it if received, this can disrupt local development, leading developers to clear the HSTS state or disable enforcement via browser settings. For or non-conforming domain names, user agents must ignore the Strict-Transport-Security header entirely to prevent malformed policies from disrupting access.

Support and Compatibility

Browser and Client Implementation

HTTP Strict Transport Security (HSTS) enjoys widespread implementation across major web browsers, enabling them to enforce HTTPS-only connections for specified domains. Google Chrome introduced full HSTS support in version 4.0, released on January 25, 2010. Mozilla Firefox added comprehensive support starting with version 4.0, launched on March 22, 2011. Apple Safari implemented HSTS from version 7.0, which debuted on October 22, 2013, as part of OS X Mavericks. Microsoft Edge provided support from its initial release (version 20, using EdgeHTML 12) on July 29, 2015. Internet Explorer versions 6 through 10 lacked support entirely, while 11 received it through a security update on June 9, 2015. By 2025, adoption is universal in mobile browsers, encompassing for (), on (from 7.0 in 2013), (from 4.0 in 2016), and others, contributing to over 95% global browser compatibility. Non-browser clients have also incorporated HSTS enforcement to mitigate downgrade attacks in scripted or automated scenarios. The curl tool added full support in version 7.77.0, released in October 2020, allowing it to parse and apply policies for subsequent requests. wget has supported HSTS by default since version 1.17, released in November 2015, storing domain policies in a local .wget-hsts file to ensure HTTPS redirection. In API frameworks, the Node.js http module facilitates setting HSTS headers on the server side but lacks built-in client-side enforcement; developers typically use libraries like for policy implementation or undici for client-side HSTS handling in contexts. Modern browser implementations often integrate HSTS with preload lists for proactive protection on initial visits.

Preload List Integration

The HSTS preload mechanism involves browser-maintained lists of domains that enforce Strict Transport Security policies proactively, without requiring an initial HTTP response to set the header. These lists are hardcoded into the browser's , ensuring that connections to listed domains are automatically upgraded to on the first visit, mitigating risks such as man-in-the-middle attacks during initial access. Preload lists are primarily managed by major browser projects, with Google's serving as the central hub through hstspreload.org, where site operators can submit domains for inclusion. Submissions occur via an automated web form that generates a entry specifying the domain, a maximum age of at least one year (31536000 seconds), the includeSubDomains directive, and the preload flag; the form verifies compliance by checking for a valid certificate, proper HTTP-to-HTTPS redirects, and header presence across subdomains. Once approved, the entry is integrated into Chromium's transport_security_state_static. file, with propagation to stable browser releases taking several months; other browsers like and often synchronize with this list for consistency. The primary benefit of preload integration is the enforcement of from the outset, preventing protocol downgrade attacks and enhancing for users who have never visited the site before. As of 2025, the mechanism remains active and widely adopted, with major domains such as google.com included to ensure universal enforcement, though submissions continue to require ongoing site verification to maintain eligibility. List updates are handled by the project, typically on a quarterly basis for bulk changes, using an endpoint to process pending submissions and ensure the list reflects current compliance. Removal from the preload list can be requested via a dedicated form on hstspreload.org, which involves validation steps like DNS and checks, but approval is not guaranteed and may take months to propagate across browsers.

Limitations and Challenges

Technical Vulnerabilities

One significant technical vulnerability in HSTS arises during the initial access to a via an insecure HTTP connection, prior to the policy being cached by the . In this bootstrap phase, an attacker performing a man-in-the-middle (MITM) attack can intercept the request and strip the SSL/TLS layer, redirecting the user to a malicious site without triggering HSTS enforcement, as the policy has not yet been received or stored. HSTS does not provide protection against attacks that occur prior to or independently of the enforcement, such as , hijacking, or the use of compromised TLS s. For instance, if an attacker poisons the DNS cache to resolve a legitimate domain to a malicious , HSTS will still enforce connections to that incorrect endpoint, potentially allowing the attacker to present a valid but rogue for interception or . Similarly, if a site's TLS is compromised—such as through a breach—HSTS cannot prevent the from accepting the invalid unless additional mechanisms like pinning are in place, as HSTS only mandates secure transport without validating trustworthiness beyond standard TLS checks. The max-age directive in HSTS policies relies on the client device's clock for expiration calculation from the receipt time, making it susceptible to manipulation via network time attacks (e.g., subverted NTP), which can prematurely expire the policy or extend it unexpectedly, as noted in RFC 6797 section 14.7. Without a reliable real-time clock or secure time synchronization (e.g., via authenticated NTP), an attacker could manipulate network time sources to alter the perceived expiration, reducing the policy's enforcement period and reintroducing vulnerability windows. This is particularly problematic in environments with unreliable timekeeping, as HSTS relies on absolute seconds from receipt without built-in skew tolerance. In multi-domain setups, the use of the includeSubDomains directive—enabling a parent domain (often termed an superhost) to impose the on all s—introduces risks if not all subdomains support secure transport. If a subdomain lacks a valid TLS , the enforced requirement can lead to connection failures or denial-of-service for users attempting to access it, as the will refuse HTTP fallbacks without exception. This misconfiguration can inadvertently block legitimate access across the domain tree, amplifying operational vulnerabilities in complex hosting environments.

Privacy and Tracking Concerns

HTTP Strict Transport Security (HSTS) introduces privacy risks through its potential to enable supercookies, which allow persistent user tracking across browsing sessions and private modes. By setting HSTS policies with long maximum ages on controlled subdomains, websites can encode unique identifiers in the browser's HSTS , a storage mechanism separate from that persists even in sessions. This technique, demonstrated using up to subdomains to generate over 2 billion unique binary identifiers converted to base-36 strings, enables advertisers or trackers to users without consent, as the cache is not cleared by standard tools. Long-lived policies, often set to years (e.g., max-age=31536000 seconds), exacerbate this by maintaining the fingerprint across device restarts or browser syncs, creating a where clearing the cache for undermines HSTS's benefits. Inconsistent HSTS enforcement across subdomains further heightens fingerprinting risks, as attackers can exploit variations in policy application to infer user history. For instance, by selectively applying HSTS to subdomains via embedded requests (e.g., invisible images), a can create a bit where HTTP attempts (0) or HTTPS enforcements (1) reveal prior visits, partitioning users into millions of unique buckets with just 20-30 subdomains. Preload list inclusion amplifies this visibility, as hardcoded HSTS policies in browsers signal preferences without user interaction, potentially distinguishing users based on their browser's preload knowledge and enabling passive surveillance. HSTS conflicts with privacy-focused tools like Browser, where enforced can inadvertently compromise anonymity. disables by default to avoid subdomain-based supercookie tracking, but this leaves users vulnerable to downgrade attacks; enabling it risks exposing users to subdomain-based supercookie tracking, while disabling leaves them vulnerable to downgrade attacks by malicious exit nodes. These tensions highlight broader privacy implications. To mitigate these privacy risks, major browsers have implemented protections. For example, as of 2018, (Safari) limits HSTS state to the hostname or top-level domain plus one and ignores it for subresource requests to blocked hosts. Firefox version 85 (2021) introduced cache partitioning to prevent cross-site supercookie use. Similar restrictions in have significantly reduced the tracking potential as of 2025.

Mitigations and Enhancements

Preload List Solutions

The HSTS preload list addresses the first-request vulnerability inherent in standard policies by hardcoding a curated set of domain policies directly into participating s, ensuring that is enforced from the very first connection attempt without requiring an initial HTTP request to deliver the header. This preemptive enforcement protects users on fresh installations or those with cleared local state from man-in-the-middle attacks that could intercept the initial unsecured request. Site inclusion in the preload list follows a structured submission managed primarily through hstspreload.org, where domain owners must first ensure their site meets stringent requirements: serving a valid certificate for the and all subdomains, redirecting all HTTP traffic on to , and delivering an header with a maximum age of at least 31536000 seconds (one year), the includeSubDomains directive to cover subdomains, and the preload directive. Owners are advised to gradually ramp up the max-age value—starting from short durations like 300 seconds before increasing to the required year-long period—to verify full compliance across their infrastructure. Once submitted and verified, entries are reviewed by maintainers (led by the project) and integrated into browser , with propagation to stable releases taking several months due to update cycles. Maintenance requires ongoing adherence to these standards, as non-compliant sites risk removal requests or exclusion from updates. Despite these benefits, preload list inclusion introduces significant drawbacks, including the irreversibility of removal, which can take 6-12 weeks or longer to propagate across browsers like and , leaving sites locked into HTTPS enforcement even if operational needs change. Additionally, the list's is limited, as it primarily accommodates major, well-resourced domains while excluding the vast majority of websites—estimated in the billions—due to the intensive verification and maintenance demands, thereby leaving non-major sites reliant on standard for protection against downgrade attacks.

Compatibility with Modern Protocols

HTTP Strict Transport Security (HSTS) integrates seamlessly with , as the protocol's deployment in browsers relies on TLS-secured connections negotiated via (ALPN) during the TLS , ensuring that HSTS-enforced is inherently maintained without requiring protocol-specific modifications. This compatibility stems from 's design, which, while not mandating in the specification, is universally implemented over TLS in major browsers to align with security standards like HSTS. As a result, HSTS headers delivered over continue to instruct clients to future requests to , preserving the policy's effectiveness across multiplexed streams and header compression features. For , which operates over the transport protocol using , applies directly to these connections since QUIC embeds TLS 1.3 for , treating the secure QUIC session equivalently to a TLS-secured connection under HSTS rules. Browser implementations began supporting HSTS enforcement on HTTP/3 in 2020, with incorporating QUIC-based connections that respect HSTS policies in experimental builds and enabling it by default in version 100 (March 2022), while Mozilla Firefox followed with support in Nightly versions from mid-2020 and stable rollout in version 95 (November 2021). This ensures that HSTS prevents downgrade attacks even on UDP ports, maintaining strict HTTPS-only access during protocol negotiation via ALPN extensions for "h3". In emerging deployments as of 2025, plays a critical role in content delivery networks (CDNs) and architectures by enforcing at distributed edge nodes, thereby avoiding fallbacks to insecure HTTP/1.1 during complex routing or load balancing across global infrastructures. Major CDNs such as , Akamai, and configure headers at the edge to propagate security policies consistently, mitigating risks from protocol mismatches in multi-version environments that support and alongside legacy protocols. This approach enhances resilience against man-in-the-middle attacks in edge scenarios, where traffic may traverse multiple hops, without altering core mechanics.

Deployment Guidance

Configuration Best Practices

When configuring HTTP Strict Transport Security (HSTS), site administrators should use the header Strict-Transport-Security: max-age=31536000; includeSubDomains; preload for domains that qualify for preload lists, as this sets a one-year enforcement period, extends the policy to all subdomains, and signals readiness for preloading to prevent initial HTTP connections. The max-age value of 31536000 seconds (one year) balances persistence with flexibility for policy updates, while the preload directive requires the presence of includeSubDomains and a minimum max-age of one year to meet submission criteria for preload lists maintained by vendors. To minimize subdomain conflicts, HSTS policies should be applied exclusively to the apex domain (e.g., ) with the includeSubDomains directive enabled, ensuring uniform enforcement across the entire domain tree without isolated subdomain implementations that could lead to access denials. This approach avoids scenarios where an HTTP-only subdomain inadvertently triggers blocks after policy activation, provided all subdomains are pre-verified to support fully. Administrators must audit DNS records and certificates beforehand to confirm comprehensive coverage. HSTS implementation should always pair with server-side redirects from HTTP to using a 301 (permanent) status code for long-term efficiency or 302 (found) for temporary setups, directing traffic to the secure endpoint before delivering the HSTS header exclusively over connections. This combination mitigates downgrade attacks during the initial request while allowing the HSTS policy to take effect on subsequent visits, with the redirect response itself not carrying the header to comply with requirements. In 2025, enhanced configurations integrate with certificate revocation mechanisms to improve TLS handshake efficiency and user privacy. OCSP stapling remains beneficial where supported by certificate authorities, but major authorities like have discontinued traditional OCSP responder support in favor of CRLs (Certificate Revocation Lists) as of August 6, 2025. Following the discontinuation, sites using should rely on CRLs for revocation checking or use short-lived certificates to minimize revocation needs, ensuring compatibility with -enhanced setups. For legacy clients without native enforcement, such as older non-browser agents, reliance on robust redirects serves as a fallback to approximate the policy's protective effects. Testing validation confirms these integrations function across environments.

Testing and Validation Techniques

To verify the implementation of HTTP Strict Transport Security (HSTS), administrators can use browser developer tools to inspect the policy status directly. In , accessing chrome://net-internals/#hsts allows querying a domain's HSTS status, revealing details such as the maximum age, inclusion of subdomains, and preload status stored in the browser's cache. This tool enables checking whether the policy is actively enforced for subsequent visits without needing to clear the entire browser cache. Online validation services provide automated analysis of HTTP response headers to confirm HSTS presence and correctness. For instance, securityheaders.com scans a specified domain and reports on the Strict-Transport-Security header, including its directives like max-age, includeSubDomains, and preload, assigning a security score based on compliance. Similarly, command-line tools like curl can fetch and inspect the header: running curl -s -D- https://example.com | grep -i strict-transport-security retrieves the raw header value for manual verification. Testing steps begin with simulating a first-time visit to ensure initial policy adoption. Using an incognito window or clearing the browser's HSTS cache (via tools like Chrome's chrome://net-internals/#hsts delete function), attempt to access the site over HTTP; a properly configured HSTS setup should redirect to HTTPS and set the policy. To validate cache persistence, revisit the site multiple times over HTTP, confirming automatic upgrades to HTTPS without manual intervention, and monitor the policy's expiration through repeated queries in browser tools. Intercepting proxies, such as those in Burp Suite or OWASP ZAP, can further capture and analyze responses across multiple endpoints to ensure consistent header delivery. For sites aiming for HSTS preload inclusion, eligibility can be validated using the submission tool at hstspreload.org. This service checks requirements such as a max-age of at least 31536000 seconds (one year), the includeSubDomains directive, and the preload flag on the base domain and all HTTPS redirects, while confirming valid certificates and HTTP-to-HTTPS redirects on port 80. Submission involves entering the domain and verifying compliance before requesting addition to browser preload lists, with status queries available via the same site or browser internals. Common pitfalls in HSTS deployment include setting an overly short max-age (e.g., less than one year), which fails preload eligibility and allows temporary HTTP access after expiration, and omitting HTTPS enforcement on subdomains without includeSubDomains, exposing them to downgrade attacks. Another issue is inconsistent header application across paths, such as missing it on API endpoints, which can be detected through comprehensive crawling in validation tools. In 2025, emphasis has grown on integrating validation into automated pipelines to catch misconfigurations pre-deployment. Tools like LoadForge or custom scripts in pipelines (e.g., using or header-scanning libraries) perform checks on environments, ensuring headers meet best practices before production rollout and preventing configuration drift. This approach aligns with broader DevSecOps practices, where security header validation runs alongside builds to maintain compliance.

References

  1. [1]
    RFC 6797 - HTTP Strict Transport Security (HSTS) - IETF Datatracker
    This specification defines a mechanism enabling web sites to declare themselves accessible only via secure connections.
  2. [2]
    Strict-Transport-Security header - HTTP - MDN Web Docs
    Aug 20, 2025 · The HTTP Strict-Transport-Security response header (often abbreviated as HSTS) informs browsers that the host should only be accessed using HTTPS.Syntax · Directives · Description · Examples
  3. [3]
    HSTS Preload List Submission
    This HSTS preload list is built into Chrome. Requests to these domains will only be made over HTTPS; any HTTP requests will be upgraded to HTTPS and fail to ...
  4. [4]
    HTTP Strict Transport Security - The Chromium Projects
    HTTP Strict Transport Security allows a site to request that it always be contacted over HTTPS. HSTS is supported in Google Chrome, Firefox, Safari, Opera, Edge ...
  5. [5]
    HTTP Strict Transport Security - OWASP Cheat Sheet Series
    HTTP Strict Transport Security (also named HSTS) is an opt-in security enhancement that is specified by a web application through the use of a special response ...Introduction · Threats · Examples
  6. [6]
    None
    - **Date**: April 21–25, 2008
  7. [7]
    Strict Transport Security - W3C Public mailing list archives
    Sep 18, 2009 · ... Strict-Transport-Sec HTTP Response Header instantiations. 6 Server ... W3C Working Draft, 26 February 2009.
  8. [8]
    Implement Strict-Transport-Security (was ForceTLS) to allow sites to ...
    ForceTLS is a mechanism to allow sites to mark domains under their control as secure-only, so that all future requests sent by the browser for resources in ...
  9. [9]
  10. [10]
  11. [11]
    RFC Errata Report » RFC Editor
    RFC 6797, "HTTP Strict Transport Security (HSTS)", November 2012. Section 14 says: Without the "includeSubDomains" directive, HSTS is unable to protect such ...
  12. [12]
  13. [13]
  14. [14]
  15. [15]
  16. [16]
  17. [17]
  18. [18]
  19. [19]
  20. [20]
  21. [21]
  22. [22]
  23. [23]
  24. [24]
  25. [25]
  26. [26]
  27. [27]
  28. [28]
  29. [29]
    Public Suffix List
    The Public Suffix List is a list of all known public suffixes. The Public Suffix List is an initiative of Mozilla, but is maintained as a community resource.The List · Learn More · Submit Amendments
  30. [30]
    View the Public Suffix List
    Feb 8, 2022 · View the Public Suffix List. The list is kept in source code control on Github. You can read more information on the format the list uses below.Missing: HSTS match
  31. [31]
  32. [32]
  33. [33]
  34. [34]
    Chrome 4 | Google Wiki | Fandom
    Chrome 4 is a version of Google Chrome released on January 25, 2010. Browser Updates Use the 'Customize and control Google Chrome' (wrench) menu to open the ...
  35. [35]
    Mozilla Firefox 4 Release Notes
    4.0, released March 22nd, 2011 Check out what's new, the known issues and frequently asked questions about the latest version of Firefox. As ...
  36. [36]
    EdgeHTML - Wikipedia
    Releases ; 12.0, November 12, 2014, Beta version that was part of a special Internet Explorer build ; 12.10049, March 31, 2015, Beta is now part of the Microsoft ...
  37. [37]
    Internet Explorer 11 adds support for HTTP Strict Transport Security ...
    Sites that are not on the preload list can enable HSTS through the Strict-Transport-Security HTTP header. After an initial HTTPS connection from the client that ...
  38. [38]
    Strict Transport Security | Can I use... Support tables for ... - CanIUse
    "Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
  39. [39]
    HSTS - How to Use HTTP Strict Transport Security - Kinsta
    Oct 1, 2025 · Submit your site to the official HSTS preload list. Preload HSTS. However, you must meet some additional requirements to be ...<|control11|><|separator|>
  40. [40]
    HTTP Strict-Transport-Security (HSTS) - curl
    HSTS support. HTTP Strict-Transport-Security. Added as experimental in curl 7.74.0. Supported "for real" since 7.77.0.
  41. [41]
    HTTPS (SSL/TLS) Options (GNU Wget 1.25.0 Manual)
    Wget supports HSTS (HTTP Strict Transport Security, RFC 6797) by default. Use ' --no-hsts ' to make Wget act as a non-HSTS-compliant UA. As a consequence, Wget ...
  42. [42]
    Security Best Practices for Express in Production
    Use Helmet. Helmet can help protect your app from some well-known web vulnerabilities by setting HTTP headers appropriately. Helmet is a middleware function ...
  43. [43]
    Preload List Processes · chromium/hstspreload.org Wiki - GitHub
    Dec 9, 2022 · The public suffix list data used by the requirements scanner is stale, and we need to waive a spurious internal.domain.name.cannot_compute_etld1 ...
  44. [44]
  45. [45]
  46. [46]
  47. [47]
  48. [48]
  49. [49]
    Browsing in privacy mode? Super Cookies can track you anyway
    Jan 6, 2015 · His proof of concept is known as HSTS Super Cookies. Like normal cookies, they allow him to fingerprint users who browse to his site in non- ...Missing: concerns | Show results with:concerns
  50. [50]
    Anatomy of a browser dilemma – how HSTS 'supercookies' make ...
    Feb 2, 2015 · HSTS is supposed to improve security and privacy by making it difficult to perform what are known as HTTPS downgrade attacks.Missing: concerns | Show results with:concerns
  51. [51]
    [PDF] HSTS Supports Targeted Surveillance - USENIX
    HTTP Strict Transport Security (HSTS) was introduced to force clients to use HTTPS connections on sites that support it, thus preventing Man in the Middle ...
  52. [52]
    [PDF] Collaborative HTTP Strict Transport Security in Tor Browser
    Tor Browser, a web browser primarily concerned with online anonymity, disables HSTS as a result of this tracking potential. We present the CoStricTor pro- tocol ...
  53. [53]
  54. [54]
    Preloading HSTS – Mozilla Security Blog
    - **How Preload Addresses First-Request Issue**: Preloading HSTS ensures browsers use secure connections on first contact with listed hosts, preventing network attackers from forcing insecure connections.
  55. [55]
    HSTS Preload List Removal
    Be preloaded or pending preload through hstspreload.org . Serve HTTPS with a valid certificate. Send a valid HSTS header. The header must not contain the ...
  56. [56]
    [PDF] HTTPS-Only: Upgrading all connections to https in Web Browsers
    Feb 25, 2021 · Unfortunately, HSTS Preload lists do not scale to the size of the internet and therefore leave the majority of websites unprotected against ...<|control11|><|separator|>
  57. [57]
    Bootstrapping HTTP/1.1, HTTP/2, and HTTP/3 - netmeister.org
    May 28, 2025 · For that, we are sending back the HTTP Strict Transport Security (HSTS) header (in yellow above). ... supports both HTTP/2 and HTTP/3. The ...
  58. [58]
    HTTP Strict Transport Security (HSTS) - SSL/TLS - Cloudflare Docs
    Oct 28, 2025 · HSTS protects HTTPS web servers from downgrade attacks. These attacks redirect web browsers from an HTTPS web server to an attacker-controlled server.Requirements · Enable HSTS · Disable HSTS<|control11|><|separator|>
  59. [59]
    HTTP Strict Transport Security (HSTS) - Akamai TechDocs
    HSTS instructs the browser to use HTTPS when making requests to your website. The browser remembers this instruction for an amount of time that you set.Missing: computing documentation
  60. [60]
    Working with CDN services | Fastly Documentation
    The Force TLS & HSTS setting enables the HTTP Strict Transport Security (HSTS) security enhancement specification through Fastly and forces modern web ...Creating A New Cdn Service · Other Things You Can Do · Adding Comments To Service...
  61. [61]
    Forcing an HTTPS redirect | Fastly Documentation
    To manually force an HTTPS redirect, you must create a request setting that forces TLS and add a header that enables HSTS.Forcing Tls And Enabling... · Manually Forcing An Https... · Enabling Hsts
  62. [62]
  63. [63]
  64. [64]
    OCSP Stapling: Secure and Efficient Certificate Validation - SSL.com
    Nov 22, 2024 · OCSP stapling streamlines SSL/TLS certificate validation, addressing the performance, privacy, and reliability challenges of traditional methods.Missing: HSTS polyfill
  65. [65]
    Checking domains HSTS status - Information Security Stack Exchange
    Oct 3, 2014 · The Google Chrome browser offers a quick way to check a domain's HSTS (HTTP Strict Transport Security) status via the page chrome://net-internals/#hsts ( ...
  66. [66]
    Analyse your HTTP response headers
    Quickly and easily assess the security of your HTTP response headers.FAQ · About · API Keys · API Docs
  67. [67]
    http strict transport security test - WSTG - Latest | OWASP Foundation
    The HTTP Strict Transport Security (HSTS) feature enables a web server to inform the user's browser, via a special response header, that it should never ...
  68. [68]
    Chrome forces HTTPS, even though this website doesn't.
    Sep 27, 2022 · 1. Access to chrome://net-internals/#hsts 2. Enter "slither.io" in the input field of "Delete domain security policies" and click "Delete".
  69. [69]
    QA Series: Automated Security Headers Testing - LoadForge
    Jul 7, 2025 · TLDR: Automated security headers testing streamlines the process of validating and maintaining crucial security configurations across all ...
  70. [70]
    CI CD Security - OWASP Cheat Sheet Series
    This cheat sheet will focus on securing the pipeline itself. It will begin by providing some brief background information before proceeding with specific CI/CD ...