skip to content
Alvin Lucillo

Retrieve app service host name

/ 1 min read

To query the default hostname of your app so you can access it, use az webapp show like below:

APP_URL=$(az webapp show \
    --resource-group $RESOURCE_GROUP \
    --name $APP_NAME \
    --query defaultHostName \
    --output tsv)

echo "Application URL: https://$APP_URL"
Application URL: https://<app-name>.azurewebsites.net