如何修改Azure Web App默认的'Site Under Construction'页面
Hey there! Let's tackle this "Site Under Construction" issue with Azure Web Apps. I've walked many developers through fixing this exact scenario, so here's a clear breakdown of what's going on and how to fix it:
为什么会出现这个页面?
When your Web App doesn't have valid deployed content (or the content you deployed has issues like incorrect file paths, missing dependencies), Azure automatically serves this default placeholder page. The blank content and "Site Under Construction" title are just Azure's way of saying it can't find your actual website content to display.
修改/替换默认页面的具体方法
Below are the most common, straightforward ways to replace this placeholder with your own content:
方法1:通过Kudu工具直接上传自定义页面
- Log into the Azure Portal, locate your target Web App.
- In the left sidebar, go to Deployment Center > Advanced Tools, then click Go to launch the Kudu management tool.
- At the top of Kudu, select Debug console > CMD (or PowerShell, whichever you prefer).
- Navigate to the
site\wwwrootdirectory — this is Azure Web App's default root folder where it looks for your website content. - Click the Upload button to add your custom landing page (e.g.,
index.html). Make sure the filename is one that Azure recognizes as a default homepage (common ones:index.html,default.html,index.aspx— it depends on your app stack). - Once uploaded, refresh your Web App's URL, and your custom page should load instead of the placeholder.
方法2:调整你的CI/CD部署流程
If you're using a deployment pipeline like GitHub Actions or Azure DevOps to push code to Azure:
- Double-check that your deployment task is configured to send your app's built content directly to the
site\wwwrootdirectory. For example, a React app'sbuildfolder contents, or an ASP.NET project's published output. - Ensure your project's homepage file is included in the deployed assets.
- Re-run your deployment pipeline — once completed, Azure will prioritize your custom content over the default placeholder.
方法3:指定自定义默认文档
If your homepage uses a non-standard filename (like my-custom-home.html), you can tell Azure to prioritize it:
- In the Azure Portal's Web App page, go to Configuration > Default Documents in the left sidebar.
- Click Add and enter your homepage's filename.
- Drag your custom filename to the top of the list to set it as the highest priority.
- Save the changes, then refresh your website to see the update.
针对"发布后仍显示空白+该标题"的额外排查步骤
If you've deployed content but still see this placeholder, here are a few things to check:
- Verify your files are actually in
wwwroot: Use the Kudu tool to browsesite\wwwrootand confirm your app's files are present. - Check your app stack configuration: For Node.js apps, make sure the startup command is correct and there are no runtime errors. For ASP.NET apps, confirm you deployed the correct published package.
- Check logs for errors: In the Azure Portal, go to Monitoring > Log Stream to view real-time logs. Look for issues like missing files, permission errors, or runtime crashes that might be preventing your app from loading.
内容的提问来源于stack exchange,提问作者Emrah KONDUR

