Giving security researchers one obvious place to look
When someone finds a security hole on your site, the hardest part is often finding out who to tell. They try the contact form, guess at security@ addresses, get no reply, and sometimes give up or go public. security.txt solves that with a small plain-text file at a fixed address that says how to report a problem. It is defined in RFC 9116, and security scanners and researchers check for it automatically.
This checker requests /.well-known/security.txt on your domain and, if that is missing, falls back to /security.txt. It ignores responses that are really HTML pages (such as a catch-all route or a "not found" page answering 200), so it only reports a file that is actually there. Then it reads each field and checks the ones the RFC requires.
The checks, field by field
Contact must be present and must be a URI starting with mailto:, https:// or tel:. Web addresses using http:// are flagged. Expires must be present exactly once, must be a valid date-time, and must be in the future. The checker also warns if it is more than a year away, because the RFC recommends less than a year so the file gets reviewed regularly.
It notes which optional fields are missing (Encryption, Policy, Acknowledgments, Preferred-Languages, Canonical and Hiring), flags a Canonical value that does not match where the file was found, and reminds you to move a file found only at /security.txt to the well-known path. If no file exists, or yours needs fixing, it gives you a template that keeps your existing values and fills in a fresh Expires date.
It does not verify a PGP signature or test whether your contact address actually receives mail. Those are worth checking by hand.
A complete file you can adapt
# https://www.example.com/.well-known/security.txt
Contact: mailto:security@example.com
Contact: https://www.example.com/report-a-vulnerability
Expires: 2027-06-30T23:59:59Z
Encryption: https://www.example.com/pgp-key.txt
Policy: https://www.example.com/security-policy
Acknowledgments: https://www.example.com/security-thanks
Preferred-Languages: en, de
Canonical: https://www.example.com/.well-known/security.txtOnly Contact and Expires are required. List Contact lines in order of preference, and use a role address such as security@ rather than a person's own email, so it still works when people change jobs. Dates must be in the full ISO format shown, including the time and the Z for UTC.
Why Expires is the field that bites
Expires forces a review. A file listing an inbox nobody reads is worse than no file, because it sends reports into a void while looking official. Once the date passes, tools that follow the RFC should treat the file as stale. That means a file that was perfect a year ago can quietly fail today. Put the renewal in your calendar a few weeks before the date, and when you renew, check that the contact still works and the policy link still loads.
Publishing it on your platform
Nginx and Apache
# Nginx: serve the file as plain text from the well-known path
location = /.well-known/security.txt {
alias /var/www/security/security.txt;
default_type text/plain;
}
# Optional: send the old location to the new one
location = /security.txt { return 301 /.well-known/security.txt; }On Apache, create the .well-known folder in your web root and put the file inside it. Make sure no rewrite rule sends /.well-known/ requests to your CMS. Let's Encrypt uses the same folder, so it often already exists.
WordPress
Upload the file to a .well-known folder in your site root with your host's file manager or SFTP. If the URL shows a WordPress page instead of the text, a plugin or rewrite rule is catching it; a dedicated security.txt plugin can serve it for you instead.
Shopify, Vercel and Netlify
Shopify does not let you upload files to /.well-known/, so the usual option there is a URL redirect from /security.txt to a hosted copy, or a note on your contact page. On Vercel or Netlify, place the file at public/.well-known/security.txt (or your framework's static folder) and it will be served as-is.
Where it sits in your security and SEO work
security.txt is not a ranking factor, and search engines do not read it for ranking. Its value is speed: the sooner a researcher can reach you, the sooner a flaw is fixed, and the less chance your site gets hacked, filled with spam links or flagged with a browser security warning, which is what really hurts search traffic. It also shows up in vendor security questionnaires and automated scans.
A file is only the front door. Decide who reads incoming reports, how quickly you reply, and whether you promise not to take legal action against good-faith researchers, and write that in the page your Policy field links to. For the rest of your security setup, the HTTP Header Checker shows which protective headers you send, and the SSL Checker confirms the certificate the file is served over is valid. Our guide to security headers and SEO ties them together.