Azure Front Door - Custom Domains Redirects Issue

Sunil Yadav 25 Reputation points
2023-07-19T12:14:01.5266667+00:00

I would like to set up a couple of domains and a few of them are just redirecting to others configured in the same Azure Front Door as custom domains.

e.g xyz.com -> abc.com

I already configured abc.com in AFD custom domains. When I am setting up redirects for xyz.com -> abc.com in the AFD rule set, it is not working.

Question: do I need to add xyz.com also as a custom domain in Azure Front Door

Note: Both xyz.com and abc.com have already been added as IIS binding on AFD backend VM.

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

Accepted answer
  1. GitaraniSharma-MSFT 45,501 Reputation points Microsoft Employee
    2023-07-19T14:52:38.2733333+00:00

    Hello @Sunil Yadav ,

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

    I understand that you would like to set up a couple of domains and a few of them should redirect to others configured in the same Azure Front Door as custom domains.

    Your requirement: xyz.com -> abc.com

    You already configured abc.com in AFD custom domains but when setting up redirects for xyz.com -> abc.com in the AFD rule set, it is not working.

    This is because the Azure Front Door is not aware of xyz.com.

    Rule sets handle requests at the Front Door edge. When a request arrives at your Front Door endpoint, WAF is processed first, followed by the settings configured in route. Those settings include the rule set associated to the route.

    Refer: https://learn.microsoft.com/en-us/azure/frontdoor/front-door-rules-engine?pivots=front-door-standard-premium#architecture

    Now, xyz.com is not configured on your Azure Front Door, so the request doesn't arrive at your Front Door when you access xyz.com and the settings/rule set doesn't apply.

    So yes, you also need to add xyz.com as a custom domain in Azure Front Door.

    Once you add xyz.com to the AFD, you can create a redirect rule and associate it to the route attached to the xyz.com domain.

    This will make sure when a request arrives at your AFD with xyz.com, it will redirect it to abc.com.

    Refer: https://learn.microsoft.com/en-us/azure/frontdoor/front-door-url-redirect?pivots=front-door-standard-premium#destination-host

    https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.cdn/front-door-standard-premium-rule-set

    https://learn.microsoft.com/en-us/azure/frontdoor/standard-premium/how-to-configure-rule-set

    You can also refer this blog for more information.

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


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful