Azure Front Door configured site is returning "Services not available"

12,686

This symptom can happen if you have not configured a routing rule for the custom domain that you added as a frontend host. A routing rule needs to be explicitly added for that frontend host, even if one has already been configured for the frontend host under the Front Door subdomain (*.azurefd.net) that your custom domain has a DNS mapping to.

So add a routing rule from the custom domain to the desired backend pool. And wait for several minutes and it will work fine.

enter image description here

Share:
12,686
ossentoo
Author by

ossentoo

Updated on June 16, 2022

Comments

  • ossentoo
    ossentoo almost 2 years

    I've got an Azure resource group with two App Service web applications in separate locations deployed and working as expected. I also have a Front Door configuration setup. This is responding as expected when accessed via the azurefd.net address.

    I want to add a custom domain to this configuration. First, I created a CNAME in my DNS for a www address.

    I then added a simple custom domain configuration (via an ARM template), passing the fully qualified custom domain name as a parameter.

    The frontend section looks like this when deployed via the template:

                    "frontendEndpoints": [
                    {
                        "name": "frontendEndpoint1",
                        "properties": {
                            "hostName": "[concat(parameters('frontDoorName'), '.azurefd.net')]",
                            "sessionAffinityEnabledState": "Enabled",
                            "sessionAffinityTtlSeconds": 0
                        }
                    },
                    {
                        "name": "frontendEndpoint2",
                        "properties": {
                            "hostName": "[parameters('customDomainName')]",
                            "sessionAffinityEnabledState": "Enabled",
                            "sessionAffinityTtlSeconds": 0
                        }
                    }
                ],
    

    The frontend is deployed as expected and I can still access the azurefd.net address.

    However, when I try and access the www address, I receive an error in the browser with the message:

    Our services aren't available right now. We're working to restore all services as soon as possible. Please check back soon. 0tEdHXAAAAAADUxvBayGtQLDTjRthnz9XTE9OMjFFREdFMDMyMQBFZGdl

    I have waited more than half an hour for any DNS changes to roll out, but it still doesn't work.

    What could the problem be? What's a easy way of troubleshooting such errors? To be clear, I haven't yet added any HTTPS certificates to this configuration. The web applications do respond to both HTTP and HTTPS, so hopefully that isn't the issue.

  • ossentoo
    ossentoo about 5 years
    Got it Joel. Thanks. I'll give it a try
  • ossentoo
    ossentoo about 5 years
    My feeling is the UI can be improved to make this more obvious though. Very easy mistake to make.
  • mzh
    mzh almost 4 years
    @Joey i deployed webapp and can't see the static files from wwwroot folder are loaded when the html gets loaded. any idea ?
  • ossentoo
    ossentoo over 2 years
    turns out sometimes you need to verify your DNS is pointing to the right server. double check with tcpping in your website kudu for example. You might be surprised with the response that you get (i.e. the problem might be in your DNS)
  • Abhilash Reddy
    Abhilash Reddy over 2 years
    I'm getting random Services Unavailable error messages and noticed in your screenshot that azurefd.net is not checked, but mine is. Could that cause intermittent issues?
  • Stephen McDowell
    Stephen McDowell almost 2 years
    Ran into this issue with Front Door Premium. I had a single route with both the azurefd.net domain and my custom domain. Access via the azurefd.net worked the custom domain did not. Putting the custom domain in a separate route worked.