Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In IIS, can I safely remove the X-Powered-By ASP.NET header?

Will this cause any harm? Does it serve any purpose other than tell browsers you have .net installed?

I like this article about changing the header to Pure Evil. Genius!

http://www.iishacks.com/index.php/2009/11/11/remove-x-powered-by-aspnet-http-response-header/

like image 412
ScottE Avatar asked Jul 30 '10 19:07

ScottE


People also ask

How do I get rid of X-powered-by header?

Open the site which you would like to open and then click on the HTTP Response Headers option. Click on the X-Powered-By header and then click Remove on the Actions Pane to remove it from the response.

How do you hide X-powered-by?

To remove the X-Powered-By header, you can use: <? php header_remove( name: 'X-Powered-By' ); As you can see, you only have to pass the header name as a string as parameter, and you are done.

What is X-powered-by ASP Net?

X-Powered-By is set by various servers to say what kind of server it is. Software installed on that server might override the server's default. There is an argument that giving this information to clients gives information that can only serve to help attackers (just a little bit: saves working out what kind of server).


1 Answers

Add this to your web.config section

<system.webServer>     <httpProtocol>         <customHeaders>             <remove name="X-Powered-By" />         </customHeaders>     </httpProtocol> </system.webServer> 
like image 135
Kevin Up Avatar answered Oct 05 '22 14:10

Kevin Up