Create an Azure Web App: Step-by-Step Guide for Beginners

  • Azure
  • App Service
  • Beginner friendly
  • 18 min read

To create an Azure Web App, you fill in one form with eight choices. They are subscription, resource group, name, publish type, runtime, operating system, region and pricing plan. This guide explains what each choice means in plain words, walks through the Azure portal, repeats the same setup with Azure CLI on the Free tier, deploys a small app, and shows how to delete everything so nothing keeps billing you.

Last updated: December 2026

In short

  • A web app needs three things around it: a subscription that pays, a resource group that holds it, and an App Service plan that runs it.
  • Pick .NET 10 (LTS), not .NET 9. .NET 8 and 9 went out of support in November 2026, and App Service no longer lists them.
  • The Free F1 plan costs nothing and is enough to learn. Paid plans bill by the hour even when the app is stopped, so delete the resource group when you finish.
Create an Azure Web App: subscription, resource group, App Service plan and web app, and the 8 choices on the Basics tab
Top: where a web app lives in Azure. Bottom: the eight choices you make when you create one. Tap the picture to see it full size.

Quick Reference Table

Every part you will meet in this guide, on one screen. Come back to it when a word on the form is unclear.

PartWhat it isExample in this guideWhy it matters
Azure portalThe website where you manage Azureportal.azure.comWhere you click through the form
Create a resourceThe start button for any new serviceCreate a resource, then Web AppOpens the Web App form
Web AppA site, API or backend on Azure App Servicemywebapp-12345The thing you are building
SubscriptionThe billing accountAzure subscription 1Decides who pays
Resource groupA folder for one project’s resourcesrg-webapp-demoDelete it and everything inside goes
NameBecomes part of the web addressmywebapp-12345.azurewebsites.netMust be unique across Azure
Unique default hostnameAdds a random part and the region to the address…-a1b2c3d4e5f6g7h8.canadacentral-01…On by default in the portal; stops name clashes
PublishHow you deliver the appCodeCode uses Azure’s runtime; Container uses your image
Runtime stackLanguage and version.NET 10 (LTS)Must be in support and match your app
Operating systemWindows or LinuxLinuxSome runtimes exist on only one
RegionThe Azure location that runs the appCanada CentralNear your users; cannot change later
App Service planThe machine you rent and its priceFree F1Sets the cost, power and features

What Is an Azure Web App?

A Web App is a website, API or mobile backend hosted on Azure App Service. You bring the code. Microsoft looks after the servers, the operating system updates, the web server and the HTTPS certificate for the default address. You never log in to a machine to patch it.

Four terms come up on every screen, so learn them first:

Subscription

The billing account. Everything you create is charged to one subscription, and a resource belongs to exactly one.

Resource group

A folder for the resources of one project. It costs nothing by itself. Delete the group and everything inside goes with it.

App Service plan

The computer you rent: its region, operating system and pricing tier. One plan can run several web apps, and you pay for the plan, not per app.

Web app

Your site itself: a name, a runtime such as .NET or Python, and your code. It runs on a plan and gets a public address.

Architecture Visualization: What Happens When Someone Opens Your Site

The picture above shows where a web app sits. This one shows what it does. When a visitor types the address, DNS points the browser to Azure. An Azure load balancer receives the request and handles HTTPS there, then passes the request to the machine your plan rents. The runtime (.NET in this guide) hands it to your code, and the answer travels back the same way.

Azure Web App architecture: a visitor opens the address, DNS points to the Azure load balancer where HTTPS ends, the plan instance runs the runtime and your code, and the answer goes back
One request from browser to code and back, and who looks after each part. Tap the picture to see it full size.

Two things follow from this. Because HTTPS ends at the load balancer, your code receives plain HTTP and does not need a certificate of its own. And on Free F1 the machine is shared with other customers’ apps, which is fine for learning but not for a busy site. Basic and higher run your apps on machines of your own.

Before You Start

  • An Azure account. A new Azure free account comes with a $200 credit for the first 30 days, and some services stay free after that.
  • A browser for the portal part. Nothing to install.
  • Azure CLI for the command line part (optional). Install it from Microsoft’s install page, or use Cloud Shell inside the portal.

