Azure App Service with Custom Domain scenarios to Redirect HTTPS Traffic: 301 Moved Permanently scenarios
I'm working through a tutorial and Does anyone know how to I'm working with an scenario with my Azure App Service where I've set up a custom domain, but HTTPS traffic is not being redirected properly... Instead, users see a '301 Moved Permanently' behavior when they try to access the site via HTTPS. I've followed all the steps in the Azure documentation for configuring the custom domain and enabling HTTPS, but something seems to be off. I configured the custom domain under 'Custom domains' in the Azure portal and purchased an SSL certificate from a third-party provider. After uploading the certificate, I bound it to the custom domain. The domain is correctly pointed to the Azure App Service, and I can access it via HTTP without issues. However, when I type in the HTTPS version, it redirects to a 301 status with the message: ``` 301 Moved Permanently ``` I tried using Azure's built-in URL rewrite capabilities in the web.config to enforce HTTPS, like so: ```xml <configuration> <system.webServer> <rewrite> <rules> <rule name="Redirect to HTTPS" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:0}" redirectType="Permanent" /> </rule> </rules> </rewrite> </system.webServer> </configuration> ``` Unfortunately, this doesnβt resolve the scenario. I also checked the bindings to ensure the SSL certificate is correctly applied and there are no conflicts. I've cleared the browser cache and even tried with different browsers to rule out caching issues. Is there something specific I might be missing in the configuration? How can I properly set the Azure App Service to handle HTTPS traffic without that '301 Moved Permanently' behavior? Any insights would be greatly appreciated! Could this be a known issue? For context: I'm using Csharp on macOS. I'd be grateful for any help. For context: I'm using Csharp on Linux.