Custom domain is not working as we have configured by Front Door and CDN profile

Sajjad Ahmad 30 Reputation points
2025-04-10T07:46:50.5333333+00:00

Hello,

We have hosted the static website under a storage account's static website feature. The site is now deployed and working as expected. However, we want to configure a custom domain. We have tried using Front Door and a CDN profile, but it's still not working as expected.

see the following errors and configuration screenshots,

User's image

User's image

User's image

User's image

Please guide us where we have problem.

Thanks,

Sajjad Ahmad

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

Accepted answer
  1. Shravan Addagatla 1,530 Reputation points Microsoft External Staff Moderator
    2025-04-10T11:37:39.9066667+00:00

    Hello Sajjad Ahmad

    I understand you were unable to access the custom domain mapped to either the storage account static website or Azure Front Door service. This issue can occur if the custom domain is not registered on the storage account as shown below:

    Storage account --> Networking --> Custom domain

    Once you register the custom domain on the storage account, the "request URI is invalid" error will disappear.

    User's image

    I tested it in my lab and successfully accessed the static website.

    User's image

    In your setup, I noticed that your custom domain is currently mapped to a storage account where the custom domain is not registered.

    User's image

    If you cannot see the custom domain option listed under networking settings, it means you enabled the hierarchical namespace feature when creating the storage account.

    Refer :

    Since custom domains on the storage account don't support HTTPS, you need to use the Azure Front Door service.

    https://learn.microsoft.com/en-us/azure/storage/blobs/storage-custom-domain-name?tabs=azure-portal#map-a-custom-domain-with-https-enabled

    From your screenshot, I can see that you have already added the custom domain and enabled SSL on Azure Front door using the AFD managed certificate. However, the CNAME record was not mapped to the Azure Front Door endpoint.User's image Also, ensure that the origin settings are correctly configured for the storage account.

    • In the route settings: - Forwarding and Accepting protocols should be set to HTTPS
    • Finally, map the custom domain to the AFD endpoint by creating a CNAME Record.
        ev.commswift.com   CNAME    EVCommswift-hqg9d8bgewfth7gb.z02.azurefd.net
      
      If the issue still persists, please let me know the error message on AFD.

    I hope this has been helpful!

    If above is unclear and/or you are unsure about something add a comment below.
    Accepted answer Please click "Accept" the answer as original posters help the community find answers faster by identifying the correct answer. 

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Alex Burlachenko 10,255 Reputation points
    2025-04-10T11:37:52.01+00:00

    Dear Sajjad Ahmad,

    Thank you for reaching out here at Q&A portal, regarding the custom domain configuration issue with your Azure Front Door and static website setup. I’ve reviewed the details you shared, so

    1. 400 Invalid URI Error: This typically indicates malformed requests reaching Front Door. Possible causes include:
      • Incorrect route paths or rule sets.
      • Misconfigured origin (storage account static website URL).
      • Missing or mismatched custom domain validation.
      Domain Status: Your Front Door endpoint (EVCommswift-hog9d8bgewfth7gbz02.azurefd.net) appears active.
        The certificate is deployed (182 days to expiry), but the DNS state needs confirmation—ensure the CNAME for your custom domain points to this endpoint.
      

    Try to do next:

    1. Verify DNS Configuration

    CNAME Record: Ensure your custom domain (e.g., www.yourdomain.com) has a CNAME record pointing to EVCommswift-hog9d8bgewfth7gbz02.azurefd.net.

    Validation: Use nslookup yourdomain.com to confirm DNS propagation.

    1. Recheck Front Door Routes & Origins

    Route Path: Confirm the route (e.g., excommswiftroute) includes:

    Patterns: /* (if serving all paths).

      Origin Group: Ensure it links to your storage account’s static web endpoint (e.g., `https://<storage-account>.zxx.web.core.windows.net`).
      
      Health Probes: Verify the probe path (e.g., `/`) returns HTTP 200.
      
    
    1. Validate Custom Domain in Front Door
    • Navigate to Front Door Manager > Domains and:
      • Confirm the custom domain is listed with status "Succeeded"
      • Check for errors under Certificate State or DNS State
    1. Test Direct URLs

    Access these directly to isolate the issue:

    Storage Static Site: https://<storage-account>.zxx.web.core.windows.net

      Front Door Endpoint: `https://EVCommswift-hog9d8bgewfth7gbz02.azurefd.net`
      
      If the Front Door URL works but the custom domain fails, the issue is likely DNS or domain validation.
      
    

    Best regards,

    Alex

    P.S. If my answer help to you, please Accept my answer

    0 comments No comments

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.