Azure Static Web App https redirection

Jonathan Hertz 1 Reputation point
2022-01-18T13:40:54.833+00:00

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?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,908 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
770 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Alan Kinane 16,786 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.

    1. Use Azure DNS to host your DNS zone, i.e. change the nameservers to Azure
    2. 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/
    1 person found this answer helpful.
    0 comments No comments

  2. Alan Kinane 16,786 Reputation points MVP
    2022-01-18T13:50:37.48+00:00