IIS Banner Hiding

IIS Banner Hiding


 

NOTE: Before you start, back up the IIS configuration: copy C:\Windows\System32\inetsrv\config\applicationHost.config and the eMAM site’s web.config form below paths to a safe folder.

 

·        C:\Program Files\Empress Media\eMAM Analytics Gateway

·        C:\Program Files\Empress Media\eMAMClient

·        C:\Program Files\Empress Media\eMAM Director

·        C:\Program Files\Empress Media\eMAM Gateway

·        C:\Program Files\Empress Media\eMAMRESTAPI

·        C:\Program Files\Empress Media\eMAM Super Admin

 

NOTE: “remove Server header” setting in step 1 is available in Windows Server 2019 and later. It’s missing on Server 2016 (version 1607), even though that also runs IIS 10. If you don’t see it, use the fallback at the end.

1. Remove the Server: Microsoft-IIS/10.0 header

  1. Open IIS Manager (run inetmgr).
  2. In the left pane, click the server name (the top node, not the site).
  3. In the middle pane, under Management, double-click Configuration Editor.
  4. In the Section dropdown at the top, go to system.webServer → security → requestFiltering.
  5. Find removeServerHeader and set it to True.
  6. Click Apply in the right pane.

2. Remove X-Powered-By: ASP.NET

  1. In IIS Manager, click the server name again.
  2. Double-click HTTP Response Headers.
  3. Select X-Powered-By and click Remove in the right pane.
  4. Click the eMAM site in the left pane and open HTTP Response Headers there too. If X-Powered-By is listed at the site level, remove it there as well.

 

 

3. Remove X-AspNet-Version

Configuration Editor changes only this one setting, which is safer than editing web.config by hand.

  1. In the left pane, expand Sites and click the eMAM site.
  2. Open Configuration Editor.
  3. In the Section dropdown, choose system.web → httpRuntime.
  4. Check that the From dropdown next to it shows the site’s Web.config.
  5. Set enableVersionHeader to False.
  6. Click Apply. Leave every other value on that screen as it is, such as maxRequestLength and executionTimeout.

 

4. Remove Server: Microsoft-HTTPAPI/2.0 (Windows HTTP driver)

  1. Open Registry Editor (run regedit).
  2. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters.
  3. Right-click in the right pane → New → DWORD (32-bit) Value.
  4. Name it DisableServerHeader.
  5. Double-click it, set Value data to 2, and click OK.
  6. Close Registry Editor. This change takes effect only after a reboot.

 

 5.  Deafult document

1. Open Internet Information Services (IIS) Manager

In the Connections panel on the left, expand your server and click on Default Web Site  and click on explore.

 

 

 

 

 

2. Create a new .htm file named Default.html in the specified location, if it does not already exist.

 

 

3. Edit the file and add the below command

               Command :  <META http-equiv="refresh" content="0;URL=/eMAMDirector/Login/Login.aspx">

                 

 

4. Go to IIS and select default website, from the features select default document

 

 

 

 

 

 

2.        Right click on the default.hml and enable it.

 

 

 

 6. Apply and test

  1. Reboot the server
  2. Check the headers. In Chrome or Edge, open the eMAM URL, press F12, go to the Network tab and reload. Click the first request and look at Response Headers. Server, X-Powered-By and X-AspNet-Version should be gone. Repeat with a made-up URL such as /test123 to check the error page as well.
  3. Try to call localhost and check whether it redirect to the director
  4. Run a quick eMAM check: log in, browse assets, upload a file, play a proxy and download something.

CAUTION:

Fallback if removeServerHeader isn’t there (Server 2016 or older)

  1. Install the IIS URL Rewrite module from Microsoft, then reopen IIS Manager.
  2. Click the eMAM site → URL Rewrite → Add Rule(s) → Blank rule under Outbound rules.
  3. Give it a name. Under Precondition choose None. Under Match, set Matching scope to Server Variable and Variable name to RESPONSE_SERVER. Set Pattern to .*.
  4. Under Action, set Action type to Rewrite, leave Value empty, and click Apply.