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://learn.microsoftcommunitytraining.com/docs/setup-custom-domain-url
----------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.
Let us know if anything required.
Please don’t forget to
"Accept the answer"
andup-vote
wherever the information provided helps you, this can be beneficial to other community members.To follow-up, Please let us know if you have further query on this.
Please don’t forget to
Accept the answer