HTTP directives

default_type directive (HTTP)

Fallback media type when no more specific type applies. Default: text/plain. Context: http, server, location. It does not transform file contents.

Formal Syntax & Structure

nginx syntaxnginx
default_type mime-type;

Parameters & Attributes

NameTypeDescription
mime-typestringFallback response media type.

Working Example

Example Snippetnginx
default_type application/octet-stream;
Nginx Reference