- Add the below rewrite rule in web.config file.
<rewrite>
<outboundRules rewriteBeforeCache="true">
<rule name="Remove Server header">
<match serverVariable="RESPONSE_Server" pattern=".+" />
<action type="Rewrite" value="My Server" />
</rule>
</outboundRules>
</rewrite>