HSTS Header Generator

Configure max-age, includeSubDomains, and preload options to generate a ready-to-use Strict-Transport-Security header with server config snippets.

Configure HSTS Header

Presets

Generated Header

Strict-Transport-Security: max-age=31536000

Server Config Snippets


        
Copied!

Summary

Configure max-age, includeSubDomains, and preload options to generate a ready-to-use Strict-Transport-Security header with server config snippets.

How it works

  1. The tool assembles the Strict-Transport-Security header value from your chosen options entirely in the browser. It validates preload requirements (max-age >= 31536000 and includeSubDomains must be enabled) and generates ready-to-use server configuration blocks.

Use cases

  • Enforce HTTPS on all visitors and prevent SSL-stripping attacks.
  • Prepare a domain for submission to the HSTS preload list.
  • Generate server configuration snippets for DevOps deployments.
  • Audit and validate existing HSTS header settings.

Frequently Asked Questions

Last updated: 2026-06-09 · Reviewed by Nham Vu