Turns out you can add a custom domain to azure and only need to validate with a TXT record leaving out the A record. This allowed me to then add a hostfile entry to the appservice IP address
Access webapp through hostfile entry
how can I add a hostfile entry so I can access my webapp through domain? when I add a hostfile entry the page is azure 404 web site not found. I cant add a custom domain yet as it's still under development, the domain won't be made public on DNS until a later stage.
- background - I have a deployed a website to a webapp. the website's usage license is attached to a domain address (example.com). Since my azure webapp is defaulted to *.azurewebsites.net. the usage license is invalid when I try to access the admin site through that address. Traditionally I would add a hostfile entry to so I can access the website through the licensed domain address and still land on the IP of the webapp.
Azure App Service
2 answers
Sort by: Most helpful
-
-
Lex Li 6,037 Reputation points
2023-04-24T14:04:09.7266667+00:00 Technically, what you wished is impossible. You have to add the custom domain(s) to your Azure App Service instance, so that Azure knows how to route the HTTP requests to your instance, not any other's. Note that running things on Azure is completely different from running them on your own web server where you have full control, if that's what you meant by "traditionally".