Skip to main content
ContentLow PriorityFree

Security.txt (RFC 9116)

Updated November 2026·SecScanner Team

Security.txt is a standard file that tells security researchers how to report vulnerabilities responsibly.

61% of the 101 most-visited sites we scan fail this check. See the full data.

Results in 1–3 minutes · Free · No signup required

Want the result for your own site? Free Robots.txt & Security.txt Checker — paste your domain, get the report.

Why It Matters

Without clear reporting instructions, researchers might disclose vulnerabilities publicly or give up trying to report them. Security.txt makes responsible disclosure easier.

How We Check

We check for /.well-known/security.txt with required fields (Contact, Expires) and recommended fields (Encryption, Acknowledgments).

Good vs Bad Values

Good and bad values for Security.txt (RFC 9116)
ValueVerdictWhy
/.well-known/security.txt returns 200, text/plain, with Contact and a future ExpiresGoodThe canonical location, the right media type and both required fields. This is the only state the check accepts.
Contact: mailto:security@example.com (plus an optional https:// form URL)GoodRFC 9116 allows an email, a phone number or a web URL, and the field may be repeated. Use a role mailbox that more than one person reads.
Expires: 2027-06-30T23:59:59ZGoodAn ISO 8601 timestamp. The RFC recommends a value less than a year ahead so that stale files stop being trusted on their own.
No file at /.well-known/security.txt or /security.txtBadResearchers have no stated route for a report, so a finding often goes to a public post or to nobody at all.
Expires: 2023-12-31T23:59:59Z (in the past)BadAn expired file is treated as abandoned. The check fails it until the date is renewed.
File present but no Expires lineBadExpires has been mandatory since the RFC was published, and older templates that omit it no longer pass.
File served as text/html or application/octet-streamBadOften a catch-all route or a CMS 404 page returning 200. The RFC requires text/plain with UTF-8, and the check inspects the Content-Type.
Only /security.txt at the site root, nothing under /.well-known/WeakThe root path is a legacy location the RFC still tolerates. The check accepts it, but tools look in .well-known first.

How to Fix

Create /.well-known/security.txt with Contact (email or URL), Expires date, and optionally Encryption key and Policy URL. Sign it with PGP if possible.

A complete file (replace the values; keep the field names):

Contact: mailto:security@example.com
Contact: https://example.com/security/report
Expires: 2027-06-30T23:59:59Z
Preferred-Languages: en
Canonical: https://example.com/.well-known/security.txt
Policy: https://example.com/security/policy

Nginx — force the right media type for the exact path:

location = /.well-known/security.txt {
    default_type "text/plain; charset=utf-8";
    try_files $uri =404;
}

Apache — set the type on the file:

<Files "security.txt">
    ForceType "text/plain; charset=utf-8"
</Files>

Next.js — put the file at public/.well-known/security.txt; files under public/ are served as static assets with a type derived from the .txt extension. WordPress — create the .well-known folder in the web root and upload the file there; the rewrite rules pass requests for real files straight through. Express — app.use('/.well-known', express.static('well-known')) before any catch-all route.

Verify:

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

The first line of output must read text/plain; charset=utf-8. If you sign the file with a PGP cleartext signature, keep the Canonical field so a reader can tell where the signed copy is meant to live.

Common Mistakes

  • Copying a template with a placeholder date and never renewing it. Put the renewal in a calendar or generate the file in the deploy pipeline with a date one year ahead.
  • Pointing Contact at a personal mailbox. When that person leaves, reports vanish. Use an alias such as security@ that forwards to a team.
  • Letting the single-page-app fallback answer for the path. The server returns index.html with status 200, so the file looks present but is HTML. Add an explicit route or a static file.
  • Forgetting that the file must be reachable over HTTPS on the exact host being scanned. A file on www.example.com does not cover app.example.com.
  • Publishing a Policy or Encryption URL that returns 404. A broken link in a security contact file is worse than leaving the field out.

Frequently Asked Questions

What is Security.txt (RFC 9116)?

Security.txt is a standard file that tells security researchers how to report vulnerabilities responsibly.

Why does Security.txt (RFC 9116) matter for website security?

Without clear reporting instructions, researchers might disclose vulnerabilities publicly or give up trying to report them. Security.txt makes responsible disclosure easier.

How do I fix Security.txt (RFC 9116) issues?

Create /.well-known/security.txt with Contact (email or URL), Expires date, and optionally Encryption key and Policy URL. Sign it with PGP if possible.

Related Security Checks

Related Tool

Robots.txt & Security.txt Checker

Run all 3 related checks with our free robots.txt & security.txt checker

Check Your Website Now

Run a free security scan to check for Security.txt (RFC 9116) issues and 61 other security checks.

Scan Your Website Free