A security.txt file is a short plain text file that tells anyone who finds a security problem on your website how to report it. It lives at one fixed address, /.well-known/security.txt, and follows RFC 9116, published in April 2022. Writing it takes minutes. The harder part is having someone ready to read what comes in.
Our guide to what a CVE is covers what happens after a flaw is public: IDs, scores and patch order. This post covers the step before that, when a stranger finds a problem on your own site and wants to tell you. It walks through the standard, each field, a sample file, setup on WordPress and Drupal, and what to do when a report lands.
The short version: publish a security.txt file with at least a Contact line and an Expires date less than a year out. Point Contact at a shared mailbox someone checks. Add a Policy link if you can write one page on how you handle reports. Put a renewal reminder on the calendar. A stale file can be worse than none.
What security.txt is, and what RFC 9116 says
RFC 9116 was written by Edwin Foudil and Yakov Shafranovich. It is an Informational RFC, not an Internet Standards Track specification. It is still the reference for the format. The file is a list of Field: value lines, and lines that start with # are comments.
Three points from the RFC are easy to miss:
- It covers one host. A file applies only to the domain it was fetched from, not to subdomains or the parent domain.
- It is not permission to test. The RFC says researchers should not assume that having or lacking a file grants or denies permission for security testing.
- It does not replace a policy. The RFC calls the file a complement to other disclosure resources and points to the Policy field for scope and details.
Why a nonprofit or association should publish security.txt
People do report problems to small organizations. A researcher notices an exposed file, or a scanner flags an old plugin. Without a clear contact, those reports go to a general inbox, a social media account, or nowhere.
A security.txt file gives that person one place to look, and routes the report to someone who knows what to do with it. If an agency or host runs the site, the file can list a shared address that reaches them too.
The file costs nothing. The risk is in the follow-through. A file that points to a dead mailbox tells a researcher you are not listening.
The two required fields: Contact and Expires
RFC 9116 treats every field as optional except two.
Contact must appear at least once. Its value is a URI: mailto: for email, tel: for a phone number, or an https:// web address such as a report form. You can list several. The RFC says to list them in order of preference, first one preferred. When the contact is an email address, the RFC recommends that encryption be used.
Expires must appear exactly once. It is a date and time after which the file should be treated as stale, written in the RFC 3339 format, such as 2027-10-31T23:59:59Z. The RFC recommends a date less than a year in the future.
Use a shared address such as security@, which survives staff changes. Make sure it is a real mailbox or group, not an alias that bounces.
Optional security.txt fields
The other six fields in RFC 9116 add context. Use the ones you can keep accurate.
| Field | What it points to | Worth it for a small team? |
|---|---|---|
| Encryption | A link to your public encryption key. The key itself must not go in the file. | Only if someone can actually decrypt messages |
| Policy | Your vulnerability disclosure policy page | Yes, even a short one |
| Preferred-Languages | Languages you read, as language tags such as en, es |
Yes, if you serve members in more than one language |
| Canonical | The exact URLs where this file officially lives | Yes, it costs one line |
| Acknowledgments | A page that thanks people who reported issues | Optional |
| Hiring | Security job openings | Rarely |
Canonical matters more than it looks. The RFC says that if a file has Canonical lines and the URL you fetched it from is not among them, the file should not be trusted. Keep those lines in step with where the file is served.
The RFC also recommends an OpenPGP signature, which proves the file came from you but means re-signing after every edit. Most small teams can skip it. The IANA field registry also lists CSAF and Bug-Bounty, from other documents. Skip them unless you publish advisories or pay bounties.
A sample security.txt file for example.org
Here is a complete file for a made-up association at example.org. Replace every value with your own.
# security.txt for www.example.org
# Report security issues using the contacts below.
Contact: mailto:security@example.org
Contact: https://www.example.org/report-a-security-issue
Expires: 2027-10-31T23:59:59Z
Preferred-Languages: en, es
Policy: https://www.example.org/security-policy
Acknowledgments: https://www.example.org/security-thanks
Canonical: https://www.example.org/.well-known/security.txt
The email comes first, so it is the preferred contact. Encryption and Hiring are left out because this organization has no key and no security jobs.
If you would rather fill in a form, the securitytxt.org generator, from the RFC’s two authors, builds the file and lets you copy it.
Where the file goes and how it must be served
The RFC sets the rules:
- Path. The file must be under
/.well-known/, sohttps://www.example.org/.well-known/security.txt. - Legacy path. A copy or redirect at
/security.txtis allowed. If both exist, the/.well-known/one wins. - HTTPS only. The file must be fetched over HTTPS.
- Plain text. It must be served as
text/plainin UTF-8.
Like robots.txt, it sits at a fixed place tools know to check. Each host needs its own file, so decide whether your events site, store or member portal subdomains get one. A hosted AMS or donation platform on a vendor’s domain is the vendor’s file to publish.
After you publish, open the URL. It should show plain text, not a themed page.
Adding security.txt on WordPress
You have two routes.
A static file. Create a .well-known folder in the site’s web root if it is not there, and upload security.txt into it. On Apache, WordPress’s default rewrite rules send a request to WordPress only when no real file or folder matches, so the file is served directly. On managed hosts where you cannot write to the web root, ask the host.
A plugin. Security.txt Manager lets you edit the file from the dashboard. Its listing says it registers rewrite rules for both /.well-known/security.txt and /security.txt, so there is no file to upload. It also notes that your web server may need its own rules if it handles those paths before WordPress. On a multisite network in subfolders, it works only for the main site, since a domain has one file.
A plugin is one more thing to patch, and our guide to reading a plugin vulnerability report applies to it like any other. For a file you change once a year, the static route is often enough.
Adding security.txt on Drupal
The same two routes apply.
A static file. Upload .well-known/security.txt to the web root. Drupal core’s .htaccess blocks most hidden files but has allowed the .well-known folder since a 2017 core fix for Drupal 8.3. On Nginx or a platform host, check the server rules or the host’s docs.
A module. The Security.txt module serves /.well-known/security.txt and a signature file, with an admin form under System and a Sign tab. You grant "View security.txt" to anonymous users and keep "Administer security.txt" to trusted roles. Its project page still calls the standard a draft and does not say whether the form has an Expires field. If yours does not, use the static file.
See what Drupal 10 end of life means for your site, and our Webform advisories in plain language for how fast a Drupal fix needs to go out.
Plugin and module details as of October 2026
From the WordPress.org and Drupal.org project pages, checked October 21, 2026. These change.
| Option | Latest version | Compatibility | Reported use |
|---|---|---|---|
| Security.txt Manager (WordPress) | 1.3.1, changelog dated August 17, 2026 | Tested up to WordPress 7.1.3 | 700+ active installs |
| Security.txt module (Drupal) | 8.x-1.6, May 16, 2024; covered by Drupal’s security advisory policy | Drupal 10.1 and later, and Drupal 11 | About 8,000 to 9,000 sites |
Keeping Expires current
The RFC is blunt about stale files. It says not having a file "may be preferable to having stale information in this file." An expired date tells a researcher the contact may be dead.
A simple routine works:
- Set Expires 11 months out, with a shared calendar reminder a month before.
- At renewal, send a test message to each Contact address.
- Check that every link in the file still loads.
- Update the date, publish, and open the live URL to confirm.
If staff who own the mailbox leave, update the file that week.
What to do when a security.txt report arrives
A file invites reports, so plan for them. For a small team, a short process covers most cases. This is our own rule of thumb:
- Acknowledge. Reply within a few business days to say you received it.
- Check it. Confirm the problem on your own site. Ask for details if you cannot reproduce it.
- Rate it. Use the triage order in our CVE guide. If it names a known CVE, check the CISA KEV catalog for active attacks.
- Fix it or pass it on. Send it to the agency, host or software vendor that owns the code.
- Close the loop. Tell the reporter when it is fixed, and credit them if they agree.
Be wary of reports that ask for payment before sharing details. The file does not promise a bounty, and your policy should say whether you offer one.
For the policy itself, CISA publishes a vulnerability disclosure policy template written for federal agencies under BOD 20-01. Its sections are a useful outline for any organization: scope, how to report, what reporters should do, and what they can expect. The template commits to acknowledging reports within three business days.
Frequently Asked Questions
What is security.txt in one sentence?
It is a plain text file at `/.well-known/security.txt` that tells people how to report a security problem with your website, defined in RFC 9116.
Which fields does security.txt require?
Two. Contact must appear at least once, and Expires must appear exactly once. Encryption, Policy, Preferred-Languages, Canonical, Acknowledgments and Hiring are optional.
How far in the future should Expires be?
The RFC recommends less than a year. We suggest about 11 months out, with a reminder to renew a month early.
Should we use a person’s email address as the contact?
Use a shared mailbox or group, such as security@ your domain, and test it at each renewal.
Does a security.txt file give people permission to test our site?
No. RFC 9116 says the file alone does not grant or deny permission for security testing. Set any testing rules in your policy.
Does one file cover all our subdomains?
No. A file applies only to the host it was fetched from. Each subdomain you run needs its own file if you want it covered.
Do we need a plugin or module?
No. A static file in the `.well-known` folder works on most WordPress and Drupal sites. A plugin or module adds an editing screen, plus one more thing to keep updated.
Do we have to sign the file?
No. The RFC recommends an OpenPGP signature, but it is optional. If you sign it, you must re-sign after every change, including each new Expires date.