Traffic Manager does not route to the correct Host

Yasmin, Fitri 286 Reputation points
2024-03-27T10:54:52.05+00:00

I'm testing the Azure Traffic Manager custom header settings. I created a profile with priority routing. Then, I added IIS-enabled VM as an endpoint.

Host name is specificied in IIS managerUser's image

I added this host information at endpoint level.

User's image

It returns the right result when I tested in postman

User's image

However browsing the traffic manager in browser was unsuccessful.

User's image

Azure Traffic Manager
Azure Traffic Manager
An Azure service that is used to route incoming network traffic for high performance and availability.
126 questions
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 45,366 Reputation points Microsoft Employee
    2024-03-27T12:48:30.14+00:00

    @Yasmin, Fitri ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I am afraid I am not sure what the requirement here is.

    Note 1:

    • You added Host Binding to your IIS VM.
    • This means, requests to IIS VM would expect the host to be "Test"
    • And other host or directly accessing via IP Address would give you 404 (not Traffic Manager, the IIS VM itself would give you 404)

    Note 2:

    • Custom header settings is only for endpoint monitoring, i.e., Health check ups from Azure Traffic Manager to your IIS VM.
    • Not for actual customer traffic to your IIS VM. See : ATM Endpoint monitoring
    • This means, the header Host:Test is only sent when ATM probes for health of the IIS VM, not when a customer tries to access the IIS VM.
    • Also, customer traffic never passes through a ATM. This means, there is no way you can influence the HTTP Headers of a client request using ATM.
    • See : How clients connect using Traffic Manager.
    • User's image

    So, when a custom requests goes to the VM, it will not have the header Host:Test and hence, the IIS VM would return a 404.

    P.S :

    • The reason it is working with PostMan is that you are manually sending the header Host:Test with your request (per your screenshot)
    • User's image
    • If you were to remove the Host header, this will also give 404 only (just like a Browser, because when you access the site via Browser, the Host header is not added by anyone)
    • User's image

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.