For me, this symptom occurred due to the load balancer routing rules with the new Deployment slots (Preview) functionality. This allow allows you to redirect a proportion of traffic from one slot (i.e., production) to other slots (i.e., staging). You can also route traffic from staging back to production, so there is a matrix of reroutings.
This configuration sends all traffic to the expected site
TO prod stag
FROM
prod 100% 0%
stag 0% 100%
This is a sensible configuration for AB testing, with 5% of traffic prod going to staging, and all staging traffic going to staging
TO prod stag
FROM
prod 95% 5%
stag 0% 100%
I slipped up and had this setup, with 100% of staging going to production
TO prod stag
FROM
prod 100% 0%
stag 100% 0%
The UI is a little unintuitive.
To fix the problem,
for each web app (production, staging, dev etc) in your web service,
- click on "Deployment slots (Preview)"
- set the proportion of traffic as appropriate for that web app.
If you are not doing any A/B testing or similar, you should direct 100% of traffic to that same app (i.e., 100% in the greyed box, 0% in all the others.)
There also appears to be an issue with Azure with the same symptoms as described in the question, although this was not my problem.
Azure load balancer redirects staging slots traffic to production, unable to access staging