Why a small business site needs one
When someone notices that a contact form leaks addresses, or that an old plugin is exploitable, they need to know who to tell. Without a published contact, a well-meaning report often lands in a generic sales inbox, gets treated as spam, or never gets sent. A security.txt file is a short, machine-readable answer to that question, kept at a fixed address on your domain.
For agencies and freelancers who build sites for local clients, adding the file at launch is a small, visible piece of professionalism. It costs nothing, and it gives you a clear route for reports instead of a surprise on social media.
Making the file
Enter at least one contact
An email address, a phone number in international format or an https:// form address. Separate several with commas. Emails become
mailto:and phone numbers becometel:automatically.Set the expiry date
The form suggests a date just under a year ahead. The standard asks for an expiry so stale files are not trusted, and recommends reviewing it at least yearly.
Add the optional links you have
A disclosure policy page, a public key for encrypted reports, a thank-you page for reporters, preferred languages such as
en, cy, and the canonical address where the file will live.Read the checks
Errors appear for missing contacts, past dates and links that are not https. Warnings cover expiry dates more than a year away and a canonical address that does not end in security.txt.
Download and upload
Save the file and place it at
/.well-known/security.txton the live site. Untick the comment header if you prefer the file without the two explanatory lines at the top.
Example: a web studio's own site
Kestrel Web (fictional) wants reports by email or by phone, publishes a short disclosure page and answers in English or Welsh. With the comment header switched off, the generated file is six lines and the checks report no problems.
Note how the phone number has been rewritten without spaces in tel: form and the date has become a full UTC timestamp at the end of the chosen day.
Contact: security@kestrelweb.example, +44 161 496 0000 Expires: 2027-10-31 Policy URL: https://kestrelweb.example/disclosure Preferred languages: en, cy Canonical: https://kestrelweb.example/.well-known/security.txt
Contact: mailto:security@kestrelweb.example Contact: tel:+441614960000 Expires: 2027-10-31T23:59:59.000Z Preferred-Languages: en, cy Canonical: https://kestrelweb.example/.well-known/security.txt Policy: https://kestrelweb.example/disclosure
Fields in plain words
- Contact
- Required. Where reports should go. List the most preferred route first.
- Expires
- Required. After this moment readers should treat the file as out of date.
- Encryption
- A link to a public key (https, dns: or openpgp4fpr:) so a reporter can encrypt details.
- Acknowledgments
- A page where you credit people who reported problems responsibly.
- Canonical
- The address the file is meant to be served from, which helps spot copies elsewhere.
- Policy
- Your rules for reporters: what is in scope and how you respond.
- CSAF
- Only for organisations that publish machine-readable security advisories.
Questions people ask
Where does security.txt go on a website?
Upload it so that it is served at https://yourdomain/.well-known/security.txt. Most hosting control panels and FTP clients let you create the .well-known folder in the web root if it does not exist. Some sites also place a copy at /security.txt, but the well-known path is the one RFC 9116 defines.
Is security.txt a legal requirement in the UK?
Not for ordinary business websites. It is a voluntary internet standard published as RFC 9116. Some public bodies and larger organisations adopt it as good practice. For a small business it is simply a clear, low-effort way to receive reports about problems with your site before they become bigger ones.
Should I use a personal email as the contact?
It is better to use a role address such as security@ or webmaster@ that reaches whoever looks after the site, so the file still works when people change jobs. The file is public and will attract some automated mail, so pick an address with spam filtering and make sure someone actually reads it.
What happens when the expiry date passes?
Readers are told to treat an expired file as stale, so reporters may ignore your contact details. Put a reminder in your calendar a few weeks before the date, regenerate the file with a new expiry and upload it again. The generator flags dates that are already past.
Do I need to sign the file?
Signing with OpenPGP is optional. It proves the file came from you, which matters more for large organisations that are targets for impersonation. This generator produces an unsigned file; if you sign it afterwards, include the Canonical field, which is recommended for signed files.
Where your data goes
The file is built on this page from what you type. Your contact details, links and dates are not sent to Map Extract or anywhere else, and nothing is fetched from your website.
Checked against the tool on