Warning

security.txt isn't served as text/plain

The short version

Serve it with Content-Type: text/plain; charset=utf-8.

What it means

Your server sends security.txt with a content type other than text/plain, such as application/octet-stream, or none at all. The result shows what it sent.

Why it matters

RFC 9116 requires text/plain with a UTF-8 charset. With another type, browsers may download the file instead of showing it, and tools may refuse to parse it. It usually means the server doesn't know the .txt type for that folder, or a framework route answers it. Some servers fall back to a generic type for files in folders whose names start with a dot, such as .well-known, so the file ends up as a download.

How to fix it

Nginx

Make sure mime.types is included, or add location = /.well-known/security.txt { default_type "text/plain; charset=utf-8"; }.

Apache

AddType "text/plain; charset=utf-8" .txt

Applications and CDNs

If a route in your application serves the file, set the header there. On object storage such as S3, set the object's Content-Type metadata.

Check it worked

Run the standard files check again. security.txt should show as served as text/plain, and the finding should be gone.