Azure Front Door URL Normalization

Christopher Felpel 0 Reputation points
2024-01-22T02:54:56.59+00:00

I can't seem to find away to detect URL's that contain multiple forward slashes in the path portion of a URL processed through Front Door using rule set match conditions. According to the logs below this is happening because Azure Front Door is normalizing the URL before the rule set can process it. I need to be able to interrogate URL's in the their original form so I can properly 301 redirect them denoting their permanent resource address. SEO Black Hat firms purposely create backlinks on third party sites in this form to negatively impact your search engine rankings.

For example, in the image below you'll see I'm sending a GET request in a non-normalized form. In the second image you can see the URL has been normalized by Front Door in the logs. NOTE: In the Front Door log you can see that the trailing forward slashes are retrained when relaying the request to the origin. However, the beginning of the path has been normalized. It's akin to a game of choose your own adventure.
Screenshot 2024-01-21 at 9.45.58 PM

Screenshot 2024-01-21 at 9.49.08 PM

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

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 45,406 Reputation points Microsoft Employee
    2024-01-22T14:19:37.6933333+00:00

    Hello @Christopher Felpel ,

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

    I understand that you would like to know if there is a way to detect URLs that contain multiple forward slashes in the path portion of the URL processed through Front Door using rule set match conditions.

    I discussed this with the Azure Front Door Product Group team and below is their response:

    This is not possible in Rules Engine. Multiple slashes at the beginning of the URL are normalized before the condition evaluates, so a rule configured to match multiple slashes at the beginning of the path will not match. Using routes won't work either as we normalize before matching the route. This is unachievable as of today.

    If you wish you may leave your feedback in the below forum requesting this feature. All the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure.

    Refer: https://feedback.azure.com/d365community/forum/8ae9bf04-8326-ec11-b6e6-000d3a4f0789

    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.

    1 person found this answer helpful.