Introduction
A security.txt file tells people who find a security vulnerability in a site how to report it. It is plain
text, published at /.well-known/security.txt, and was written down in 2022 as
RFC 9116, an Informational RFC (its own text says it is not an
Internet Standards Track specification; read from the RFC text). It is a pointer to contacts and policy, not a
permission to test: the RFC says a researcher should not assume that the presence or absence of the file grants or denies
permission for security testing.
Structure
The file is lines. A line is blank, a comment that starts with #, or a field: a name, a
colon, a space and a value. Field names are not case-sensitive. Every line ends with LF or CR LF, and the file is UTF-8
text. Two fields are required: at least one Contact, and exactly one Expires. Everything else is
optional, and a reader must ignore fields it does not know.
# Our security address
Contact: mailto:security@example.com
Contact: https://example.com/security-contact.html
Expires: 2027-12-31T18:37:07Z
Encryption: https://example.com/pgp-key.txt
Policy: https://example.com/security-policy.html
Acknowledgments: https://example.com/hall-of-fame.html
Preferred-Languages: en, es, fr
Canonical: https://example.com/.well-known/security.txt
The file may be signed with an OpenPGP cleartext signature (recommended). A signed file starts with
-----BEGIN PGP SIGNED MESSAGE-----, a Hash: line and a blank line, then the fields, then
-----BEGIN PGP SIGNATURE----- up to -----END PGP SIGNATURE-----. A line of the signed text that
starts with - is written - followed by the line. The fields and
rules page lists every field with the section of the RFC that defines it.
Where it is: for web sites under /.well-known/, served over HTTPS with the type text/plain and the
charset utf-8. A copy at the top level of the site is allowed for older readers, and the one under
/.well-known/ wins if both exist. The file applies only to the host that serves it, not to its subdomains or
parent domains (RFC 9116 section 3, 3.1).
In the explorer
Drop a file named security.txt on the explorer to see one node per line, grouped into the signed wrapper (the
header, the cleartext and the signature) when there is one. The tabs list the fields and the problems. Each rule that the
file breaks is listed as an Issue, with its line and column, and quoted from the RFC: a missing Contact or
Expires, a repeated Expires or Preferred-Languages, a web address that does not start
with https://, an email address written without mailto:, a key pasted into Encryption,
a date that is not RFC 3339, an Expires date that has passed (listed as an Issue with its line, judged against the day
the file is opened), lines that end with a lone CR, and the limits of
section 5.4. In a signed file it also lists a missing Hash: header, a signature without data or with data that is not
base64, and a line that starts with - without the - escape. Fields that are not in the IANA registry are
labelled as extension fields. The viewer never refuses a file
because of an Issue, and it does not verify the signature or fetch any address.
The Issues list has no classes, so a message that starts with Note: is a recommendation or an observation, not a rule
that the file breaks: a field name in lower case (field names are case-insensitive), a line that starts with From
in a signed file without the - escape (a SHOULD). Every other message is a MUST of the RFC. A Contact: with two
spaces after the colon is a MUST break (the grammar has exactly one space). An Expires date a year or more ahead is
shown only in the Overview tab, counted in calendar years from the day the file is opened (the RFC says less than a year ahead is
RECOMMENDED; our counting of "a year").
A file is recognised as security.txt by its name and its content. By name alone (how a dropped or listed
security.txt reaches the viewer) it is enough that the text is not HTML or XML and holds at least one
Contact: or Expires: line, so a file with many broken lines still opens here and shows its Issues. The
stricter content test (at least one registered field with a value of the right kind, and no more than one in five of the lines
that are not blank or comments that fits no field form) is kept for callers that have no name. Any other file called
security.txt (an HTML error page, prose, an empty file, a text without those lines) opens as plain text, as before.
There is no size limit on the claim; the viewer says "too large" above 8 MiB. A table of more than 5,000 rows is paged, 200 rows at
a time with Previous and Next, and the Overview says so: no field is left out. The text is not coloured: no highlighting family
exists for it yet.
Not described
Known, not yet covered
- Viewer: the OpenPGP signature is shown as lines and not verified; the hash header is not checked against the registry of hash names.
- Viewer: a language tag is checked for its shape only, not against the full grammar of RFC 5646 or the IANA subtag registry; a URI is checked for a scheme, not against all of RFC 3986.
- Viewer: the text is shown plain: there is no highlighting family for security.txt.
- Viewer: the "less than a year ahead" recommendation for
Expiresis shown only in the Overview tab, not in the Issues list; the expiry is judged against the clock of the machine that opens the file. - Viewer: the hash names in the
Hash:header are not checked against the registry; the signature data is checked for base64 characters only (RFC 4880's checksum is not computed); the armor header keys are not checked. - Viewer: the private-use (
x-) and the grandfathered (i-) language tags pass the shape test by their shape only (the registry of RFC 5646 is not consulted). - Reference: the retrieval rules (redirects, TLS checks, certificate matching) of RFC 9116 sections 3 and 5 are summarised on the fields and rules page, not described in full.
Unknown
- Reference: what the registry means by the
Bug-Bountyvalues beyondTrueandFalse; the registry entry quotes those two and nothing else. - Viewer: whether a byte order mark is allowed in a security.txt: RFC 9116 section 4 requires UTF-8 in Net-Unicode form (RFC 5198), which was not read for this work, and the viewer accepts and does not mention a BOM. (The RFC text is the source of every rule on this page, read from the file; the IANA registry was read from a local copy dated 2026-03-07 and not re-fetched.)
- Viewer: how a given tool treats a file that breaks a MUST of the RFC; the RFC does not say, and the viewer shows every file.
Links
Software
- securitytxt.org – a generator and a checker for security.txt files (web)
Reference
- RFC 9116: A File Format to Aid in Security Vulnerability Disclosure – the specification (Informational)
- IANA: security.txt Fields – the registry of field names, with CSAF and Bug-Bounty