What this costs

Nothing, if you choose the Free F1 plan as shown here (the same idea as the AWS Free Tier). Be careful with the paid tiers: a Basic plan is charged for every hour it exists, even when the web app is stopped and even when the plan is empty. Stopping an app does not stop the bill. Deleting the plan does.

Flowchart: The Whole Process at a Glance

This is the full path from opening the portal to deleting your test, with the four places beginners usually get stuck. Each orange diamond is a question. If the answer is yes, do what the box beside it says, then carry on down.

Flowchart to create an Azure Web App: portal, subscription, resource group, name, publish, runtime, operating system, region, Free F1 plan, review and create, with the questions that send you back
Steps 01 to 08 match the eight choices below. Tap the picture to see it full size.

Create an Azure Web App in the Portal: The 8 Choices

Sign in at portal.azure.com, select Create a resource, then Web App, then Create. Your portal may look a little different from screenshots you have seen, because the theme and menu are personal settings. If you get lost, type “App Services” in the search bar at the top. Everything below is on the first tab, Basics.

01 Subscription: Who Pays

Most beginners have only one, so it is already selected. If you have several (for example work and personal), check this field first. A web app created in the wrong subscription is billed to the wrong account.

02 Resource Group: The Project Folder

Select Create new and give it a clear name such as rg-webapp-demo. Use one group per project. When the project ends, you delete one group instead of hunting for leftovers.

03 Name: It Becomes the Web Address

The name is 2 to 60 characters: letters, numbers and hyphens, with no hyphen at the start or end. It becomes part of the public address, so it has to be unique.

In the portal, unique default hostname is switched on by default. Azure then adds a random part and the region to your name, and shows the result under the box:

Kind of addressExampleWhen you get it
Classic defaultmywebapp.azurewebsites.netUnique hostname switched off. The name must be free across all of Azure.
Unique defaultmywebapp-a1b2c3d4e5f6g7h8.canadacentral-01.azurewebsites.netThe portal default. Safer, because nobody can claim the same address after you delete the app.
Custom domainwww.example.comAdded later. Needs a paid tier (not Free F1).

The long address is fine for learning. A real site hides it behind a custom domain.

04 Publish: Code or Container

Choose Code. Azure supplies the runtime and you upload only your application. Container is for when you have built a Docker image, usually because you need software that the built-in runtimes do not include.

05 Runtime Stack: Language and Version

Pick the language your app is written in. For a .NET app choose .NET 10 (LTS). Many older tutorials say .NET 8 or .NET 9; both went out of support on 10 November 2026 and are gone from the list. .NET 11 is also offered, but it is a short-support release, so LTS is the calmer choice for a first app.

06 Operating System: Windows or Linux

Some runtimes exist on only one of them. This is what the built-in list looked like when we checked it with Azure CLI in December 2026:

RuntimeWindowsLinux
.NET 10 and 11YesYes
ASP.NET (.NET Framework 4.8)YesNo
Node.jsYesYes
Java and TomcatYesYes
PythonNoYes
PHPNoYes

For modern .NET either one works. Choose Linux unless you need something that is Windows only, such as an old ASP.NET site.

07 Region: Where It Runs

Pick the region closest to the people who will use the site, for example Canada Central. If Azure refuses your first choice (see the quota tip in the CLI part), pick the next closest one. Choose with care: an App Service app cannot be moved to another region later. You would have to create a new one and copy the site across.

08 Pricing Plan: Cost and Power

The portal creates a new App Service plan for you and may preselect a paid tier. Open the pricing plan list and choose Free F1. This is the choice that matters most for your bill.

Free F1 limitValue
PriceNo charge
CPU time60 minutes per day
Memory1 GB for the whole plan
Storage1 GB
Custom domainNo, only the azurewebsites.net address
Always OnNo, the app sleeps when idle and wakes on the next visit

Move to Basic or higher when you need your own domain, a free managed certificate for it, or an app that never sleeps.

Review, Create and Open the Site

  1. Select Review + create. Azure checks the form. Read the summary once more, mainly the subscription and the pricing plan.

  2. Select Create and wait for “Your deployment is complete”. It takes a short while.

  3. Select Go to resource. On the Overview page, select the web address shown as the default domain.

  4. You should see Microsoft’s placeholder page, which says the web app is running and waiting for your content. The web app works; it only has no code yet.

