HSTS (Strict-Transport-Security) Header Generator & Preload Validator
IETF RFC 6797Generate HTTP Strict-Transport-Security (HSTS) headers with max-age calculator, includeSubDomains, and Chrome preload readiness check.
Enforces HSTS on all current and future subdomains (e.g. *.example.com). Mandatory for Chrome Preload.
Grants consent to be hardcoded in Chrome, Edge, Firefox, and Safari source code. Requires max-age >= 31536000 and includeSubDomains.
Ensures the header is sent on all HTTP responses, including 404, 500, and 502 error pages.
# ====================================================================
# Nginx Configuration: Strict-Transport-Security (HSTS)
# Server Block: https://example.com
# ====================================================================
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name example.com *.example.com;
# SSL Certificate Paths
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
# HSTS Security Header
# Note: 'always' ensures the header is sent even on 4xx/5xx error responses
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
# Recommended Complementary Security Headers
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "DENY" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}
# Redirect HTTP (Port 80) to HTTPS (Port 443)
# RFC 6797 §7.2: DO NOT send Strict-Transport-Security over insecure HTTP!
server {
listen 80;
listen [::]:80;
server_name example.com *.example.com;
return 301 https://$host$request_uri;
}100% Client-Side Evaluation
Zero server uploads. Your domain names, security policies, and server configurations are evaluated strictly inside your browser sandbox.
RFC 6797 & Chrome Preload Spec
Fully compliant with IETF RFC 6797 specifications and official Chromium HSTS Preload submission requirements for Chrome, Firefox, Safari, and Edge.
Multi-Web Server Synthesis
Instant generation of battle-tested configurations for Nginx, Apache httpd, Caddy, Cloudflare Workers, Next.js, and HAProxy with always-send flags.