Publish a security.txt file on WordPress
Why it matters
A security.txt file tells researchers who to contact when they find a security problem on your site, so a report reaches you instead of being posted publicly or lost. It is a small plain text file defined in RFC 9116.
The fix
- Option 1, a plugin. In Plugins, Add New, search for security.txt and install a maintained generator plugin that publishes the file at /.well-known/security.txt. Fill in Contact and Expires.
- Option 2, upload a file. Connect by SFTP or your host's file manager and create a .well-known folder in the web root (the folder that contains wp-content for a standard install). Upload security.txt into it with the content shown in the generic tab.
- A real file in .well-known is served by the web server directly. If it returns a 404 or a block page, a security plugin or a server rule is hiding dot folders; allow /.well-known/ there.
.well-known/ security.txt
Contact: mailto:security@example.com Expires: 2026-12-31T23:59:59Z Preferred-Languages: en Canonical: https://example.com/.well-known/security.txt
The examples use example.com. Replace it with your own domain.
Related
- Reported by the security.txt check
- Serve security.txt from /.well-known/
- Serve security.txt over https
- Serve security.txt as text/plain with utf-8
- Add a Contact line to security.txt
- Fix the Contact value in security.txt
- Add an Expires line to security.txt
- Use an RFC 3339 date in the Expires line
- Renew the expired security.txt
- Renew security.txt before it expires
- Shorten the security.txt Expires date
- Fix repeated or insecure fields in security.txt
- Make the Canonical line match where the file is served
Scan your domain to see whether this applies to you.