Before Your Annual Security Review: Check Your security.txt File

Use this security.txt checklist to inspect HTTP responses, redirects, contact details, and expiry dates before your next security review.

Published
Reading time
6 min read
Before Your Annual Security Review: Check Your security.txt File
On this page

A security.txt file tells security researchers how to report vulnerabilities to your organization. Before an annual security review, check that the file is reachable, its contact methods are monitored, and its expiry date is still in the future. This checklist shows you how to check your security.txt file and record what needs attention.

Publication note: RFC 9116 is the standard identified for this review, but its text and current security-team guidance were not available to consult for this article. The commands below have not been executed here. Verify the checklist against the RFC and your organization’s current guidance before publication or use as a compliance test.

Key Takeaways

  • Check https://your-domain/.well-known/security.txt, not just a local copy of the file.
  • Inspect the initial response and any redirects, then confirm that the final response is successful and contains readable file content.
  • Check for at least one Contact field and a future Expires date. Other fields can add useful context but do not replace those essentials.
  • Use monitored, intentionally public contact methods; do not publish private staff details or addresses that no longer reach the security team.
  • Repeat the check after changes and before the file expires, not only during the annual review.

1. Check the public URL and response

Run these commands from a machine that can reach your public site. Replace example.com with a domain you own or are authorized to review. The examples use curl and require an HTTPS connection.

First, inspect the response without following redirects:

curl --silent --show-error --max-time 15 \
  --proto '=https' --include \
  https://example.com/.well-known/security.txt

Check the status line, response headers, and body:

  • 200: Check that the body is the intended security.txt content, not an HTML error page or a generic application page.
  • Redirect: Inspect the Location header. Confirm the destination is expected and remains under an appropriate organizational domain or service. Then check the destination and any subsequent redirects.
  • 404 or another error: Investigate deployment, routing, access controls, or server configuration. A successful homepage does not establish that this path works.
  • TLS or connection error: Resolve the connection problem before treating the file as available.

After inspecting the initial redirect, you can follow the chain to see the final response:

curl --silent --show-error --max-time 15 \
  --proto '=https' --proto-redir '=https' \
  --max-redirs 5 --location --include \
  --write-out '\nFinal URL: %{url_effective}\nFinal status: %{http_code}\n' \
  https://example.com/.well-known/security.txt

Review every response header printed in the chain, as well as the final URL, status, and body. The HTTPS-only redirect restriction helps avoid silently following a redirect to HTTP. The command still contacts redirect destinations, so use it only when those destinations are appropriate for your review environment.

Confirm that the final response is successful and serves readable plain text. Check the Content-Type header for text/plain and UTF-8 where a charset is specified. Also check from outside your internal network if the file is intended for public researchers: a VPN, authentication wall, or network allowlist can make an internal check misleading.

Advertisement

2. Review the file’s fields and syntax

Read the deployed body, not just the source file in your repository. As a practical baseline, look for field names followed by colons, one field per line, and comment lines beginning with #. The file should contain at least one Contact field and an Expires field. A contact value is a URI, such as a mailto: address or an HTTPS reporting page; the expiry is a date and time with a time-zone offset.

This is an illustrative file, not output from a command. Replace the example values with your organization’s real public reporting details and a future expiry:

Contact: mailto:security@example.com
Contact: https://example.com/security/report
Expires: 2030-12-31T23:59:59Z
Preferred-Languages: en

Preferred-Languages is optional. Other optional fields can provide information such as a disclosure policy or encryption key. Include them only when the linked resources are maintained and useful. An optional policy or language field does not substitute for a contact or an expiry.

For a complete syntax and field review, consult RFC 9116 directly. In particular, use an RFC-aware validator or a careful manual review rather than assuming that a file is valid merely because it looks like the example. If the file is signed, check the signature separately with an appropriate trusted key; a successful HTTP response does not verify a signature.

3. Check contact methods and expiry

For every Contact entry:

  1. Confirm the address or reporting page is intended to be public. Prefer a monitored role-based mailbox or an established reporting service over a personal staff address.
  2. Confirm ownership and coverage: identify the team responsible for monitoring it, including after-hours or staff-transition arrangements where relevant.
  3. Check that a reporting page is reachable without an unnecessary login and explains how to submit a security report. If login is required, provide another accessible contact method.
  4. Use an authorized, non-sensitive test message or your normal operational checks to confirm that the route reaches the responsible team. Do not send vulnerability details merely to test delivery.
  5. Remove or update retired mailboxes, broken links, and contacts for third parties that no longer handle your reports.

Check that the Expires value is in the future and that someone owns its renewal. The example uses Z for UTC; do not interpret a timestamp without considering its time zone. Set a reminder well before expiry and allow time for review, deployment, and verification. An expired file should prompt you to update and republish it rather than assume its contacts are still current.

Do not put credentials, private phone numbers, internal-only addresses, or sensitive operational details in the file. It is published for anyone to read. A public contact address can also attract spam, so plan for filtering without blocking legitimate reports.

Advertisement

4. Record and repeat the check

For each domain in scope, record the URL checked, review date, initial and final statuses, redirect destination if any, contact owner, and expiry date. Record whether the content was readable and whether any contact or policy links needed correction. Avoid copying private test-message contents into a broadly accessible review record.

After any fix, repeat the public URL check. If you operate multiple domains or subdomains, decide which ones need their own published contact information and check each one rather than assuming a file on one host covers another. Consider scheduled monitoring for availability and expiry, but keep a human owner for contact accuracy.

Common Mistakes

  • Checking only the homepage or repository: Neither confirms what the well-known path serves publicly.
  • Treating any 200 response as success: A branded error page can return 200 while containing no security contact information.
  • Ignoring redirects: A redirect can lead to an unexpected host, an error, or an outdated file.
  • Confusing optional information with required fields: A disclosure policy is useful, but it is not a replacement for Contact and Expires.
  • Leaving a contact unmonitored: A syntactically valid address is not useful if reports never reach a responsible team.
  • Waiting until the annual review: A file can expire or a reporting service can change between reviews.

Best Practices

Keep the file short, public, and operationally owned. Review linked policies and encryption information alongside the contact fields. Put expiry reminders and post-deployment checks into your normal security operations, and use the applicable RFC and current organizational guidance to settle detailed conformance questions.

Conclusion

Check the deployed /.well-known/security.txt response, inspect redirects and content, and verify that its public contacts and expiry are maintained. Treat the file as an operational reporting channel, not a one-time compliance artifact.

What would your domain sell for?

A free TidyURLs account unlocks the Domain Estimator. It prices a name from 191,011 real domain sales.