@MHS I have spent the last 3 hours trying to review your site via internal and external tooling. I believe everything is properly configured in regard to the custom domain and SSL certificate.I can also see the reboot you preformed on your web app yesterday to get the changes to apply.
The last item that I think is worth trying is to call out the order that you have the sections of your web.config file might be improper and causing the issue.
The order of elements in a web.config
file can matter, especially when it comes to the <system.webServer>
section, which contains configuration settings for the IIS web server.
In the case of the <handlers>
and URL rewrite rules within the <rewrite>
section, the typical convention is to place the <rewrite>
section before the <handlers>
section. This is because the URL rewrite module operates at an earlier stage in the request processing pipeline than the module responsible for handling the request (which in the case of ASP.NET Core is the AspNetCoreModuleV2
).
Here's the general order you might see in a web.config
file:
<configuration>
...
<system.webServer>
...
<rewrite>
<rules>
<!-- URL rewrite rules here -->
</rules>
</rewrite>
<handlers>
<!-- Handler definitions here -->
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore ... />
...
</system.webServer>
...
</configuration>
By placing the <rewrite>
section before the <handlers>
section, you ensure that the URL is rewritten before it reaches the handler that will process the request. If the order were reversed, the handler might process the original URL before it gets rewritten, which could lead to unexpected behavior.
It's also important to note that the <aspNetCore>
section is typically placed after the <handlers>
section because it contains settings that are specific to the ASP.NET Core module referenced in the <handlers>
section.
Can you please try reordering your web.config file sections, restart your web app, and try again? (Keep in mind browser cache may even play a role so you might want to wait a few minutes after the site reboot and try to hit the internal domain name via inPrivate/inCognito window).
Please let us know the outcome. If not, we have a final step we can try.