can an file of web app in Kudo can be deleted through Azure devops

Jayakumar R 40 Reputation points
2025-05-05T20:57:24.71+00:00

1. How can I remove the default homepage from my Azure Web App hosting as a PaaS service?

2. If I find the default file (e.g., hostingstart.html) in the site/wwwroot folder via Kudu, how can I delete or replace it through Azure DevOps?

3. Is it possible to perform this removal on an already deployed Azure PaaS Web App without redeploying the web app?

Azure Web PubSub
Azure Web PubSub
An Azure service that provides real-time messaging for web applications using WebSockets and the publish-subscribe pattern.
95 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bhargavi Naragani 3,820 Reputation points Microsoft External Staff Moderator
    2025-05-06T05:45:53.59+00:00

    Hi @Jayakumar R,

    How can I remove the default homepage from my Azure Web App hosting as a PaaS service?

    When you create a new Azure App Service (Web App), Azure automatically places a default file called hostingstart.html in the /site/wwwroot folder. This acts as a placeholder page until you deploy your own content. To remove this file, you can simply delete or overwrite it with your actual application files.

    If I find the default file (e.g., hostingstart.html) in the site/wwwroot folder via Kudu, how can I delete or replace it through Azure DevOps?

    If you're using Azure DevOps pipelines (CI/CD), your deployment process automatically overwrites everything in the site/wwwroot folder, including the hostingstart.html file. To ensure the file is deleted during deployment:

    • Just exclude hostingstart.html from your code repository.
    • During deployment via your pipeline, the App Service deploy task (such as using Azure App Service Deploy or Web Deploy) will remove it if it's not part of your deployment package.
    • You probably don’t want to delete the whole app. Instead, to delete a file like hostingstart.html, you can use an Azure DevOps pipeline task that runs Azure CLI or Kudu API commands to delete the file directly from site/wwwroot.

    Is it possible to perform this removal on an already deployed Azure PaaS Web App without redeploying the web app?

    Yes, you can delete it without a full redeployment using any of these methods:

    • Go to https://<your-app-name>.scm.azurewebsites.net, navigate to site/wwwroot, and delete the file manually.
    • Use the Kudu API from a pipeline to remove the file during your release process.
    • Add a script step before or after your deployment to delete the file using REST API calls.

    Deploy to Azure Web App using Azure DevOps
    Kudu – Access your app’s files via the SCM site
    Azure App Service Deployment Center
    Kudu REST API for File Management

    I hope you find this information useful.

    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    Let me know if you have any further Queries.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.