Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring custom domains with Azure Front Door

We have an app that allows customers to use their own custom domain to access their accounts on our app.

Currently, we are using the Azure App Services Custom Domain option & when a user shares their custom domain with us, we manually add it to the Azure Custom Domains list pointing it to their unique account URL. i.e. projects.customerdomain.com (custom domain) to customer1.anywhereapp.io (their account in our product 'Anywhere').

This approach has been working well.

We are now exploring if we can use Azure Front Door to make our app more responsive worldwide & one of the problems we are stuck at is how do we configure the custom domains of our customers to their specific Anywhere accounts?

I've gone through the official Azure FD Custom Domain documentation & I understand it allows us to add the custom domain pointing to one backend, in our case each custom domain also needs to point to a specific subdomain URL. i.e. customer1.anywhereapp.io

How do we achieve this?

Any guidance in the right direction is really appreciated.

Thanks ST

like image 549
Supreet Avatar asked Oct 18 '25 13:10

Supreet


1 Answers

Azure Front Door can forward the request Host header to the backend. So you can configure the custom domain both on Front Door and the App Service using DNS verification.

To do this, following the following steps:

  • Go to your App Service

  • Go to Custom Domains

  • Copy the Custom Domain Verification ID

  • Add a new DNS TXT record with the copied value: TXT asuid.projects.customerdomain.com. <verification id>

    App Service Custom Domain Verification ID (image)

  • Go to your Front Door profile

  • Setup the Custom Domain as per the instructions on MSDN

  • Configure the origin as follows:

    • Name: <any appropriate name>
    • Origin Type: App services
    • Host name: <yourappservice.azurewebsites.net>
    • Origin host header: <blank> <-- leaving this empty will forward the request host header to the backend
    • Certificate subject name validation: Enabled

Now when a request is made to Front Door this same request is passed onto your backend including the custom domain (projects.customerdomain.com). From the perspective of your app service, there's then no difference whether you use Front Door or not.

like image 135
Stan Janssen Avatar answered Oct 20 '25 12:10

Stan Janssen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!