security.txt (RFC 9116): What to Publish and How to Validate It

security.txt (RFC 9116): What to Publish and How to Validate It

3 min read

security.txt · rfc-9116 · vulnerability-disclosure · tools

Authors

PandaONE Team

Publish a correct security.txt under /.well-known/, understand RFC 9116 fields, and validate the file so researchers can reach your security team.

A researcher found your security.txt. Expires was two years ago. Parsers treat the file as stale. They went public because the mailbox on the card was never staffed.

RFC 9116 defines security.txt: a small contact file under /.well-known/. Publish it so reports hit a channel you monitor, not marketing Twitter. Re-validate after every CDN or site rebuild — redirects and missing HTTPS break the URL quietly.

Canonical location

https://example.com/.well-known/security.txt

RFC 9116 expects /.well-known/. Some teams also redirect /security.txt there. HTTPS only.

Minimal useful example

Contact: mailto:security@example.com
Contact: https://example.com/security
Expires: 2027-01-01T00:00:00.000Z
Preferred-Languages: en
Canonical: https://example.com/.well-known/security.txt
Policy: https://example.com/security/policy
Hiring: https://example.com/careers
FieldRole
ContactEmail, URL, or URI researchers can use
ExpiresStaleness date — refresh before it passes
CanonicalAuthoritative URL for this file
PolicyVulnerability disclosure / safe harbor
Preferred-LanguagesLanguages your team handles
HiringOptional
EncryptionOpenPGP key URI if you accept encrypted mail

Unread security@ is worse than no file. If you cannot staff mail, point Contact at a form that pages on-call.

How to validate

  1. Open the security.txt checker.
  2. Enter the site origin.
  3. Confirm HTTP 200 or a clean redirect chain to the well-known URL.
  4. Confirm fields parse and Expires is in the future.
  5. Click Contact and Policy yourself — automation cannot prove a human answers.

Common mistakes

  • HTTP only
  • File only at /security.txt with no /.well-known/ copy
  • Expires left in the past for years
  • Contact URLs that 404 after a marketing rebuild
  • Blocking /.well-known/ in robots.txt without reason
  • File on marketing apex while app. takes traffic but has no file

Multi-host: publish on every hostname that accepts user traffic, or use Canonical + Policy to name one program.

security.txt vs a real disclosure program

The file is a pointer. You still need triage SLAs, a scope researchers can trust, and a way to prioritize fixes without inbox chaos.

Continuous testing produces proof-backed findings. security.txt invites external reports into a channel you control — different job, same need for staffed response.

Rollout checklist

  1. Draft Contact + Policy pages someone actually monitors.
  2. Set Expires ~6–12 months out; calendar the refresh.
  3. Deploy to /.well-known/security.txt on production.
  4. Run the security.txt checker.
  5. Re-run after CDN, reverse-proxy, or locale-router changes.

CDN, multi-brand, and staging

  • Do not strip /.well-known/* at the edge while marketing paths work.
  • Locale redirects must not drop the well-known path or return HTML error pages.
  • Staging copies should be absent or clearly point to production policy.
  • example.com and app.example.com both need a file, or Policy must say which host owns the program.

Pair file checks with valid TLS — SSL guide — so researchers are not blocked by cert warnings before they read contacts.

FAQ

Is security.txt mandatory?
Not for every site by law, but low cost and increasingly expected by researchers and enterprise buyers.

Can I list a bug bounty platform?
Yes — Contact URL to your program. Keep scope accurate.

Does a green check mean we are secure?
No. It means researchers can find contact instructions.

What if Expires is in the past?
Treat as stale. Refresh when you review the program — at least annually.

Should the file be signed?
RFC 9116 allows OpenPGP cleartext signatures. Most teams start unsigned with monitored contacts.

Summary

Serve https://<host>/.well-known/security.txt, keep Expires future-dated, and staff Contact. Validate with the security.txt checker after infra changes. The file does not replace a disclosure program — it routes researchers to one you can run.

Featured on ScrollLaunchFeatured on CodeHype