security.txt: tell researchers where to report a vulnerability before they go public
A five-line text file in /.well-known/ decides whether a found vulnerability reaches your inbox or a public forum. What RFC 9116 requires, how to write the file, and the mistakes that make it useless.
Security · Published: 3 November 2026 · 5 min read · Дмитрий Орлов
Sooner or later someone finds a problem on your site: an open admin panel, a password reset that leaks e-mail addresses, a forgotten test subdomain. Most of the people who find these things want to tell you. The question is whether they can find out how. A support form answered by a first-line agent, a generic info@ address, a social-media account — the report gets lost, the researcher gives up, and sometimes the next place the problem appears is a public post.
security.txt solves exactly this. It is a small plain-text file at a fixed address that says where security reports should go. It was standardised as RFC 9116 in 2022, and security researchers, bug-bounty platforms and automated scanners look for it first.
Where it lives
The file is served at https://example.com/.well-known/security.txt, over HTTPS, as text/plain. The older location in the site root, /security.txt, is still read by some tools, but /.well-known/ is the one the standard defines. Every domain and subdomain that runs its own service can have its own file; if they all share one security team, they can carry the same contents.
What goes in it
Two fields are required:
Contact:— where to send a report. Amailto:address, anhttps://link to a reporting form, or atel:number. You may list several, in order of preference.Expires:— the date after which the file should be considered stale, in ISO 8601 format. The RFC recommends keeping it less than a year ahead.
The useful optional ones:
Policy:— a link to your disclosure policy: what is in scope, how quickly you answer, whether you promise not to take legal action against good-faith research.Preferred-Languages:— the languages your team reads, for exampleen, ru.Encryption:— a link to a PGP key, for reports that should not travel in plain text.Acknowledgments:— a page thanking researchers who have reported issues.Canonical:— the address where this file officially lives, which helps when the same file is copied to several domains.
A complete, realistic example:
``text Contact: mailto:security@example.com Contact: https://example.com/security/report Expires: 2027-10-31T23:00:00Z Preferred-Languages: en, ru Policy: https://example.com/security/policy Canonical: https://example.com/.well-known/security.txt ``
The file can be signed with an OpenPGP cleartext signature so a reader can tell it was not tampered with, but an unsigned file is valid and far better than none.
Mistakes that make it useless
- An expired
Expires. The field is there so readers can ignore stale files — and they do. Put the renewal in a calendar, or generate the file in your deploy so the date always moves forward. - A mailbox nobody reads.
security@that forwards to a shared inbox nobody watches is worse than no file, because the researcher thinks they have told you. Route it to people who can triage, and answer within a few days, even if only to confirm receipt. - An HTML page instead of a text file. Single-page apps often answer every unknown address with their own index page and status 200. Tools see markup, not a
Contact:line, and treat the file as missing. - Blocking
/.well-known/on the server. A rule that denies every path starting with a dot — the one many guides recommend for hiding.gitand.env— also hidessecurity.txt. Exempt.well-known, as shown in our piece on files a deploy should never publish.
Do you need a bug-bounty programme?
No. security.txt is a contact, not a promise of payment. A short policy that says what you consider in scope, that you will not pursue good-faith researchers, and how fast you reply is enough for most companies. A paid programme can come later, if the volume of reports justifies it.
What SiteScan checks
Every scan requests /.well-known/security.txt and counts it as published only when the answer is a 200, is not an HTML page, and has at least one line starting with Contact:. So a site that answers every address with its own homepage does not pass by accident. The row appears in the "Well-known files" group of the site checks; because the file is optional, a missing one is shown as a neutral fact, not an error. Details are in the security.txt help page. The rest of the security picture — security headers, certificates, exposed files — is in the same report. Run a free scan to check yours.
Read next
Check how much of this is on your own site
A free scan surfaces broken links, JS errors and performance problems in about a minute.