CLI Equivalent: Create the Same Azure Web App With Azure CLI

Each portal choice has a matching option in Azure CLI. Same concept, typed instead of clicked:

Portal choiceAzure CLI optionOn which command
01 Subscription--subscription "<name or ID>"az account set
02 Resource group--name rg-webapp-demoaz group create
03 Name--name mywebapp-12345az webapp create
03 Unique default hostname--domain-name-scope TenantReuseaz webapp create
04 Publish: Code--runtime (Container uses --container-image-name)az webapp create
05 Runtime stack--runtime "DOTNETCORE:10.0"az webapp create
06 Operating system--is-linux (or --is-linux false)az appservice plan create
07 Region--location canadacentralaz group create (the plan uses the group’s region unless you add its own)
08 Pricing plan--sku F1az appservice plan create

The portal is good for learning what the choices mean. The command line is better once you repeat the job, because the same commands always give the same result. (When you want the whole setup written down as code, Terraform is the step after that.) Run them one at a time. Replace mywebapp-12345 with your own unique name.

Sign in:

Azure CLI
az login

Create the resource group in Canada Central:

Azure CLI
az group create --name rg-webapp-demo --location canadacentral

Create a Free Linux plan:

Azure CLI
az appservice plan create --name plan-webapp-demo --resource-group rg-webapp-demo --sku F1 --is-linux

Always write the SKU and the operating system

Older notes say this command makes a Basic Windows plan when you leave the options out. That is no longer true. Current Azure CLI creates a Linux plan unless you add --is-linux false, and without --sku you can end up on a paid tier. Type both every time.

Create the web app with .NET 10 on that plan:

Azure CLI
az webapp create --name mywebapp-12345 --resource-group rg-webapp-demo --plan plan-webapp-demo --runtime "DOTNETCORE:10.0"

If the plan fails with a quota error

In our test, the Free plan was refused in Canada Central with “Operation cannot be completed without additional quota … Current Limit (F1 App Service instances): 0”. Some subscriptions have no Free quota in some regions. The quick fix is another region: add --location centralindia (or any region that works for you) to the plan command. The slower fix is a quota request on the portal’s Quotas page.

The runtime text is different per operating system: DOTNETCORE:10.0 on Linux and dotnet:10 on Windows. To see every valid value, list them:

Azure CLI
az webapp list-runtimes --os-type linux

Print the address of your new site:

Azure CLI
az webapp show --name mywebapp-12345 --resource-group rg-webapp-demo --query defaultHostName --output tsv

In our test this printed <name>.azurewebsites.net, and that address showed Microsoft’s welcome page straight away. Unlike the portal, the CLI gives you the classic short address unless you ask for a unique one with --domain-name-scope TenantReuse when you create the app. You may also see az webapp up in older guides. It is deprecated, so use the commands above.

A Tiny .NET App to Put on It

This is the whole program. We built and ran it on a PC with the .NET 10 SDK, and both addresses answered:

C# · Program.cs
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapGet("/", () => "Hello from Azure Web App");
app.MapGet("/health", () => Results.Ok("Healthy"));

app.Run();

Create the project it belongs in, then replace the generated Program.cs with the code above:

.NET CLI
dotnet new web -n HelloAzure

Run it on your own PC first, from inside the HelloAzure folder:

.NET CLI
dotnet run

Open the address it prints. / shows the greeting and /health shows "Healthy". The second address is a health check: a simple page that monitoring tools can call to ask whether the app is alive.

Code Breakdown: The Sample App, Line by Line

Five lines are the whole app. Here is what each one does:

LineWhat it does
var builder = WebApplication.CreateBuilder(args);Prepares the app: reads settings from files and environment variables and sets up the built-in web server. On App Service this is how the app learns which port to listen on, so the code has no port number.
var app = builder.Build();Builds the app from those settings. After this line you add the pages.
app.MapGet("/", () => "Hello from Azure Web App");When a browser asks for the home page, send back this plain text.
app.MapGet("/health", () => Results.Ok("Healthy"));Answers /health with status 200 (OK) and the word Healthy as JSON. That is why the browser shows it in quotes.
app.Run();Starts the server and keeps it running until Azure or you stop it.

