Skip to content
AdminKit
Free tool Updated

security.txt generator: how do you build an RFC 9116 security.txt file?

How does this check work, and what does the result tell you?

AdminKit's security.txt generator builds an RFC 9116 security.txt file from the Contact, Expires, Encryption, Acknowledgments, Preferred-Languages, Canonical, Policy and Hiring values you enter. It runs entirely in your browser: nothing is sent to any server. You then serve the file yourself at /.well-known/security.txt on your domain as plain text.

Part of the Security basics cluster — more tools, guides and terms on security basics.

One per line, most preferred first: mailto:, https:// or tel:.

RFC 3339 date-time in UTC. Starts just under a year ahead; RFC 9116 recommends less than a year.

A URI where your key can be fetched — never paste the key itself.

Page that thanks researchers who reported issues.

Comma-separated language tags, e.g. en, fr.

The https:// URL(s) this file is served from.

Your vulnerability disclosure policy.

Security-related job openings.

Built entirely in your browser — nothing you type is sent to AdminKit or any other server, and this tool fetches nothing from your site.

  • Expires is required (RFC 9116 §2.5.5).

What the result means

This is the security.txt file body built from the values you entered — it says nothing about what your site serves today. Contact lines keep the order you typed them in, which RFC 9116 treats as your order of preference.

Next step

Save the text as security.txt, serve it over HTTPS at /.well-known/security.txt on your domain as text/plain, then fetch it once with curl -sI to see the status code and Content-Type it really returns. Set a reminder to replace the file before its Expires date. For the rest of your site's response headers, run AdminKit's HTTP security headers check.

Keep this result

Copy a link to this check so you can share it or run it again later. Want a heads-up when this result changes? Talk to our team and we'll set it up for you.

How it works and limits

Fill in your contacts, an expiry date and any optional fields below, and this tool assembles the security.txt file as you type, entirely in your browser — nothing you enter is sent to AdminKit or any other server, and nothing is fetched from your site. Building the file changes nothing by itself: you still have to save it, serve it from your web server and replace it before it expires.

What is security.txt for?

A security.txt file tells a security researcher who found a problem on your site how to report it to you. RFC 9116 defines the format: a short plain-text file of Name: value lines, served at a fixed path under /.well-known/ (the well-known URI prefix), so anyone can find your security contact without hunting through a contact page. The security.txt project site describes the problem it solves: researchers who find a risk often lack a channel to disclose it, so the issue may go unreported.

OWASP’s Vulnerability Disclosure Cheat Sheet lists a security.txt file at /.well-known/security.txt among the common ways to publish security contact details, and says to include at minimum the required Contact and Expires fields.

Which fields can the file contain?

  • Contact (required, may repeat) — how to report a problem: mailto:, https:// or tel:. RFC 9116 says the first Contact line is the preferred method, the second the next preferred, and so on; this tool keeps them in the order you type them.
  • Expires (required, once) — the date and time after which the file should be treated as stale, as an RFC 3339 date-time such as 2027-11-21T00:00:00Z.
  • Encryption — a URI where researchers can fetch your key for encrypted reports. The RFC forbids putting the key itself in this field; the tool rejects a pasted PGP key block.
  • Acknowledgments — a page that thanks researchers who reported issues.
  • Preferred-Languages (once) — comma-separated language tags such as en, fr. All listed languages have equal priority; if the field is absent, researchers may assume English.
  • Canonical — the URL or URLs this file is served from. If a file lists Canonical lines and was fetched from a URL not among them, RFC 9116 says its contents should not be trusted.
  • Policy — your vulnerability disclosure policy, which tells researchers what you allow and how you handle reports.
  • Hiring — your security-related job openings.

Every field that holds a web URI must begin with https://. Cloudflare’s guide to setting up a security.txt file in its dashboard asks for the same fields, with Contact and Expires marked required and the same mailto:, tel: and https:// prefixes for contacts.

Where does the file have to be served?

RFC 9116 requires the file under the /.well-known/ path, fetched over HTTPS, with a text/plain content type and the UTF-8 charset:

