Set an HSTS header
SkillDev toolsHSTS is a skill that guides an AI agent through checking and setting the Strict-Transport-Security header on websites served over HTTPS. It reviews HTTP response headers to confirm the header is set correctly, explains how missing HSTS enables SSL stripping attacks, and helps fix server or CDN configuration.
Available today. Use it from your connected AI after setup.
No other account needed.
Have an agent that can load skills and access the site or configuration you want to review.
Then ask your AI: use the Set an HSTS header skill
What your AI can do with it
- Review HTTP response headers on any site that serves content over HTTPS
- Check Strict-Transport-Security settings including max-age, includeSubDomains, and preload
- Explain how missing HSTS enables SSL stripping attacks
- Help fix server or CDN configuration for HSTS
- Validate results with curl or securityheaders.com
Getting started
- Have an agent that can load skills and access the site or configuration you want to review.
- Add the hsts skill to the agent's available skills.
- Ask the agent to review the HTTP response headers of the site you want to check.
- Follow the agent's guidance to adjust server or CDN configuration if the header is missing or incorrect.
- Have the agent validate the results with curl or securityheaders.com.
What this skill tells your AI
The instructions your AI receives, as published by thedaviddias/front-end-checklist in skills/hsts/SKILL.md and read by ahel’s review.
Without HSTS, an attacker on the same network can intercept the first HTTP request and strip TLS (SSL stripping), silently downgrading the connection before the browser ever sees a redirect.
Quick Reference
- Set
Strict-Transport-Security: max-age=31536000; includeSubDomainson all HTTPS responses - Use
max-age=31536000(1 year) minimum; HSTS preloading requires at least 1 year - Add
includeSubDomainsto protect all subdomains from downgrade attacks - Add
preloadonly after testing — it is difficult to reverse and takes weeks to propagate - Never send the HSTS header over plain HTTP — only over HTTPS
Check
Check whether the server sends a Strict-Transport-Security header on all HTTPS responses, and verify the max-age, includeSubDomains, and preload directives are appropriate.
Fix
Add a Strict-Transport-Security header with max-age=31536000 and includeSubDomains to all HTTPS responses. Configure your web server or CDN to send this header, and validate it with curl or securityheaders.com.
Explain
Explain what HTTP Strict Transport Security (HSTS) is, how it prevents SSL stripping attacks, what the max-age and includeSubDomains directives do, and why the preload directive requires caution.
Code Review
Review server config, headers, forms, and integration points related to Set an HSTS header. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/en/rules/security/hsts
Signals
- GitHub stars
- 74k
- Forks
- 7k
- Last commit
- Aug 2026
Questions
- When should this skill be used?
- Use it when reviewing HTTP response headers on any site that serves content over HTTPS.
- What does the skill check for?
- It confirms a site sets Strict-Transport-Security correctly, including the max-age, includeSubDomains, and preload directives.
- Why does HSTS matter?
- When HSTS is missing, the site is vulnerable to SSL stripping attacks. The skill explains this risk and how the header prevents it.
- How are results validated?
- The skill validates results with curl or securityheaders.com after configuration changes are made.
Advanced
- Item type
- skill
- Key
hsts- Source
- github.com/thedaviddias/front-end-checklist