azureazure-appserviceazure-container-apps

Repoint Azure App Service URL to container app


I have an Azure App Service, which is accessible via HTTP using it's .azurewebsite.net domain name. Lots of other applications are configured to call REST endpoints within this app service. For example, the full URL might be this:

https://my-azure-app.azurewebsite.net/my-rest-endpoint

We are now in the process of migrating the application to a Container App, instead of an App Service. Whilst we have this setup and working, the URL of the container app version is accessible via a custom domain name. e.g.:

https://my-api.my-company.com/my-rest-endpoint

I believe this works by the custom domain name has been configured to point to the IP address of the container app environment.

Is there a way we can re-point the my-azure-app.azurewebsite.net domain so it also points to the container app environment? I'm guessing this might not be possible, since it's the default domain assigned by Microsoft when you create an App Service.

If it's not possible, are there any other alternatives? We want to avoid updating the configuration of all existing applications that point to the old URL.


Solution

  • You shouldn’t have used the default one provided by Microsoft from the start. Right now one of the quick solutions before changing all client side code is to deploy a reverse proxy to that App Service instance to forward traffic.

    While this buys you some time, you should change all client code to call your custom domain as soon as you can. Otherwise, you must keep the reverse proxy permanently and raise your cost.

    Assure you that you are not the first to hit similar issues. Even Microsoft had to handle similar cases as first party user of Azure and made public announcements that any external parties depending on certain URLs need to migrate manually.