| 开发者 | cododigital |
|---|---|
| 更新时间 | 2026年11月16日 16:19 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
security.txt file is a small text file at /.well-known/security.txt that tells security researchers who to contact about a vulnerability on your site. It is standardised as RFC 9116. Without one, a report may never reach you.
Codo Security.txt serves the file from your WordPress settings. There is nothing to upload and no rewrite rules to flush.
What it does
/.well-known/security.txt (and optionally the legacy /security.txt) as text/plain; charset=utf-8.security.txt file would override the plugin, when WordPress is in a subdirectory, and on subdirectory multisite subsites./.well-known/ handlers./.well-known/security.txt.At https://your-site.example/.well-known/security.txt, and at /security.txt unless you turn the legacy location off.
Your web server is probably answering /.well-known/ itself instead of passing the request to WordPress.
NGINX: make sure no location ~ /\. rule denies dotfiles before WordPress sees the request. A rule like this keeps .well-known working:
location ^~ /.well-known/ { try_files $uri /index.php?$args; }
Apache: the standard WordPress .htaccess already passes unknown paths to index.php. If you have a rule that blocks dotfiles, add an exception for .well-known:
RewriteRule ^\.well-known/ - [L]
Some hosts and CDNs also cache 404s. Purge the cache after you publish.
Your web server serves a real file in preference to WordPress, so the settings here are ignored. The plugin warns you on its settings page and in Site Health. Delete the file.
Yes. Each site has its own settings. On a subdirectory network only the main site can publish the file, because every site shares one host.
So researchers can still find your contact details. The plugin warns you loudly until you renew it.
RFC 9116 recommends an expiry less than a year ahead, so that the file is reviewed regularly. A later date is accepted with a warning.
Untick "Publish", or define CODO_SECURITY_TXT_DISABLE as true in wp-config.php.
No. See "External services" below.