webzod
account

Serve security.txt as text/plain with utf-8 on Cloudflare

hygiene.security_txt.wrong_content_type · effort: minutes

Why it matters

RFC 9116 requires the file to be sent as text/plain in utf-8. Tools may reject it if the server labels it as html, binary or another charset.

The fix

  1. Cloudflare passes the origin's Content-Type through, so fix it at the origin using the tab for your server.
  2. If you use Cloudflare's managed security.txt (Security, Settings, Web application exploits, Security.txt) and the type is still wrong, check whether a rule or Worker on the zone is rewriting that path.

Read the documentation (opens in a new tab)

Scan your domain to see whether this applies to you.