Security.txt Generator – Create an RFC 9116 File Online
Use the Security.txt Generator above to create a machine-readable security.txt file for your website. Add the contact method security researchers should use, set an expiration date, include your disclosure policy and optional fields, then validate and download the finished file.
Security.txt gives researchers a predictable place to find vulnerability reporting instructions instead of searching your footer, support portal or general contact channels.
The current format is defined by RFC 9116.
What Is security.txt?
Security.txt is a plain-text file that publishes information about an organization’s vulnerability disclosure process.
Its purpose is simple: make it easier for security researchers to report a vulnerability to the right people.
A typical file can contain fields such as:
- Contact
- Expires
- Policy
- Encryption
- Acknowledgments
- Hiring
- Canonical
- Preferred-Languages
- CSAF
The file is not a vulnerability scanner. It does not make a website secure by itself. It is a communication mechanism that reduces friction after someone discovers a potential security problem.
Where Should security.txt Be Located?
The standard location is:
/.well-known/security.txt
For example:
https://example.com/.well-known/security.txt
RFC 9116 defines this well-known location so researchers and automated tools do not need to guess where your security contact information is published.
A site may also expose /security.txt as a fallback, but the .well-known location is the important one to implement.
After publishing, open the exact live address in a browser and confirm it returns the file correctly.
What Fields Are Required?
A valid security.txt file needs at least one Contact field and an Expires field.
The Contact field tells a researcher where to report a vulnerability.
The Expires field tells them how long the published information should be considered current.
Other fields can add valuable context, but these two are central to the format.
This generator highlights required values and helps format the optional fields correctly.
Contact Field
Contact is the most important field in the file.
You can provide more than one contact method and list them in your preferred order.
Common options include:
- A security email address
- A vulnerability-reporting form
- A telephone URI
- Another supported contact URI
A dedicated security address or disclosure form is usually clearer than sending researchers to a general customer service inbox.
Whatever method you publish, make sure someone actively monitors it.
A technically correct security.txt file is not useful if reports go to an inbox nobody reads.
Expires Field
Expires tells researchers when the security.txt information should be considered stale.
Do not set it and forget it.
Contact addresses change, teams reorganize, policies move and public keys expire. A clearly dated file gives researchers an indication that your disclosure information is being maintained.
Choose a practical renewal cycle and set an internal reminder to review the file before it expires.
When you update security.txt, verify every URL and contact method at the same time.
Policy Field
The Policy field points to your vulnerability disclosure policy.
A good disclosure policy can explain:
- What systems are in scope
- What testing is permitted
- What testing is prohibited
- How to submit a report
- What information to include
- Expected response times
- Safe-harbor language
- Rules about public disclosure
- Reward or bug bounty information, if applicable
Security.txt should remain concise. Put longer procedural details on the policy page and link to that page from the file.
This keeps the machine-readable file simple while still giving researchers full instructions.
Encryption Field
The Encryption field points to a location where a researcher can obtain a public encryption key.
It should point to the key or key information rather than placing the full public key directly into the normal field value.
Encryption can be useful when a vulnerability report contains sensitive technical details, proof-of-concept information or data that should not be sent in plain text.
Only publish this field if the key is valid, maintained and actually monitored by the team receiving reports.
An expired or abandoned key creates more friction than omitting the field.
Canonical Field
The Canonical field identifies the canonical URL for the security.txt file.
This is useful because the same file may be reachable through more than one path or hostname.
The canonical location should use HTTPS.
For a normal website, the generator can build the expected .well-known/security.txt location from your domain.
If you operate several distinct domains, think carefully about whether they share one security policy or need separate files.
Preferred-Languages Field
Preferred-Languages tells researchers which languages your security team prefers for reports.
Use standard language tags separated by commas.
For example:
Preferred-Languages: en, fr, de
List languages in order of preference.
Do not list languages your team cannot reliably handle. The goal is to reduce communication problems, not to make the file look more complete.
Acknowledgments Field
The Acknowledgments field can point to a public page that thanks researchers who responsibly disclosed vulnerabilities.
This field is optional.
Some organizations maintain a security hall of fame, researcher credits page or public acknowledgments list. If you do, this field makes it easy to find.
Do not promise public acknowledgment if your policy or legal process cannot consistently provide it.
CSAF Field
CSAF is used for machine-readable security advisories.
Organizations that publish structured vulnerability and product-security information can use the CSAF field to point toward the appropriate provider metadata.
Many ordinary websites will not need this.
Do not add advanced fields simply because the generator offers them. A shorter accurate file is better than a complex file containing meaningless or outdated values.
security.txt Is Not a Bug Bounty Program
Publishing security.txt does not automatically create a bug bounty.
It does not obligate you to pay researchers, and it does not by itself define what testing is authorized.
If your organization offers rewards, describe the terms clearly in the linked disclosure or bounty policy.
If you do not offer rewards, you can still publish security.txt. The core purpose is to create a clear reporting channel.
security.txt Is Not a Security Control
Security.txt does not block attacks, patch software or prevent vulnerabilities.
It helps after someone finds a potential problem.
Your actual security still depends on controls such as secure development, authentication, access management, updates, monitoring, backups and incident response.
Think of security.txt as part of vulnerability disclosure operations rather than as a defensive barrier. If you publish an encryption key, generate any supporting tokens with a proper source such as the Random Hex String Generator.
How to Publish security.txt Correctly
Generate the file, download it and deploy it so the public URL resolves at:
/.well-known/security.txt
Serve the content as plain text.
Check that:
- The file loads without authentication.
- The URL returns the intended content.
- HTTPS works correctly.
- Contact methods are active.
- The Expires date is in the future.
- Policy and key URLs are live.
- The Canonical value points to the right file.
If your site uses a CDN, reverse proxy or application framework, verify the deployed response rather than assuming the source file is enough.
Should You Digitally Sign security.txt?
RFC 9116 supports digitally signed security.txt files.
A signature can help researchers verify authenticity, especially where an organization already maintains a trusted OpenPGP workflow.
However, signing adds maintenance responsibilities.
If you sign the file, make sure researchers can obtain and verify the correct key and that the signed file remains valid whenever the content changes.
For a small site without an established signing process, a correct HTTPS-hosted security.txt file is more useful than a broken or stale signature setup.
Common security.txt Mistakes
A common mistake is publishing the file at the wrong location.
Another is letting the Expires date pass without updating the file.
Other problems include inactive email addresses, HTTP links where HTTPS is required, a Policy URL that returns 404, a stale encryption key and duplicate files with conflicting information.
Do not publish placeholder values.
Also avoid treating security.txt as a substitute for a real disclosure policy when your organization needs detailed scope and testing rules.
Other root-level files worth reviewing at the same time are your robots.txt and llms.txt.