0
votes

can I use one CNAME record for two Azure Web App without a third-party service or services Azure? For example, so that I call testcname1.com/api in the code and the traffic goes for example to the web app test-api, and if I use testcname1.com/indentity the traffic goes to the web app test-indentity. Two Web Apps test-indentity and test-api one CNAME testcname1.com. Thanks.

2

2 Answers

0
votes

On a pure DNS level, you can't point a CNAME entry to two different other adresses.

Azure Application Gateway is designed to do exactly what you want, but if I understand you correctly, you don't want to use other services.

As an alternative, you could set up a third AppService and host a reverse proxy, e.g. ngnix using WebApp for Containers. Or use IIS features directly, e.g. like this.

As Lex Li pointed out, you could also use one of your existing app services as a reverse proxy in addition to what it is already doing. Depends on how strongly you want to couple your services. Personally, I would probably use a dedicated instance just as a proxy, but both approaches can be valid.

0
votes

Azure Traffic Manager does exactly what you want I think. It is not free but for light/moderate load should be (very) cheap. Does health checks as well.

from https://azure.microsoft.com/en-in/pricing/details/traffic-manager/ - $0.54 per million queries - $0.36 per Azure endpoint/month