Skip to content
startupcybersecurity
Vulnerability disclosuresecurity.txt

security.txt Explained: How to Add One in 10 Minutes

What security.txt is (RFC 9116), the two required fields, a ready-to-copy example, and where to host it so researchers can report vulnerabilities to you.

Jay Dabhi

By , CISM · Cybersecurity Analyst

Updated

2 min read

security.txt is a small text file at /.well-known/security.txt that tells security researchers how to report vulnerabilities to you. It's defined in RFC 9116 and needs only two fields: Contact (an email address or URL) and Expires (a date, ideally less than a year away). Publishing one takes about 10 minutes and shows reviewers that you have a way to receive security reports.

Why it matters

When someone finds a vulnerability in your product, they need a way to tell you. Without one, reports go to sales@, to a founder's LinkedIn, or nowhere at all. Enterprise security questionnaires also commonly ask whether you have a vulnerability disclosure process; security.txt is the simplest public evidence of one.

A ready-to-copy example

Contact: mailto:security@yourdomain.com
Expires: 2027-11-01T00:00:00.000Z
Preferred-Languages: en
Policy: https://yourdomain.com/security-policy
Canonical: https://yourdomain.com/.well-known/security.txt
  • Contact (required): an email address (mailto:) or a URL to a reporting form. You can list more than one.
  • Expires (required): when the file should be considered stale. RFC 9116 recommends less than a year in the future. Set a reminder to update it.
  • Policy (optional): a page explaining what's in scope, how you respond and whether you offer rewards.
  • Canonical (optional): the file's own URL, which helps detect copies.
  • Encryption (optional): a link to your PGP key, if you want encrypted reports.

Where to put it

Serve the file over HTTPS at exactly https://yourdomain.com/.well-known/security.txt, as plain text.

  • Next.js: create public/.well-known/security.txt.
  • Static hosting (Vercel, Netlify, Cloudflare Pages): put it in your public or static folder under .well-known.
  • nginx or Apache: place it in the web root under .well-known/.

Respond like you mean it

Publishing the file is a promise to read the inbox:

  1. Acknowledge reports within a few business days.
  2. Fix, or explain why something isn't a vulnerability.
  3. Thank the reporter, and credit them if they'd like.

Check your work

Open https://yourdomain.com/.well-known/security.txt in a browser. Our free security score also checks for security.txt as part of its disclosure hygiene check.

Frequently asked questions

Do I need a bug bounty to publish security.txt?

No. security.txt only tells people how to contact you. You can accept reports without paying bounties; say so in a linked policy so researchers know what to expect.

Which email address should I use?

A shared inbox that more than one person reads, such as security@yourdomain.com. Personal addresses get lost when people change roles or leave.

Will security.txt attract attacks?

No. Attackers don't need an invitation. security.txt helps the people who already found a problem and want to tell you about it, instead of posting it publicly.

More guides