Remove Server Header Attribute In IIS 10.0

by Yugolancer


Posted on Wednesday, January 16, 2019



There is another way to do the same but if you want the simplest one please add the following to the web.config into the system.webServer section:

system.webServer
    
< rewrite >
    < outboundRules rewriteBeforeCache="true" >
	    < rule name="Remove Server header" >
            < match serverVariable="RESPONSE_Server" pattern=".+" / >
            < action type="Rewrite" value="Your Text Here" / >
        < / rule >
    < / outboundRules > 
< / rewrite >

< customHeaders >		
    < remove name="X-Powered-By" / >
< / customHeaders >
    
  

HTH


Copyright © ASPNETer 2006 - 2016