Remove 'Server' Header in ASP.NET Core 2.2

Remove 'Server' Header in ASP.NET Core 2.2

To remove the 'Server' header in ASP.NET Core 2.2, the easiest way is to install the StripHeaders IIS module written by Dionach.

Simply install the IIS module on your server and it will immediately strip out the following headers:


I've tried using

.ConfigureKestrel(options.AddServerHeader = false)

...but for some reason the 'Server' header is still there. The other methods made my website refuse to load.

However, StripHeaders work seamlessly. So be sure to try it if you can install stuffs on your server.