CNAME for Azure Traffic Manager with Azure Functions (error: Custom domain has not been configured inside Azure)

40 Views Asked by At

I have multiple Azure Functions in different regions and I use a Traffic Manager to access the closest endpoint in the region. Everything works as expected.

But I want a custom domain (e.g. api.mydomain.com). I created a CNAME in my CloudFlare DNS that points to my Traffic Manager endpoint. When I use the CNAME in my browser, I see this error: Custom domain has not been configured inside Azure.

enter image description here

Is there any of fixing this issue? It seems like Azure doesn't like other DNS services. I want a FREE solution.

1

There are 1 best solutions below

6
Arko On

To configure a custom domain for Azure Functions with Traffic Manager, you need to create a CNAME record that points to the Traffic Manager endpoint. However, it seems that you are encountering an error that says "Custom domain has not been configured inside Azure". This error occurs when the custom domain has not been added to the Azure Function app. To fix this issue, you need to add the custom domain to the Azure Function app by following these steps:

  1. In the Azure portal, navigate to your Function app and select "Custom domains" under "Settings".
  2. Click on "+ Add custom domain" and enter your custom domain name (e.g. api.mydomain.com).
  3. Click on "Validate" to verify that the custom domain has been configured correctly.
  4. Once the custom domain has been validated, click on "Add custom domain" to add it to the Function app. enter image description here

After adding the custom domain to the Function app, you should be able to access it using the CNAME record that points to the Traffic Manager endpoint.

References: