Dec 27 2020 07:46 PM
Dec 27 2020 09:56 PM
I don't think you can turn off access to the website via [your cloud service name].azurewebsites.net domain.
However what you could do is include a rewrite rule in your web.config, so that whenever someone tries to access your website via azurewebsites.net domain, they are automatically redirected to your custom domain.
How to: Redirect the default *.azurewebsites.net domain to your custom domain on Azure Web Apps
https://www.zainrizvi.io/blog/block-default-azure-websites-domain/
Setup custom domain URL
https://docs.microsoftcommunitytraining.com/docs/setup-custom-domain-url
Jan 03 2021 11:02 AM
Hi it is not possible but you can map a custom domain
https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain
Apr 24 2023 11:54 PM
An App Service might be running in an App Service Environment though, and their default hostnames are different to .azurewebsites.net (see https://learn.microsoft.com/en-us/azure/app-service/environment/how-to-custom-domain-suffix), I believe you can even select your own domain suffix that replaces the one for the App Service Environment.
Additionally, App Services in Clouds other than the Global Cloud (GCC High, DoD, 21Vianet) use other domains than azurewebsites.net.
Thus, it is difficult to impossible to disable it for an existing Azure App Service, but if you are dealing with App Services in general, you should not assume that the domain always ends with .azurewebsites.net.
Apr 25 2023 04:50 AM
May 15 2023 05:55 PM
Seems not by default but handle by access restrictions