Change server name

How to change server name in Caddy 2, I could not find any directive to hide that info?

Hi @mosmos, welcome to the Caddy community.

What are you trying to change, exactly, and where?

In the devtool identified the web server as “Caddy”, all web server has a servername or server_tokens directive for Nginx, Apache, H2O, etc.

Can we rename or hide with a directive?

Docs here:

header -Server
1 Like

Great thanks!

FYI, if an error is encountered, then the Server header will still be presented. You would also need to remove the header inside of a handle_errors block.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.