0
votes

I have a web app hosted on Azure App Service under my domain app.example.com. Customers access their own content using the following paths:

app.example.com/customer1
app.example.com/customer2
etc..

I have created a CNAME record for app.example.com -> myazureapp.azurewebsites.net. And that part works fine.

But I would also like to allow customers to use their own domains by telling them to set up a CNAME record with their DNS provider like:

app.customer1domain.net -> app.example.com

I'm trying to figure out how to configure Azure to allow this kind of CNAME pointing. Will I have to configure each customer domain in Azure as a valid host header? If so, can this be automated?

In IIS I was able to pull this off by setting up a wildcard binding with just a simple *. How can I do this in Azure?

This document mentions what I'm trying to acheive, but not how (Under "Option 4 — Enabling Tenants to Use Custom Domains"): https://msdn.microsoft.com/en-us/library/hh534477.aspx?f=255&MSPPError=-2147217396

1
I assume that you want all your customers to use their own domains to your app,like app.customer1domain.net --> myazureapp.azurewebsites.net , right? If you want this, you can just add multiple hostname in Azure portal for your App.Wayne Yang
@WayneYang-MSFT That is correct, thank you :) But can this be automated? I wouldn't want to manually do this for each customer. And sorry for crossposting. Didn't know where to post. serverfault.com/questions/886256/…Joel
Unfortunately, this cannot be automated. Completing all steps for adding custom domain needs you to add CNAME records for each domain in that Domain provider and this action is not within Azure. I understand why you need this, but it just cannot be automated.Wayne Yang
@WayneYang-MSFT Oh sorry, I was a bit unclear. I'm fully aware that the customers will need to add the CNAME records at their domain provider. It's the Azure part I'm unsure aboutJoel
@WayneYang-MSFT So basically I will have some kind of information like: "How to publish on a custom domain (CNAME): help.instapage.com/hc/en-us/articles/…Joel

1 Answers

0
votes

You can just add multiple hostname in Azure portal for your App.

Go to Azure portal > Your web app > custom domains > Add hostname

Just add multiple Hostname to your Web app. It works for all domain after adding them. The result looks like this:

enter image description here