security.txt Explained: How to Add One to Your Website

What security.txt is, why it helps researchers report vulnerabilities to you, and how to add one to your website in five minutes.

Yrzo AI28 November 2026 2 min read

What security.txt is

security.txt is a small text file that tells people how to report a security problem with your website. It lives at /.well-known/security.txt and is defined by an internet standard, RFC 9116.

Without one, a researcher who finds a vulnerability on your site may not know who to contact — or may give up and post it publicly.

What goes in it

A minimal file needs two fields:

  • Contact: — an email address or URL for reports
  • Expires: — a date after which the file should be considered out of date

Useful optional fields:

  • Policy: — a link to your vulnerability disclosure policy
  • Preferred-Languages: — for example en
  • Canonical: — the URL where the file lives
  • Acknowledgments: — a page thanking researchers

Example

Contact: mailto:security@yourdomain.co.uk

Is your site exposed to this?

Run a free, non-intrusive check of what attackers can see from outside. No account needed.

Expires: 2027-12-31T23:59:59Z

Policy: https://yourdomain.co.uk/security-policy

Preferred-Languages: en

How to add it

  1. Create a plain text file named security.txt with the fields above.
  2. Upload it so it is served at https://yourdomain/.well-known/security.txt.
  3. On WordPress, use your host's file manager or a plugin. On Shopify, Webflow and similar platforms, check whether custom .well-known files are supported; if not, link a security contact page from your footer.
  4. Set a calendar reminder to update Expires before it passes.

If your server blocks dotfile paths (which it should, for .git and .env), make an exception for /.well-known/.

Use a dedicated mailbox

Send reports to a shared address such as security@ that more than one person monitors. Reports can be time-sensitive.

Is it worth it for a small business?

Yes. It takes five minutes, costs nothing, and signals maturity to customers, insurers and auditors. It also gives you a better chance of hearing about a problem privately before it is exploited.

Yrzo AI checks for security.txt as part of its scans and can generate a starter security policy for your site. Run a free scan.

Related reading: Vulnerability Disclosure Policy: A Simple Template for UK Businesses · Exposed .git Directory: How Your Source Code Leaks and How to Stop It · Website Security Checklist Before Launch

security.txtsecurity.txt filehow to add security.txtRFC 9116
Share

Check your own website in 60 seconds

Free check, no account needed. Want the full picture? Full reports start at £149, with up to 110 checks with a 14-day money-back guarantee.

Keep reading