Initializing IIS 8 Applications HTTP and SEO Status Code

I am using the new Application Initialization for IIS 8 for our web application.

Everything is set up correctly, and the first time we got to the site, we are shown startup.html, as defined in our web configuration:

<applicationInitialization remapManagedRequestsTo="/startup.html" skipManagedModules="true" > <add initializationPage="/" /> </applicationInitialization> 

The problem is that the startup.html page returns with an HTTP status code of 200!

This means that SEO, Google and other search engines can capture the startup.html page instead of the main page if the site is indexed when the application was not initialized.

Of course, the response code should be:

 503 - the server is temporarily unavailable 

Is there a way to change the response code of a static HTML page?

(Note: this cannot be done from code, because the ASP.NET pipeline will initialize)

+6
source share

Source: https://habr.com/ru/post/971249/


All Articles