I have a site served using IIS, and when I am performing my periodic maintenance I put an app_offline.htm
file at its root (this is necessary to indicate to google and other bots that the site should not be indexed)
However IIS randomly serves the site with a 200 OK response code instead of a steady 503.
The site has two virtual apps inside, and it doesn't help if I put additional app_offline.htm
in them.
How can I prevent this from happening? I want a steady 503 response for as long as app_offline.htm
is in the site root.
Site tree
Main Site
|
|---Virtual App 1
|
|---Virtual App 2
App pool parameters:
- .NET CLR Version: v4.0.30319
- Managed pipeline mode: Integrated
Windows Server 2019
Version 1809 (OS Build 17763.3346)
IIS
Version 10.0.17763.1
Example FRT Log
Following the comment suggestion from Lex Li, I activated failed request tracing with a trigger of status code 200, and here's a sample log file from that:
For comparison, here's a trace for a 503 response: