Security.txt Generator
Generate RFC 9116 compliant security.txt files to establish responsible vulnerability disclosure guidelines.
RFC 9116 Compliant File Content
Security.txt Generator — RFC 9116 Vulnerability Disclosure File Builder: Free security.txt generator. Create RFC 9116 compliant security.txt files for your website with contact, PGP key, expiration dates, and policy directives.
Understanding RFC 9116 & the security.txt Standard
When ethical security researchers discover a vulnerability on a public website or web application, finding the appropriate point of contact is notoriously difficult. Bug reports sent to generic sales or support email addresses often go ignored or misrouted. In April 2022, the Internet Engineering Task Force (IETF) standardized RFC 9116, establishing the security.txt protocol to provide a machine-readable and human-readable mechanism for organizations to define their security contacts and disclosure policies.
Analogous to how robots.txt informs search crawlers and humans.txt credits developers, security.txt resides in the standard /.well-known/security.txt directory on web servers. Implementing this file enables white-hat researchers to report zero-day flaws promptly and responsibly before malicious adversaries exploit them.
Define Security Contact
Input a designated security email address (mailto:) or secure web disclosure portal.
Set Expiration Date
RFC 9116 mandates an ISO 8601 expiration date (typically 6 to 12 months in the future).
Add PGP Key & Policy
Provide links to your public encryption key, bug bounty policy, and hall of fame.
Deploy to Server
Save the file as security.txt and place it in your server's /.well-known/ folder.
RFC 9116 Mandatory & Recommended Directives
- Contact (Mandatory): The direct URI (e.g.
mailto:security@domain.comorhttps://hackerone.com/company) where researchers submit reports. - Expires (Mandatory): The ISO 8601 date and time after which the data should be considered stale. This prevents abandoned web assets from advertising obsolete contacts.
- Canonical: The authoritative URL where the file is hosted (e.g.,
https://domain.com/.well-known/security.txt). - Encryption: Link to your PGP/GPG public key so researchers can encrypt sensitive vulnerability disclosures.
- Policy: Link to your responsible disclosure guidelines and safe harbor commitments.
Building an Enterprise Security Vulnerability Disclosure Program
In modern DevSecOps and enterprise cybersecurity, establishing a clear channel for responsible vulnerability disclosure is an essential component of SOC 2, ISO 27001, and NIST Cybersecurity Framework compliance. Historically, security researchers who identified critical remote code execution (RCE) flaws or SQL injections on corporate web properties struggled to find technical contacts, often resorting to tweeting executives or submitting generic contact forms that risked exposing sensitive exploits to untrusted staff.
RFC 9116 standardizes vulnerability intake, establishing the /.well-known/security.txt file as the universal beacon for white-hat security researchers. By publishing explicit PGP encryption keys, security disclosure policies, and safe harbor legal protections, organizations foster positive collaboration with global cybersecurity researchers while protecting user data.
Step-by-Step Server Deployment Guide
- Generate File Content: Use the interactive generator above to specify your contact URI, PGP public key link, policy URL, and expiration date.
- Create the .well-known Directory: In your web server's public root directory (e.g.
public_html,/var/www/html, ordist/), create a directory named.well-known. - Save and Upload: Save the output as a plain text UTF-8 file named
security.txtinside the.well-knowndirectory. - Verify Server Headers: Ensure your web server (Nginx, Apache, Caddy, or Cloudflare) serves the file with a
Content-Type: text/plain; charset=utf-8HTTP response header. - Test Public Resolution: Navigate in your web browser to
https://yourdomain.com/.well-known/security.txtand confirm the file loads with zero redirects and valid HTTPS certificates.
Frequently Asked Questions
RFC 9116 specifies that the file MUST be located under /.well-known/security.txt served over HTTPS. An optional redirect from /security.txt to /.well-known/security.txt is permitted.
Security contacts and email aliases change over time. The mandatory expiration date prevents security researchers from relying on outdated communication channels.
Serving the file over HTTPS prevents Man-in-the-Middle (MitM) attackers from tampering with contact emails or public PGP keys. The Content-Type: text/plain; charset=utf-8 header ensures that automated security parsers can read the directives without executing script injections.
RFC 9116 recommends setting the expiration date no more than 12 months in the future. Automated CI/CD linting or calendar alerts should trigger annual policy reviews and key rotation verifications before the file expires.