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 reportsExpires:— a date after which the file should be considered out of date
Useful optional fields:
Policy:— a link to your vulnerability disclosure policyPreferred-Languages:— for exampleenCanonical:— the URL where the file livesAcknowledgments:— a page thanking researchers
Example
Contact: mailto:security@yourdomain.co.uk
Expires: 2027-12-31T23:59:59Z
Policy: https://yourdomain.co.uk/security-policy
Preferred-Languages: en
How to add it
- Create a plain text file named
security.txtwith the fields above. - Upload it so it is served at
https://yourdomain/.well-known/security.txt. - On WordPress, use your host's file manager or a plugin. On Shopify, Webflow and similar platforms, check whether custom
.well-knownfiles are supported; if not, link a security contact page from your footer. - Set a calendar reminder to update
Expiresbefore 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