LLMSdocs
English

security.txt: publishing a security contact

The security.txt format defined in RFC 9116: where the file must be served, the two required fields Contact and Expires, the optional fields, signing, and the scope of a single file.

Type: ReferenceVersionRFC 9116
On this page
  1. A complete file
  2. Fields
  3. Serving the file
  4. Signing
  5. Keeping it current
  6. See also
  7. References

Someone who finds a vulnerability in a website needs to know whom to tell. security.txt answers that in a fixed place and a fixed format, so that the answer can be found by a person or a script without searching the site. The format is defined in RFC 9116, published in April 2022 by Edwin Foudil and Yakov Shafranovich as an Informational RFC, and the name security.txt is registered in the IANA Well-Known URIs registry.

Location/.well-known/security.txt
SchemeHTTPS only
Content-Typetext/plain; charset=utf-8
Required fieldsContact (one or more) and Expires (exactly one)
Line endingsCRLF or LF
CommentsLines beginning with #
SignatureOpenPGP cleartext signature recommended

A complete file

security.txt
# Security contact for example.com
Contact: mailto:security@example.com
Contact: https://example.com/security/report
Expires: 2027-11-30T23:59:59Z
Encryption: https://example.com/.well-known/pgp-key.txt
Preferred-Languages: en, ko
Policy: https://example.com/security/policy
Acknowledgments: https://example.com/security/thanks
Canonical: https://example.com/.well-known/security.txt
Hiring: https://example.com/careers/security
https://example.com/.well-known/security.txt, unsigned

Only the two Contact lines and the Expires line are required. The first Contact is the preferred channel and the second is the fallback, because RFC 9116 asks for contacts to be listed in order of preference.

Fields

Field names are case-insensitive, and each field takes one value on its own line. A field may appear more than once unless its definition says otherwise. Researchers are required to ignore fields they do not support, so new fields registered with IANA do not break older readers.

FieldRequiredRepeatableValue
ContactYesYes, in order of preferenceA URI: mailto: for email, tel: for telephone, or a web page beginning with https://. RFC 9116 recommends encryption when the contact is an email address.
ExpiresYesNoThe date and time after which the file should be considered stale, in RFC 3339 format. RFC 9116 recommends a value less than a year in the future.
EncryptionNoYesA URI where a key for encrypted reports can be retrieved, such as an https:// URL, a dns: OPENPGPKEY record or an openpgp4fpr: fingerprint. The key itself must not appear in the field.
AcknowledgmentsNoYesAn https:// page that recognizes researchers who reported vulnerabilities.
Preferred-LanguagesNoNoComma-separated language tags, such as en, ko. The order does not express priority. Without the field, researchers may assume English.
CanonicalNoYesThe https:// URIs at which this file is published. If the URI the file was fetched from is not listed, the RFC says its contents should not be trusted.
PolicyNoYesAn https:// link to the vulnerability disclosure policy.
HiringNoYesAn https:// link to security-related job openings.

Serving the file

Section 3 of the RFC is strict about delivery. The file must be placed under /.well-known/, must be fetched over HTTPS, and must be served as text/plain with the charset parameter set to utf-8. A copy at the old location, /security.txt, is allowed for compatibility, either as a file or as a redirect to the /.well-known/ version; if both exist, the /.well-known/ file wins. Where site files live: the root path and /.well-known/ explains the /.well-known/ prefix, and serving site files: media types, encoding and status codes shows how to check the headers a server sends.

Shell
curl -sI https://example.com/.well-known/security.txt | grep -i '^content-type'
curl -s https://example.com/.well-known/security.txt

A file applies only to the host it was fetched from. The file at example.com does not cover www.example.com or shop.example.com, and a file on a subdomain does not cover its parent domain. An organization with several hosts publishes a file on each, which is where the Canonical field and a signature help: one signed file can list every location it is published at. A file may also say that it applies to the organization's products and services, and the RFC suggests using the Policy page to describe the scope in detail.

Signing

RFC 9116 recommends signing the file with an OpenPGP cleartext signature, as defined in RFC 4880, and including a Canonical field when it is signed, so that the signature also vouches for the file's location. The signed file starts with a -----BEGIN PGP SIGNED MESSAGE----- line, the fields follow unchanged, and the signature block comes last. Verifying that the signing key is genuine is left to the researcher; the key named in Encryption is not necessarily the one used to sign.

Keeping it current

Expires is the field that most often goes wrong, because nothing reminds a site to change it. A file past its expiry date tells researchers that its contacts may no longer work. Treat the date as a review deadline: before it arrives, confirm that every Contact still reaches someone, then move Expires forward and re-sign the file if it is signed. The securitytxt.org site, created by the format's authors, offers a form that builds a file with these fields.

See also

References

  1. Foudil, E. and Shafranovich, Y. RFC 9116: A File Format to Aid in Security Vulnerability Disclosure. IETF, April 2022 rfc-editor.org (accessed 5 December 2026)
  2. Well-Known URIs registry. IANA iana.org (accessed 5 December 2026)
  3. security.txt. securitytxt.org securitytxt.org (accessed 5 December 2026)
  4. RFC 8615: Well-Known Uniform Resource Identifiers (URIs). IETF, May 2019 rfc-editor.org (accessed 5 December 2026)
  5. RFC 4880: OpenPGP Message Format, section 7 (cleartext signature framework). IETF, November 2007 rfc-editor.org (accessed 5 December 2026)