Share via

404 Errors on a Static Web App using a custom domain

Bullseye Dev 5 Reputation points
2026-05-26T19:53:14.28+00:00

I launched a Static Web App. I added it to my custom domain.

I let it sit for 12 hours and it was still throwing random, intermittent 404 errors. Sometimes I would get a "404: Not Found" page. Sometimes it would load fine. And sometimes it would fail to load various random files, with a 404 for the files.

So, I removed the domain, waited two hours, and then re-added it. It has been another two hours and it is still exhibiting the same behavior. I have checked my domain records, checked the status of the domains, etc. and everything looks fine.

Azure Static Web Apps
Azure Static Web Apps

An Azure service that provides streamlined full-stack web app development.


3 answers

Sort by: Most helpful
  1. Praneeth Maddali 10,025 Reputation points Microsoft External Staff Moderator
    2026-05-27T17:46:10.7533333+00:00

    Hi @Bullseye Dev Thanks for the detailed update and screenshots in PVT chat

    This matches a known behavior with Azure Static Web Apps: intermittent 404s on the custom domain only (while the default *.azurestaticapps.net works) usually points to edge routing/propagation issues — especially when a domain is reused after being bound to another SWA in a different subscription.

    Azure’s global edge network can retain stale mappings for a while, causing random asset-level 404s until everything converges.

    Recommended next steps:

    • Wait 24–48 hours from your last domain change (avoid frequent add/remove cycles).
    • Double-check DNS:
      • www >CNAME to your SWA hostname
      • Root domain >properly configured ALIAS/A record
    • Test using the default Azure URL to confirm the app itself is healthy.
    • Clear browser cache (Incognito) + flush local DNS.

    REference :

    https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain

    https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain-external

    https://learn.microsoft.com/en-us/troubleshoot/azure/app-service/connection-issues-with-ssl-or-tls/troubleshoot-custom-domain-issues-azure-app-service

    User's image

    User's image

    If the issue persists after 48 hours, please let us know

    If the answer is helpful,  Please do click "Accept the answer” and Yes, this can be beneficial to other community members.

    If you have any other questions, let me know in the "comments" and I would be happy to help you

       

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. kagiyama yutaka 3,510 Reputation points
    2026-05-27T02:26:08.0566667+00:00

    I think the custom‑domain 404 comes from dns still propagating and checking the same path on the default *.azurestaticapps.net host is the simple supported way to see the app itself is ok.

    Was this answer helpful?


  3. Bruce (SqlWork.com) 84,071 Reputation points
    2026-05-26T20:00:50.1766667+00:00

    Use the browsers network trace to determine if it’s the domain or path.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.