9

I have an Azure Function app running on dynamic pricing and am trying to set up a custom domain.

I have added and verified the domain and setup the CNAME record accordingly. The custom domain shows up correctly as the "URL" when I view the App Service settings in the Azure portal. If I try to use this domain, however (to access an HTTP trigger function), I am returned with "Error 404 - Web app not found."

When I look at the Function URL in the portal, it still shows the x.azurewebsites.net domain, not the custom domain I have added. Is there anything additional I need to do to get Functions working with a custom domain?

Adam Stiskala
  • 467
  • 1
  • 6
  • 11

2 Answers2

9

Copying from my answer on MSDN forum:

Indeed, custom domains are not yet supported for Dynamic Function plans. This support will come a bit later (no clear ETA to share at this point).

David Ebbo
  • 42,443
  • 8
  • 103
  • 117
  • Thanks for this. Is it possible to leverage some other Azure service (e.g. Traffic Manager) to achieve this in the interim, or would my only option be to switch to a standard plan? – Adam Stiskala May 29 '16 at 23:28
  • 1
    Unfortunately Traffic Manager will not work. All it does is resolve a host name to an IP (basically acts as a DNS). Once the request gets to App Service, it won't recognize the host name because of the current limitation so you'll get a 404. Indeed, Classic mode (e.g. standard) is probably the only easily feasible option right now. – David Ebbo May 29 '16 at 23:31
  • 1
    Thanks David. Looking forward to seeing Azure Functions improve to support this in the future. – Adam Stiskala May 29 '16 at 23:33
  • @DavidEbbo Any idea if this has been added yet? I was going to submit the idea to the Azure Functions feedback site if not. – mclark1129 Nov 23 '16 at 17:35
  • 6
    @mclark1129 Yep, it is now supported! – David Ebbo Nov 23 '16 at 17:44
2

Thanks to @David Ebbo I figured out how to do this for a Function App running in a consumption plan (e.g. Y1). Here is the MSFT docs article:

https://learn.microsoft.com/en-us/azure/app-service/scripts/cli-configure-custom-domain

It seems that it cannot currently be done via the Azure Portal GUI and instead you must use Azure CLI to run the commands. It's easy to do directly from that article page using the "Try It" link to the embedded azCLI.