Thanks for posting your question in the Microsoft Q&A forum.
To address this problem and stop receiving error emails for these health checks, you should update your Django ALLOWED_HOSTS
setting to include the IP addresses used by Azure App Service. Here's how you can modify your configuration:
Update ALLOWED_HOSTS
in your Django settings:
ALLOWED_HOSTS = [
'your-app-domain.azurewebsites.net',
'localhost',
'127.0.0.1',
'[::1]',
'169.254.0.0/16', # Add this line to cover all Azure internal IPs
]
If you're using environment-specific settings, ensure this change is applied to your production configuration, After making these changes, redeploy your application to Azure App Service.
The
/robots933456.txt
path is indeed a dummy URL used by App Service for health checks. You don't need to create this file or handle it explicitly in your application. If you're using a custom domain, make sure to include it in theALLOWED_HOSTS
list as well.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful