Why does my static web app show a 403 "app stopped" error on one custom domain, but runs fine on a second custom domain?

Peter Bowden 0 Reputation points
2024-07-16T11:11:01.3833333+00:00

My static site has two custom domains https://rodborough.gov.uk & https://www.rodborough.gov.uk the site loads fine with the www subdomain but navigating to the route shows the Azure 403 error warning declaring the app has been stopped. Have checked usage and billing, all fine. App has been running for a couple of years with no issues until today.

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

2 answers

Sort by: Most helpful
  1. Grmacjon-MSFT 17,456 Reputation points
    2024-07-19T20:49:14.8+00:00

    Hi @Peter Bowden there are several reasons why you are seeing the 403 but based on your scenario its probably due to how Azure App Service handles root domains (https://rodborough.gov.uk) and subdomains (https://www.rodborough.gov.uk).

    Here are some troubleshooting steps to resolve the 403 error on the root domain:

    1. Web.config Configuration:

    • your web.config file might be unintentionally configured to redirect the root domain to a non-existent location, causing the 403 error.
    • To fix this:
    • Access your Azure App Service deployment through FTP/SFTP or Azure Storage Explorer.
      • Locate the web.config file in your site's root directory.
      • Check for any rewrite rules or redirects that might be affecting the root domain. You can temporarily disable or remove these rules to see if it fixes the issue.

    2. Default Documents:

    • If the root directory doesn't contain the default document and there's no rewrite rule to handle it, you might see a 403 error.
    • To fix this :
      • Access your App Service configuration in the Azure portal.
      • Navigate to the "Configuration" section and look for settings related to "Default documents".
      • Ensure the list includes your primary index file (e.g., index.html) at the top.

    If the issue persists after following the above troubleshooting steps, please enable diagnostic logging (if not already enabled) for your we app and review the logs for more specific errors or warnings that might shed light on the issue.

    Hope that helps.

    Best,

    Grace

    0 comments No comments

  2. Deaaalden Mohmed 0 Reputation points
    2024-07-20T00:16:43.3433333+00:00

    Please help

    0 comments No comments