Set environnement variable WEBSITE_HOSTNAME in apps service

SLIMANI Smail 60 Reputation points
2023-12-27T15:57:08.5933333+00:00

Hello,

Our application is hosted on a Docker container, which is running on an Azure Web App.

We have a custom domain, and we've modified it at the custom domain level of the web app. However, the environment variable WEBSITE_HOSTNAME still contains the default host in '.azurewebsite'.

User's image

Is it possible to modify and replace it with the custom domain host?

Regards,

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,960 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2023-12-27T18:52:56.14+00:00

    Hi @SLIMANI Smail OBS/DD

    WEBSITE_HOSTNAME is a read-only environment variable that cannot be changed by the end user. You can refer to the App environment table for a complete list of environment variables that are read-only.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.