security.txt generator and validator for RFC 9116

This tool writes a security.txt file that follows RFC 9116, with the required Contact and Expires fields and the optional ones, and warns when Expires is more than a year ahead. Switch to check mode to paste an existing file, signed or not, and see which rule it breaks.

Updated

An email becomes mailto:, a phone number becomes tel:, a web address must be https://. At least one is required.

days

RFC 9116 recommends less than a year ahead. Over 364 days you get a warning, not an error.

A link to the key, never the key itself. One per line.

Language tags separated by commas. Order carries no priority in RFC 9116.

Where this file lives. Needed if you sign the file.

YYYY-MM-DD. Leave empty to use today's date from your device.

Expires

2027-10-10

2 contacts, 5 lines in all

security.txt

# Security contact for the site that serves this file.
# Generated 2026-11-14. Regenerate before the Expires date.
Contact: mailto:security@example.com
Contact: https://example.com/security/report
Expires: 2027-10-10T06:15:27.000Z
Preferred-Languages: en
Canonical: https://example.com/.well-known/security.txt
Where to host it
/.well-known/security.txtHTTPS only, text/plain; charset=utf-8
Fields written
Contact, Expires, Preferred-Languages, Canonical
  • Host the file at https://your-domain/.well-known/security.txt over HTTPS with Content-Type text/plain; charset=utf-8. A copy or redirect at /security.txt is allowed for old tools, and the /.well-known/ one wins if both exist.
  • Signing is recommended: gpg --clearsign security.txt writes an OpenPGP cleartext signature, and the Canonical field lets readers confirm which URL the signed file belongs to. Paste a signed file into the check mode to see it is read correctly.
  • Expiry is 2027-10-10. Put a reminder around 2027-09-10 to regenerate the file.

Code Audit: from ₹90,000 / $950

A security.txt tells researchers where to send what they find. Our code audit includes a dependency and security review, so you can find those issues first. It is not a penetration test.

What goes in a security.txt file?

security.txt (RFC 9116) is a small text file that tells security researchers how to report a vulnerability to you. Each line is a field name, a colon and a value; lines starting with # are comments, and field names are case-insensitive. Two fields are required. Contact says where to report (a mailto:, tel: or https:// URI, listed in order of preference, repeatable), and Expires says when the file stops being trustworthy, as an RFC 3339 date-time, exactly once.

The rest are optional: Encryption (a URL to your public key, never the key itself), Acknowledgments (a thank-you page), Preferred-Languages (RFC 5646 tags, once), Canonical (where this copy lives), Policy (your disclosure policy) and Hiring (security jobs). Web URIs in any field must use https. Readers must ignore fields they don't know, so a typo in a name isn't an error, just a field nobody reads. RFC 9116 recommends an Expires less than a year ahead, which this tool warns about.

The file goes at /.well-known/security.txt on the host, over HTTPS, as text/plain with the utf-8 charset. A /security.txt copy is allowed for older tooling. The RFC recommends signing it with an OpenPGP cleartext signature; the check mode strips that wrapper and validates the text inside.

Contact: mailto:security@example.com
Expires: 2027-06-30T18:37:07.000Z
Preferred-Languages: en, hi
Canonical: https://example.com/.well-known/security.txt

Which security.txt fields are required, and how many times can each appear?

Field rules from RFC 9116 (checked 2026-11-11)
FieldRequiredRepeatableValue
ContactYesYesmailto:, tel: or https:// URI, most preferred first
ExpiresYesNo, exactly onceRFC 3339 date-time; recommended less than a year ahead
EncryptionNoYeshttps:// URL to the key; keys must not appear in the field
AcknowledgmentsNoYeshttps:// URL
Preferred-LanguagesNoNo, at most onceComma-separated RFC 5646 tags, at least one
CanonicalNoYeshttps:// URL of this file; each applies to its own location only
PolicyNoYeshttps:// URL
HiringNoYeshttps:// URL

How to publish a security.txt file

  1. 1
    Enter a contact and an expiryGive at least one reporting address. Emails become mailto:, phones become tel:, web pages must be https. Choose how many days ahead the file should expire, under a year.
  2. 2
    Add the optional fields you can keep upAdd a key URL, disclosure policy, languages and your canonical URL. Only add what you maintain; an empty promise is worse than no field.
  3. 3
    Upload it and check the headersSave it as /.well-known/security.txt on every host you want covered, then run curl -I on it and confirm HTTP 200 and Content-Type text/plain; charset=utf-8.
  4. 4
    Calendar the renewalSet a reminder 30 days before Expires. Paste the live file into check mode to confirm it still passes.

Frequently asked questions

Does security.txt have to expire?
Yes. RFC 9116 makes the Expires field mandatory, exactly once, and says readers should not trust the file after that date. It recommends a value less than a year ahead so the file reflects a contact that someone still maintains. An old file with a dead mailbox is a reason a researcher gives up on reporting.
Can I put my PGP key in the Encryption field?
No. RFC 9116 says keys must not appear in the Encryption field. The value is a URI that points to the key, such as https://example.com/pgp-key.txt. This tool rejects a pasted key block and tells you to publish it at a URL instead.
Where do I host security.txt, and does /security.txt still work?
RFC 9116 says organisations must place it under /.well-known/, so https://example.com/.well-known/security.txt. A copy or a redirect at /security.txt is allowed for legacy tools, and the /.well-known/ one wins if both exist. Serve it over https as text/plain with the utf-8 charset, and put a file on each host you want researchers to find it on.
Should I sign my security.txt with PGP?
RFC 9116 recommends an OpenPGP cleartext signature, for example gpg --clearsign security.txt, so a reader can tell the file wasn't altered. Pair it with the Canonical field so a signed copy can't be copied to another site. It is a recommendation, not a requirement, and an unsigned file is still valid.
Is a bare email address allowed in Contact?
No. RFC 9116 defines the Contact value as a URI, so an email must be written as mailto:security@example.com and a phone number as tel:+918012345678. The generator adds the prefix for you when you type a bare address; the check mode flags a file that lacks it.
What happens to unknown fields in a security.txt file?
RFC 9116 says researchers must ignore fields they don't explicitly support. A misspelled name, such as Contacts: instead of Contact:, is therefore not rejected by the readers; it just isn't read, and your file then lacks its required Contact. The check mode lists unknown names so you can spot typos.

Sources

Related tools

See all 135 free tools

Need a custom dev tool for your team?

We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.

Built by CountryDevs · No signup · No ads · We count visits, never what you enter