@Mukesh Kumar Can you share what your URL redirect rule looks like? It should look similar to this:
<rule name="RedirectToHTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="Permanent" />
</rule>
Your HSTS settings should look like:
<configuration>
<system.webServer>
<rewrite>
<outboundRules>
<rule name="Add Strict-Transport-Security only when using HTTPS" enabled="true">
<match serverVariable="RESPONSE_Strict_Transport_Security" pattern=".*" />
<conditions>
<add input="{HTTPS}" pattern="on" ignoreCase="true" />
</conditions>
<action type="Rewrite" value="max-age=31536000; includeSubdomains; preload" />
</rule>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>
You can validate the HSTS behavior by navigating to edge://net-internals/#hsts Enter your domain name and check if you have the following attributes set.
Can you please check on the above to ensure they are properly configured? We look forward to your reply.