Forum Discussion

Hitarth17's avatar
Hitarth17
Occasional Reader
Jul 15, 2026

Azure App Service secure hostname

Hey Everyone, 

I see a new change in app service deployment related to the secure hostname. Is it now mandatory to have a secure hostname, because I don't see the option to toggle between the secure hostname and just the format for appservicename.azurewebsites.net ? I wasn't able to find any update notification to verify this change.  

6 Replies

  • Short answer to your actual question: no, it isn't mandatory — but the portal has stopped asking you, which is why it feels that way.

     

    What changed is the default. New web apps created in the portal now get the secure unique default hostname automatically — the app name, a 16-character hash and the region, so contoso becomes something like contoso-a6gqaeashthkhkeu.eastus-01.azurewebsites.net — and the toggle to pick the classic appname.azurewebsites.net format isn't offered in the portal any more. The classic format still exists, and if you create through the CLI or a template you choose it by simply not setting a hostname scope, since the scope is opt-in there: you add --domain-name-scope when you want the secure hostname, with TenantReuse, SubscriptionReuse, ResourceGroupReuse or NoReuse depending on how stable you want the hash to be.

     

    That scope choice is the bit worth getting right if you deploy across environments. TenantReuse keeps the same hash for the same app name across every subscription in your tenant, which is what you want if you promote from test to production and expect the hostname to stay predictable. NoReuse gives a fresh hash every time, which is the most isolated but also the least predictable.

     

    And on the announcement you couldn't find — you're not missing one. The closest thing to a formal statement is the App Service documentation on subdomain takeover prevention, which was updated on 23 July 2026 to describe this portal default. For apps that already exist, the hostname can't be switched on afterwards; the documented way to move one is to clone it or restore from a backup into a new app with the secure hostname enabled.

  • kdjones03's avatar
    kdjones03
    Brass Contributor

    The formal announcement to removing the toggle has not been published as far as I can tell but the public documentation of https://learn.microsoft.com/en-us/azure/app-service/reference-dangling-subdomain-prevention?tabs=portal was recently updated to reflect this default portal behavior (recent https://github.com/MicrosoftDocs/azure-docs/commit/c04137f1efdc14a6b32ca2f02ba60c8e9ba1a2e8#diff-d01fbfa2b2ef70dfec7c5306b1850dab8738004f36b9cef841be8b67a1054a5bas of 2026-07-23). 

  • Azure portal now forces the "secure unique default hostname" for new apps. While you cannot disable it via the UI, you can still configure it via CLI/IaC at creation time. If you have automated deployments, remember to update your templates to handle this behaviour.

  • It has not made “secure hostname” mandatory for the default appservicename.azurewebsites.net format. The secure hostname requirement you are seeing is related to TLS/SSL certificate changes and industry compliance updates, not a removal of the standard azurewebsites.net hostname option, azurenamingconventions.com/blog/azure-app-service-function-naming

  • 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.

  • Hi Hitarth,

    I noticed the same behavior recently. From what I've seen, Microsoft appears to be moving toward Secure Hostnames by default as part of its secure-by-default initiative, so the toggle may no longer be available in newer deployments or regions.

    The default *.azurewebsites.net endpoint should continue to function, but it's now provisioned with the secure hostname configuration automatically. If you're using Infrastructure as Code (Bicep, ARM, Terraform, or Azure CLI), it's also worth checking whether your deployment templates need to be updated to align with the new behavior.

    I'd be interested to know whether anyone has seen an official Microsoft announcement or release note confirming this rollout, as I haven't found a definitive communication yet either.