Is it possible to disable the default URL assigned to the azure web app?

%3CLINGO-SUB%20id%3D%22lingo-sub-2017272%22%20slang%3D%22en-US%22%3EIs%20it%20possible%20to%20disable%20the%20default%20URL%20assigned%20to%20the%20azure%20web%20app%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2017272%22%20slang%3D%22en-US%22%3EIs%20it%20possible%20to%20disable%20the%20default%20URL%20%3CWEBAPP%3E.azurewebsites.net%20for%20a%20web%20app%3F%3C%2FWEBAPP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2017382%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20disable%20the%20default%20URL%20assigned%20to%20the%20azure%20web%20app%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2017382%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F912512%22%20target%3D%22_blank%22%3E%40PDDEV1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20think%20you%20can%20turn%20off%20access%20to%20the%20website%20via%20%5Byour%20cloud%20service%20name%5D.azurewebsites.net%20domain.%3CBR%20%2F%3EHowever%20what%20you%20could%20do%20is%20include%20a%20rewrite%20rule%20in%20your%20web.config%2C%20so%20that%20whenever%20someone%20tries%20to%20access%20your%20website%20via%20azurewebsites.net%20domain%2C%20they%20are%20automatically%20redirected%20to%20your%20custom%20domain.%3C%2FP%3E%3CP%3E%3CSTRONG%3EHow%20to%3A%20Redirect%20the%20default%20*.azurewebsites.net%20domain%20to%20your%20custom%20domain%20on%20Azure%20Web%20Apps%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.zainrizvi.io%2Fblog%2Fblock-default-azure-websites-domain%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.zainrizvi.io%2Fblog%2Fblock-default-azure-websites-domain%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3ESetup%20custom%20domain%20URL%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoftcommunitytraining.com%2Fdocs%2Fsetup-custom-domain-url%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoftcommunitytraining.com%2Fdocs%2Fsetup-custom-domain-url%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2027843%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20it%20possible%20to%20disable%20the%20default%20URL%20assigned%20to%20the%20azure%20web%20app%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2027843%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F912512%22%20target%3D%22_blank%22%3E%40PDDEV1%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20it%20is%20not%20possible%20but%20you%20can%20map%20a%20custom%20domain%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fapp-service-web-tutorial-custom-domain%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fapp-service%2Fapp-service-web-tutorial-custom-domain%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Visitor
Is it possible to disable the default URL <webapp>.azurewebsites.net for a web app?
2 Replies

@PDDEV1 

 

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