security.txt: Give Security Researchers a Way to Reach You
What RFC 9116 security.txt is, which fields are required, how to choose an expiry date, sign and serve the file, and how to avoid the common mistakes.

The missing contact problem
People find security problems in websites all the time: students learning, professional researchers, customers who notice something odd. Most of them want to report it. The trouble is finding out where. A general support form routes the message to someone who does not know what a cross-site scripting bug is, a social media post makes the issue public, and an e-mail to a guessed address bounces. Reports get lost, or the reporter gives up. Meanwhile the hole stays open.
RFC 9116, published in 2022, standardises a simple fix. A plain text file at /.well-known/security.txt tells anyone, human or tool, how to report a vulnerability to you. Bug bounty platforms, security scanners and national computer emergency teams look for it, and several government guidelines now recommend it.
What goes into the file
The format is a list of Field: value lines. Two fields are required. Contact gives at least one way to reach you, written as a URI: mailto: for e-mail, tel: for phone, or an https address for a web form. List several in order of preference. Expires gives a date and time after which the file should no longer be trusted, so an abandoned file does not send reports into a void. The RFC recommends keeping it less than a year ahead.
The optional fields make the file far more useful. Policy links to your disclosure policy, where you explain what is in scope, how quickly you respond and whether you promise not to take legal action against good-faith research. Encryption links to a public key so reporters can send details privately. Acknowledgments links to a page that thanks past reporters. Preferred-Languages lists the languages your team reads. Canonical states the URL where the file is meant to live, which matters if you sign it. Hiring and CSAF point to security jobs and machine-readable advisories.
Common mistakes
The checks that fail most often are simple. A contact written as a bare e-mail address is not a URI and should start with mailto:. A date like 2025-12-31 lacks the time and time zone that RFC 3339 requires; write 2025-12-31T23:59:59Z. Links with http instead of https are rejected by careful readers. Expires appears twice after a quick edit. And very often, the file simply expired months ago because nobody set a reminder.
Writing, checking and publishing
The security.txt Generator and Validator builds the file from a short form. Enter your contacts, choose an expiry with the day buttons, add your policy and key links, and read the checks under the output. When it is clean, download the file and place it so that it is served at /.well-known/security.txt over HTTPS with the content type text/plain and UTF-8. The tool includes snippets for common servers and hosting platforms. Download the calendar reminder as well, so renewing the file becomes a scheduled task instead of a surprise.
If you list an Encryption key, consider signing the file with OpenPGP on your own computer using gpg --clearsign, and include a Canonical field so a copied file cannot be passed off as yours. Never paste a private key into any website.
To check an existing file, open its address in a browser tab, copy the text and paste it into the check tab. The findings list each problem with its line number, and one click loads the values into the builder for a corrected version.
After the file is live
A security.txt is a promise that someone reads the inbox. Make sure the contact address reaches a person or a monitored ticket queue, reply within the time your policy states, and thank reporters. The file opens the door; the way you answer decides whether people use it again.



