@SilvaPaulaD We have a few scoping questions:
- Has the deployment slot and its respective URL ever worked for you?
- Do you have any services in front of your web app? Such as an App Gateway or Azure Front Door? If so, make sure your gateway is not configured to override the hostname. Further, you can try to see if your app has a www custom domain prefix.
- Go to the App Service in the Azure portal.
- Select the "Custom domains" option.
- Check if there is a custom domain with a "www" prefix. If so, remove it.
- Check if there is a redirect rule that is redirecting the root domain to the "www" subdomain. If so, remove it.
Note that this might change the behavior of your custom domain so perform these troubleshooting steps during slower hours for your site.
Let us know the outcome of these suggestions and if any resolved the issue. We look forward to your reply.