Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
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 defaultazurewebsites.nethostname 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
- Create a new Linux Web App.
- Deploy and validate your application on the new app.
- Migrate the custom domain from the old Windows app to the new Linux app using the supported domain‑migration process.
- 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.