Cached custom domain redirects

mohammad didehbanmehr 0 Reputation points
2024-09-29T09:27:03.52+00:00

Hello,

I previously had a www. domain and an APEX domain set in my custom domains of the static web app.
I have added and removed them a few times and set and unset either of them as default domains.

The current setup is that the APEX domain is the default. doesn't matter if I remove it as default or set the www domain as default it feels like there is a terrible cache built up redirecting them to each other resulting in a redirect loop.

It is not a local issue or a local cache. I have tried it with different browsers on different devices and the issue persists. So I believe it should be some caching on azure's end or incomplete deletion of the custom domain if it is set as default or something.

Is there a way to clear that cache? I have tried removing all custom domains and re-adding them but that didn't help either.

Thanks

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
925 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 17,886 Reputation points
    2024-10-01T01:34:08.98+00:00

    Hi @mohammad didehbanmehr we are sorry to hear you're facing this issue.

    Can you please share with us how you're deleting your domains? are you using Azure Front Door or Azure CDN.  If you're using Azure CDN with your Static Web App, try purging the CDN cache:   - > Go to your CDN profile in the Azure portal - > Select the endpoint associated with your Static Web App  -> Click on "Purge" and purge all paths.

    Also, can you check if your domain has been completely removed from your Azure Static Web App using Azure CLI:

     bash az staticwebapp hostname list --name <app-name> --resource-group <resource-group-name> 
    
    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.