https://example.com/.well-known/security.txt
Content-Type: text/plain; charset=utf-8

A file only applies to the exact domain or IP address it was fetched from, not to subdomains or parent domains, so a subdomain that needs its own contact needs its own file. Once the file is live, fetch it once to see the status code and content type it really returns:

curl -sI https://example.com/.well-known/security.txt

The file is served over HTTPS, so a valid certificate matters; AdminKit’s SSL certificate check shows what your site presents today, and the HTTP security headers check covers the other response headers your site sends.

How to read the results

  • File body — one field per line in a fixed order: every Contact line, Expires, then Encryption, Acknowledgments, Preferred-Languages, Canonical, Policy and Hiring for each one you filled in. Copy it with Copy security.txt.
  • Expires — starts just under a year ahead at midnight UTC. A date with an offset such as +07:00 is converted to UTC in the output.
  • Warnings (amber) — the file is still built, but something deserves a look: Expires more than a year ahead, a Canonical URL that does not end in /.well-known/security.txt, or an email Contact with no Encryption key (the RFC recommends encryption when the contact is an email address).
  • Errors (red, no output) — a missing Contact, a Contact that is not a mailto:, https:// or tel: URI, a missing or malformed Expires, an Expires date in the past, an http:// URL in any field, a pasted key in Encryption, or a language that is not a language tag.

Examples

The smallest valid file, one contact and an expiry date:

Contact: mailto:security@example.com
Expires: 2027-11-21T00:00:00Z

A fuller file with two contacts, preferred first, and the optional fields:

Contact: mailto:security@example.com
Contact: https://example.com/security-contact.html
Expires: 2027-11-21T00:00:00Z
Encryption: https://example.com/pgp-key.txt
Acknowledgments: https://example.com/hall-of-fame.html
Preferred-Languages: en, fr
Canonical: https://example.com/.well-known/security.txt
Policy: https://example.com/disclosure-policy.html
You enter as ContactResult
security@example.comError: write it as a mailto: URI
http://example.com/securityError: web URIs must begin with https://
tel:+1-201-555-0123Accepted

Limits

  • This tool only builds text. It never fetches your site, never uploads the file and cannot tell you whether a security.txt file is already live, reachable or served with the right content type.
  • It does not sign the file. RFC 9116 recommends an OpenPGP cleartext signature; that is out of scope here, and the tool never asks for a key.
  • It does not add comment lines; you can add lines starting with # yourself, which the RFC treats as comments.
  • It checks the syntax of what you enter, not whether a mailbox, phone number or page actually exists.

This tool is part of AdminKit’s security basics cluster, next to the open port check and the other checks listed there.

Frequently asked questions

Does this tool send what I type to AdminKit or anywhere else?

No. Every field is read by your browser and the file is built there with plain JavaScript; nothing you type is sent to AdminKit or any other server, and the tool fetches nothing from your site. That also means it cannot see whether your domain already serves a security.txt file.

Which fields does a security.txt file need?

Only two. RFC 9116 says Contact must always be present and Expires must always be present and must not appear more than once. Every other field (Encryption, Acknowledgments, Preferred-Languages, Canonical, Policy, Hiring) is optional. This tool refuses to build a file without a Contact and a valid Expires date.

Why does the tool reject security@example.com as a Contact?

RFC 9116 requires the Contact value to be a URI, so an email address has to be written as mailto:security@example.com and a phone number as tel: followed by the number. A web address must begin with https://; the tool rejects http:// for every field because the RFC requires https for web URIs.

How far ahead should Expires be?

RFC 9116 recommends less than a year into the future, so stale contact details do not linger. The tool fills in a date just under a year ahead, shows a warning if you enter a date more than a year ahead, and refuses a date that has already passed.

Does the tool sign the file with OpenPGP?

No. RFC 9116 recommends an OpenPGP cleartext signature, but signing needs your private key, and this tool never asks for keys. The file it builds is unsigned. If you sign it, do that with your own OpenPGP software after you are done here, and add a Canonical line so the signature also covers the file's location.