Issues with Front Door and the Origin host header

Rick Rader 0 Reputation points
2024-06-18T23:06:44.9933333+00:00

I have AFD that uses an origin type of app services. I configure the host name that points to my web app service and that works fine. If I don't add the default domain that matches the host name, I get the error 404. My application login functionality doesn't work from the default domain, only when using the custom domain. How can I get around this issue? I tried leaving the Origin host header blank and adding in the custom but both result in the error 404.

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
627 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Silvia Wibowo 3,571 Reputation points Microsoft Employee
    2024-06-18T23:56:38.2566667+00:00

    Hi @Rick Rader , I understand you use Azure Front Door in front of an App Service but you are having issues with Origin Host Header.

    See the note from this document: If you're using an App Service as an origin, make sure that the App Service also has the custom domain name configured. For more information, see map an existing custom DNS name to Azure App Service.

    If you've configured custom domain name on your App Service, you can either leave Origin Host Header blank or fill it in with custom domain.

    Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.


  2. hossein jalilian 5,400 Reputation points
    2024-06-18T23:59:32.5933333+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    You need to ensure that the correct host headers are configured in AFD.

    In the Azure portal, navigate to your AFD resource. under Settings, click on Origin groups.

    select the origin group associated with your App Service. under Origins click on the origin representing your App Service. in the Origin blade, ensure that the Host header field is set to the default domain of your App Service.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful