HTTP core directives

server_tokens directive

http, server, location; default on. off suppresses version in Server and generated error pages, not necessarily the product name. Custom string support is commercial; build is version-dependent.

Formal Syntax & Structure

nginx syntaxnginx
server_tokens on | off | build | string;

Parameters & Attributes

NameTypeDescription
modeon | off | build | stringChoose version visibility, build label, or a commercial custom string. Off is not a complete fingerprinting defense.

Working Example

Example Snippetnginx
server_tokens off;
Nginx Reference