And here is how the choices on the portal form show up in your code:

Portal choiceEffect on the appWhat to do
Runtime stackSets the .NET version Azure runsMatch the version in your project file (net10.0 here)
Operating systemChanges the machine under the appModern .NET runs on both; .NET Framework 4.8 needs Windows
Publish: CodeAzure runs your built filesDeploy the output of dotnet publish, as below
Publish: ContainerAzure runs your Docker imageBuild and push an image instead of a zip
RegionSets how far the app is from visitorsPick the one nearest your users
NameSets the default addressNothing in code; links to the site use it

Deploy the App to Your Azure Web App

Three commands send it to Azure. We ran them against a Free F1 web app, and the site answered with the greeting a few seconds later. Run them from inside the HelloAzure folder. First build the release files into a publish folder:

.NET CLI
dotnet publish -c Release -o publish

Zip what is inside that folder:

Windows · PowerShell
Compress-Archive -Path publish\* -DestinationPath app.zip -Force

Upload the zip to the web app:

Azure CLI
az webapp deploy --resource-group rg-webapp-demo --name mywebapp-12345 --src-path app.zip --type zip

Wait for RuntimeSuccessful in the output, then open the site. The welcome page is gone and you see Hello from Azure Web App. Add /health to the address to see "Healthy".

Clean Up So Nothing Keeps Billing

Deleting the resource group removes the web app and the plan together. Check what is in it first:

Azure CLI
az resource list --resource-group rg-webapp-demo --output table

Then delete the group:

Azure CLI
az group delete --name rg-webapp-demo --yes --no-wait

In the portal, open the resource group and select Delete resource group. This cannot be undone, so read the group name before you confirm.

Essential Commands Cheatsheet

The Azure CLI commands you will use most around a web app. Every one was checked against Azure CLI 2.91. Replace the example names with yours.

TaskCommand
Account and subscription
Sign inaz login
Show the subscription in useaz account show --output table
List all your subscriptionsaz account list --output table
Switch subscriptionaz account set --subscription "<name or ID>"
Resource group
Create oneaz group create --name rg-webapp-demo --location canadacentral
List themaz group list --output table
See what is insideaz resource list --resource-group rg-webapp-demo --output table
Web app
List your web appsaz webapp list --output table
Print the addressaz webapp show --name mywebapp-12345 --resource-group rg-webapp-demo --query defaultHostName --output tsv
Open it in the browseraz webapp browse --name mywebapp-12345 --resource-group rg-webapp-demo
Restart itaz webapp restart --name mywebapp-12345 --resource-group rg-webapp-demo
Stop it (a paid plan still bills)az webapp stop --name mywebapp-12345 --resource-group rg-webapp-demo
Watch its live logaz webapp log tail --name mywebapp-12345 --resource-group rg-webapp-demo
App Service plan
List your plansaz appservice plan list --output table
Show one plan and its tieraz appservice plan show --name plan-webapp-demo --resource-group rg-webapp-demo
Move to Basic (starts billing)az appservice plan update --name plan-webapp-demo --resource-group rg-webapp-demo --sku B1
Clean up
Delete everything in the groupaz group delete --name rg-webapp-demo --yes --no-wait

Comparison Tables

Subscription vs Resource Group

These two are mixed up more than any other pair. Here is what is true and what is not:

Common beliefWhat is trueWhy
“A subscription is just a folder”A subscription is the billing and access boundaryCosts are charged to a subscription
“The resource group pays”A resource group only organizesIt is a project folder and is free
“A resource can be in two subscriptions”Each resource belongs to one subscription and one groupBilling and permissions need one clear owner
“Resource groups are optional”Every web app must be in a resource groupThe form will not let you skip it

Code vs Container vs Static Web Apps

OptionWhat you deliverBest for
Web App, Publish: CodeYour built app filesNormal .NET, Java, Node.js, Python and PHP apps (this guide)
Web App, Publish: ContainerA Docker imageApps that need software the built-in runtimes lack
Azure Static Web AppsHTML, CSS and JavaScript, plus optional small APIsFront-end only sites. A separate service with its own form, not a Web App option

