Share via

Change Web App operating system while keeping url

Alexander Berglund 40 Reputation points
2026-03-10T09:57:27.68+00:00

Hi,

As I understand it, I have to create a new Web App in order to change its operating system from Windows to Linux. How can I ensure I can keep the same url? Or is there another way?

Thanks

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments

Answer accepted by question author
  1. Golla Venkata Pavani 3,735 Reputation points Microsoft External Staff Moderator
    2026-03-10T10:24:09.7566667+00:00

    Hi @Alexander Berglund,

    Unfortunately, In Azure App Service, the operating system (Windows or Linux) cannot be changed after a Web App is created. The OS selection is fixed at creation time, and Microsoft explicitly states that if you need a different operating system, you must recreate the Web App using the desired OS and redeploy your application.

    Keeping the same URL

    • Default Azure URL (<appname>.azurewebsites.net)
      It indicates that when you create a new Web App (for example, a Linux app to replace a Windows app), a new app name and URL are required. The default azurewebsites.net hostname cannot be preserved or reassigned to another Web App while the original app exists, and there is no supported method to retain it during an OS change.
    • Custom domain (recommended and supported approach)
      Microsoft supports keeping the same public URL by using a custom domain. You can bind the same custom domain (for example, www.contoso.com) to the new Linux Web App and update DNS accordingly. Microsoft provides a documented process to migrate an active custom domain to another App Service app with no DNS downtime by pre‑binding the domain and then switching traffic.

    Microsoft‑recommended approach

    1. Create a new Linux Web App.
    2. Deploy and validate your application on the new app.
    3. Migrate the custom domain from the old Windows app to the new Linux app using the supported domain‑migration process.
    4. Reconfigure SSL/TLS bindings if required.

    This is the only supported method to change the operating system while keeping the same public-facing URL.

    Reference:
    https://learn.microsoft.com/en-us/azure/app-service/app-service-migration-windows-linux
    https://learn.microsoft.com/en-us/azure/app-service/manage-custom-dns-migrate-domain

    Kindly let us know if the above comment helps or you need further assistance on this issue.

    Please "upvote" if the information helped you. This will help us and others in the community as well.

    1 person found this answer helpful.
    0 comments No comments

Answer accepted by question author
  1. TP 155.2K Reputation points Volunteer Moderator
    2026-03-10T10:14:19.65+00:00

    Hi Alexander,

    Are you wanting to use same custom domain (e.g. www.yourdomain.com), or same default hostname, or both?

    Does your existing web app use unique default hostname format? Example below:

    yourappname.<randomhash>.region-01.azurewebsites.net

    Or does it use original hostname format? Example below:

    yourappname.azurewebsites.net

    -TP


1 additional answer

Sort by: Most helpful
  1. Shree Hima Bindu Maganti 7,035 Reputation points Microsoft External Staff Moderator
    2026-03-21T11:44:05.51+00:00

    Hi @Alexander Berglund
    Additionally, to avoid downtime during migration, you can first deploy and validate the application on the new Linux Web App using its temporary URL. Once confirmed working, proceed with deleting the old Web App and recreating the new one with the original name. If zero-downtime is required, consider using a custom domain and switch the DNS binding to the new Web App instead of relying on the default azurewebsites.net URL
    https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans
    Let me know if you have any further assistances needed.

    0 comments No comments

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.