Use this free security.txt generator to write a file that tells security researchers how to report a vulnerability on your site. The file follows RFC 9116, and it lists your contacts, an expiry date, and optional policy and encryption links. The text is built in your browser, so you can check it and download it before you publish it.
A security.txt file only helps if the contacts are monitored and the expiry date is kept current. Publish it, then renew it before the expiry passes.
How to use the security.txt generator
- Contact: add at least one contact, one per line. Use mailto:, https:, or tel:.
- Expires: pick a date in the future, usually within a year.
- Optional fields: add a policy, encryption key, acknowledgments page, canonical address, languages, or hiring page.
- Check: the tool lists any errors and warnings above the file preview.
- Download: save the file as security.txt and place it on your server.
Where to publish the file
Serve the file over HTTPS at /.well-known/security.txt. The file must be plain text. If you also serve it at /security.txt, the two copies should be identical.
Fields in the file
- Contact: where to send reports. Required.
- Expires: when the file stops being valid. Required.
- Policy: a page describing how you handle reports and what is in scope.
- Encryption: a link to a public key for encrypted reports.
- Acknowledgments: a page that thanks researchers, if you run one.
- Preferred-Languages: the languages your security team reads, such as en or fr.
- Canonical: the official address of this file, so copies can be recognised.
- Hiring: a careers page for security roles, if you have one.
Worked example
Suppose your contact is security@example.com, the file expires on 31 December 2027, and your policy is at example.com/security-policy. The file has three lines for those fields. The tool writes Expires as 2027-12-31T23:59:59Z, which keeps the file valid through the whole of that day in UTC.
Common security.txt mistakes
- Letting the expiry lapse. An expired file tells researchers the contacts may be out of date.
- Publishing an unmonitored contact. Reports sent to a mailbox nobody reads are lost.
- Serving the file over plain HTTP. Use HTTPS so the contents cannot be changed in transit.
- Mixing up the copies. If you serve the file in two places, keep them identical.
Frequently asked questions
Where should security.txt be published?
At /.well-known/security.txt on your domain, served over HTTPS. RFC 9116 also allows /security.txt, and both copies should match.
How far ahead should the expiry date be?
Within a year is common practice. The tool warns when the date is further away, and you should renew the file before it passes.
Does this tool publish my file?
No. It builds the text in your browser. You download the file and place it on your own web server.
Do I need a PGP signature?
No. RFC 9116 allows an optional signature, but this tool does not create one. The file works without it.