question

SamGooch-8503 avatar image
0 Votes"
SamGooch-8503 asked SamGooch-8503 commented

Use the same Custom Domain for an App Service within the same scale unit behind an Application Gateway

I need to add a custom domain to two App Services running on the same App Service Plan. In front of them both, sits an Application Gateway which the DNS is configured to route to.

The reason I need a custom domain is because the applications are expecting that custom domain to be present and it affects the routing and URL behaviour from the CMS application.

Please advise how best to do this?

azure-webappsazure-webapps-custom-domains
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @SamGooch-8503,

Just checking to see if the below response helped answer your question.

Thanks,

Grace

0 Votes 0 ·

In your diagram, what if the ImageServerPool and the VideoServerPool both need the domain to be contoso.com for it to route correctly? How would you do that? I can't use the *.azurewebsites.net domains.

0 Votes 0 ·

1 Answer

Grmacjon-MSFT avatar image
0 Votes"
Grmacjon-MSFT answered

Hi @SamGooch-8503

Thanks for your patience.

Yes, your scenario can be achieved using URL path-based routing via Application Gateway. Please follow this tutorial:
Create an application gateway with path-based routing rules using the Azure portal.

81997-figure1.png

Another option could be deploying your web apps to multiple virtual directories. Read this Blog post and SO post for more details.

Hope that helps.
-Grace



figure1.png (86.3 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.