Unset default - static web app custom domain after deleting the app

Navin Viraragavan 0 Reputation points
2024-02-21T13:15:26.54+00:00

Hi All,

I have created static web app and added two domains xyz.com, xyz.yy and marked xyz.yy as default domain. App run for few months, Without Unset default . I have deleted the static web app.
Even now , my browser redirecting me to xyz.yy when I try to access xyz.yy, because of redirect cache. I don't want all my users to clear cache, How to solve this issue.

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

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,151 Reputation points Moderator
    2024-02-23T23:11:16.7866667+00:00

    Hi @Navin Viraragavan this is a known issue.

    Below are a few steps to follow that can help reslove your issue:

    • Since you deleted the static web app, its DNS record for "xyz.yy" will still point to the app service, even though it's unavailable. This redirects users to the app service's default domain ("xyz.com") due to the "Unset Default" feature not being used. You can update the DNS record for "xyz.yy" to point to a different destination, such as a landing page explaining the app is no longer available, or another website you own. This will override the redirect cache and direct users to the new destination.
    • You can't directly manipulate the redirect cache, but you can set specific HTTP headers in your DNS records for "xyz.yy" to alter browser behavior in these ways:

    Cache-Control: no-cache: This instructs browsers not to cache the response, forcing them to fetch the latest information from the DNS server.

    Expires: 0: This sets the expiration time for the cached response to the past, effectively invalidating it.

    Pragma: no-cache: This is similar to "Cache-Control: no-cache" but might be interpreted differently by older browsers.

    • Lastly, assuming you used a CDN for serving your static web app, it might have cached the redirect. Update the CDN configuration to remove the cached entries for "xyz.yy" and propagate the changes to its edge servers. This will ensure users accessing the domain from different locations receive the updated DNS information.
    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.