What is security.txt?
security.txt is a small text file at /.well-known/security.txt that tells security researchers how to report a vulnerability they find on your website. Its format is described in RFC 9116. Without it, someone who finds a problem may not know how to reach you.
What the Shield scan checks
Valid security.txt, worth 10 of 100 points. Shield requests /.well-known/security.txt over HTTPS on the hostname you entered, without following redirects. The check passes when the response is HTTP 200, its Content-Type starts with text/plain, Shield finds a Contact field, and it can read the first Expires value as a date and time in the future.
If the check fails, the scan tells you: Publish /.well-known/security.txt with a Contact and a future Expires date.
RFC 9116 allows the well-known address to redirect, but Shield needs a direct 200 there to award the points. Passing this check does not mean the file meets every rule in RFC 9116.
What goes in the file
An example, served with Content-Type: text/plain; charset=utf-8. Replace the details with your own and pick an Expires date less than a year from the day you publish:
Contact: mailto:security@example.com
Contact: https://example.com/report
Expires: 2027-10-31T23:00:00Z
Preferred-Languages: en
Policy: https://example.com/security-policy
Canonical: https://example.com/.well-known/security.txt
- Contact (required, one or more): where to send reports, written as a URI. Use
mailto:for an email address,tel:for a phone number, orhttps://for a web form or contact page. List your preferred method first: RFC 9116 says contacts should be in order of preference. - Expires (required, exactly once): the date and time when the information goes stale, in RFC 3339 format with a time zone (a final Z means UTC). RFC 9116 recommends less than a year ahead.
- Policy: a page describing how you handle reports.
- Preferred-Languages, Canonical, Encryption, Acknowledgments and Hiring are optional. If you use Canonical, list the exact address where each copy of the file is served.
You can open this website's own file to see its current contact details and expiry date.
Where it goes and how it is served
- At
/.well-known/security.txton each hostname you want covered, including the www version if you use it. For older tools,/security.txtcan redirect to the well-known file or hold a copy (a redirect leaves only one file to keep up to date); when both exist, the one under /.well-known/ is the one to use. - Over HTTPS only.
- As plain text: the Content-Type must be text/plain with the utf-8 character set.
How to add one
- Write the file with at least Contact and Expires. securitytxt.org has a generator.
- Use an address that someone reads, ideally a shared one such as security@ rather than one person's inbox.
- Upload it to a folder named .well-known at the root of your site. Some hosts hide folders whose names start with a dot, so open the address in a browser to check it works.
- Give the person who reads the inbox a reminder to renew the Expires date before it runs out.
Check your security.txt now
Type your website address to run the free scan. It checks this and the other 10 items. No account, no email.
The interactive scan needs JavaScript. See the checks you can run yourself.
Questions
What happens when the Expires date passes?
RFC 9116 says the information should then be treated as stale and not used, and the Shield scan stops counting the file as valid.
Can I use a web form instead of an email address?
Yes. Put the form's https:// address after Contact:. For an email address use mailto:, and for a phone number use tel:.
Does publishing security.txt make my website a target?
The file does not describe how your website is built. It gives security researchers a standard place to find your contact details and any reporting instructions you choose to publish.
Do I need to sign the file?
It is optional. RFC 9116 recommends an OpenPGP cleartext signature. Researchers verify it with a trusted copy of your public key; keep the private signing key confidential. The Shield scan does not require a signature.
Sources
- RFC 9116: A File Format to Aid in Security Vulnerability Disclosure (security.txt)
- RFC 8615: Well-Known Uniform Resource Identifiers
- securitytxt.org: the project behind security.txt, with a file generator
- OWASP: Vulnerability Disclosure Cheat Sheet
Written by Apex Flow Labs LLC for Apex Flow Shield. A score of 100 means the responses Shield received passed all 11 of its checks. It does not prove each setting is configured well, and no scan can show that a website cannot be attacked.