0

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..

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

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 name header?

In IIS I was able to pull this off by setting up a wildcard binding with just a simple *.

Joel
  • 101
  • 4
  • 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 Dec 04 '17 at 06:15
  • @WayneYang-MSFT Thank you for responding :) Yes, that's what I'm looking for. But can this be automated? I wouldn't want to manually do this for each customer. – Joel Dec 04 '17 at 06:54

2 Answers2

1

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

Wayne Yang
  • 488
  • 3
  • 9
1

Azure will only respond to a hostname that it is configured for, you can't have it it respond to any and all requests that come it's way, you need to add an entry for each host name. You can use wildcards but only for subdomains, which won't work for you here.

You can automate creating these using PowerShell, Rest API, Templates etc, but you would need to have some sort of portal or similar for users to set this up.

Sam Cogan
  • 38,736
  • 6
  • 78
  • 114