Have you added the root domain to the static web app? - https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain?tabs=azure-dns#add-domain-using-txt-record-validation
Azure Static Web App https redirection
I have a website hosted via Azure Static Web App. I have correctly set it up with my domain provider, so that I have my custom domain, e.g. www.customdomain.com.
Via the provider (GoDaddy), I have set up the CNAME, and also a redirect so that both www.customdomain.com AND customdomain.com works.
This is fine, but the problem occurs if the whole URL is used, as in https://customdomain.com. This will fail, while https://www.customdomain.com still works (notice the www).
I contacted GoDaddy support, as I thought the issue was with the redirect. But their support told me this was more of an issue with the SSL on the server, which is something I'm not too knowledgable about. Any ideas on how to fix this, so https://customdomain.com will work correctly?
2 answers
Sort by: Oldest
-
-
Alan Kinane 16,796 Reputation points MVP
2022-01-18T17:10:45.803+00:00 I think this might be an issue with how GoDaddy handle redirections, https://stackoverflow.com/questions/66708922/azure-web-app-godaddy-redirect-www-to-non-www
There's a few other options here perhaps.
- Use Azure DNS to host your DNS zone, i.e. change the nameservers to Azure
- Handle the redirection another way. I had to do this recently for a customer and here's how I managed it - https://azurealan.ie/2021/08/20/how-to-use-root-domains-with-azure-front-door/