Windows vs Linux

ChoiceUse it whenWatch out for
LinuxMost new apps, and any Python or PHP app.NET Framework 4.8 sites do not run here
WindowsOlder ASP.NET sites on .NET Framework 4.8No built-in Python or PHP
EitherModern .NET, Node.js and JavaPick by what the rest of the app needs
ContainerThe runtime you need is not built inYou keep the image updated yourself

Troubleshooting Table: Common Problems When You Create an Azure Web App

ProblemCauseFix
The name is not availableSomeone already uses that addressAdd a suffix, or leave unique default hostname switched on
The address is long and randomUnique default hostname adds a hash and the regionNormal. Add a custom domain on a paid tier for a clean address
The runtime you want is missingIt does not exist on the selected operating system, or the version is out of supportSwitch between Windows and Linux, or pick a supported version
You cannot create anythingNo active subscription, or your account lacks permission on itCheck the subscription, or ask for the Contributor role
The cost lands on the wrong accountThe wrong subscription was selectedCheck choice 01 first; in the CLI run az account show
You cannot find the app laterResources spread over many groupsUse one resource group per project with a clear name
The ASP.NET option switches you to Windows.NET Framework 4.8 runs only on WindowsUse modern .NET (ASP.NET Core) to keep Linux
The portal looks different from a guideTheme and menu are personal settings, and the portal changesUse the search bar at the top and type “App Services”
“Operation cannot be completed without additional quota”Your subscription has no quota for that tier in that regionTry another region, or request more quota on the Quotas page
“The selected region is currently not accepting new customers”Azure limits who can create resources in some busy regionsChoose a different region
The bill is higher than expectedA paid plan was left running, or the app was only stoppedDelete the plan or the whole resource group
The app is in the wrong regionRegion cannot be changed after creationCreate a new app in the right region and move the code
The first visit is slowFree tier apps sleep when idleNormal on Free F1. Always On needs Basic or higher

Final Mental Model

If you remember one picture, make it this one. Read it from the top: each line sits inside the one above it.

Azure account

  • Subscription: who pays, and who may change things
    • Resource group: the project folder
      • App Service plan: the machine you rent (region, operating system, tier). This is what you pay for.
      • Web app: your site, running on that plan
        • Name: the default address, unique across Azure
        • Publish: Code or Container
        • Runtime: .NET, Node.js, Java, Python or PHP
        • Your code: sent with az webapp deploy

Key takeaways

  • Subscription pays, resource group organizes, App Service plan runs, web app is your site.
  • The name becomes the address; the portal now adds a random part and the region by default.
  • Choose Code, .NET 10 (LTS), Linux unless you need Windows, and a region near your users.
  • Free F1 costs nothing. Paid plans bill every hour, stopped or not.
  • In the CLI, always write --sku and the operating system.
  • Delete the resource group when you finish practising.

Azure Web App FAQ

Is an Azure Web App free?

It can be. The Free F1 plan has no charge and allows 60 CPU minutes per day, 1 GB of memory and 1 GB of storage. It has no custom domain and the app sleeps when idle.

What is the difference between a Web App and an App Service plan?

The plan is the rented computer and sets the price. The web app is the site that runs on it. Several web apps can share one plan.

Should I choose Windows or Linux?

Linux for most new apps, and it is the only choice for the built-in Python and PHP runtimes. Choose Windows for older ASP.NET sites that need .NET Framework 4.8.

Can I change the region or name later?

No. Both are fixed when the app is created. To change either one, create a new web app and move your code and settings to it.

Does stopping the web app stop the charges?

No. You pay for the App Service plan for as long as it exists. Delete the plan, or the resource group, to stop the cost.

Official references: App Service overview, App Service plans, the ASP.NET Core quickstart, unique default hostnames and the .NET support policy.

Related Guides on infotechtu.com

Share this guide

Save

Get new guides by email

One short email when a new guide is out. Unsubscribe at any time.

Leave a Comment

Your email address will not be published. Required fields are marked *


Scroll to Top