Forum Discussion
Azure App Service secure hostname
The secure unique default hostname is an App Service option designed to reduce subdomain-takeover risk. Instead of the predictable app name format, it includes a deterministic hash and region. Microsoft recommends it for new apps, while the classic hostname still exists for resources created without a domain-name scope.
The choice is made when the resource is created and cannot be enabled retroactively for an existing app. Portal behavior may therefore differ between old and new deployments. Check WEBSITE_DEFAULT_HOSTNAME or the app’s Overview page rather than assuming the classic name was also assigned.
Both default formats use Azure-managed TLS certificates, so “secure” here refers to unique ownership, not an absence of HTTPS on the classic name. For production, attach and validate a custom domain and avoid making application logic depend on either default hostname. Infrastructure code should read the deployed defaultHostName output rather than constructing a hostname from the app name.