Create and Configure Azure App Service (AZ-104)
Azure App Service is a fully managed platform (PaaS) for hosting web apps, REST APIs, and back-end services without managing servers. On AZ-104 the central idea is that an app always runs on an App Service plan: the plan is the compute you pay for, and its pricing tier decides how much CPU and memory you get, whether apps share hardware, and which features (autoscale, deployment slots, backups, custom TLS) are available. This lesson shows you how to provision an App Service plan and pick a tier, scale it up (a bigger tier) versus out (more instances, with autoscale rules), and create a web app from code or a container. You will also configure TLS certificates and HTTPS-only, map a custom DNS name with the required verification records, schedule backups, apply networking settings, and use deployment slots to swap a tested staging build into production with zero downtime and an instant rollback.
- Provision an App Service plan and choose the right pricing tier
- Scale an App Service plan up versus out using autoscale rules
- Create an App Service web app from code or a container image
- Configure certificates, TLS, HTTPS-only, and a mapped custom DNS name
- Configure backups and networking settings for an App Service
- Use deployment slots to swap a staging build into production with zero downtime
App Service and the App Service plan
Azure App Service is a fully managed platform as a service (PaaS) for hosting web applications, REST APIs, and mobile back ends. You bring your code or a container image and Azure runs it on managed infrastructure, patching the OS, load balancing, and providing HTTPS endpoints, so you never manage a virtual machine.
Every app runs on an App Service plan, and understanding this relationship is the key to the whole topic. The plan represents the set of compute resources (VMs) that host your apps: its operating system, region, and pricing tier. The plan is what you pay for; apps themselves add no separate compute charge. Multiple apps can share a single plan, in which case they share that plan's CPU, memory, and instances; if one app is busy, the others feel it.
You provision a plan when you create your first app, or ahead of time from Create a resource > App Service Plan, choosing the operating system (Windows or Linux), region, and pricing tier. That tier choice is the single most important decision here, because it determines how much power each instance has, how many instances you can run, whether apps share hardware with other customers, and which features (autoscale, deployment slots, custom TLS, backups, and network isolation) you can use at all.
App Service plan pricing tiers
App Service plans come in a ladder of pricing tiers, and each unlocks more resources and features. On the exam you match a requirement to the lowest tier that supports it.
| Tier | Compute | Key capabilities |
|---|---|---|
| Free (F1) | Shared with other customers | Dev and test only; no custom domains, no SLA |
| Shared (D1) | Shared with other customers | Custom domains; still no autoscale or TLS binding |
| Basic (B1 to B3) | Dedicated VMs | Custom domains and TLS; manual scale out only |
| Standard (S1 to S3) | Dedicated VMs | Autoscale, up to 5 deployment slots, daily backups |
| Premium (Pv3) | Faster dedicated VMs | More instances, up to 20 slots, higher scale |
| Isolated (Iv2) | Single-tenant App Service Environment | Network isolation in your VNet, maximum scale |
Two dividing lines matter most. First, Free and Shared run on shared infrastructure, so your app sits on VMs alongside other customers' apps and cannot autoscale, while Basic and above run on dedicated VMs. Second, several exam-favorite features have a minimum tier: custom TLS bindings need Basic, and autoscale, deployment slots, and scheduled backups all need Standard or higher. Isolated adds an App Service Environment (ASE) for full network isolation inside your own virtual network. When a question asks for the cheapest tier that supports deployment slots, the answer is Standard; for autoscale, also Standard.
Scaling: scale up versus scale out
App Service scales in two independent directions, and telling them apart is one of the most reliably tested points in this domain.
Scale up (vertical scaling) means moving to a higher pricing tier so each instance gets more CPU, memory, and features, for example going from B1 to P1v3. You do it under Scale up (App Service plan), and it also unlocks capabilities like slots or backups that a lower tier lacked.
Scale out (horizontal scaling) means adding more instances that each run a copy of your app, spreading load across them. You do it under Scale out (App Service plan), either by setting a manual instance count or by configuring autoscale rules. Autoscale (Standard tier and above) adjusts the instance count automatically based on a metric, such as CPU percentage, memory, or HTTP queue length, or on a schedule, for example running more instances during business hours.
| Aspect | Scale up | Scale out |
|---|---|---|
| What changes | Pricing tier (bigger instances) | Number of instances |
| Direction | Vertical | Horizontal |
| How | Change the plan's tier | Manual count or autoscale rules |
| Adds features? | Yes (higher tiers unlock more) | No, just more capacity |
On the exam, change to a bigger tier for more power is scale up; add more instances to handle load is scale out; and automatically add instances when CPU is high is an autoscale rule, which requires Standard or above.
Create an App Service web app
With a plan in place, you create the app itself. From Create a resource > Web App, you name the app (its default hostname becomes <name>.azurewebsites.net) and select the App Service plan (new or existing), region, and operating system.
The important choice is the Publish option, which sets how your app is packaged:
- Code means you deploy application code and pick a runtime stack such as .NET, Node.js, Python, Java, or PHP. App Service provides and maintains the runtime.
- Container means you deploy a custom container image (for example from Azure Container Registry), giving you full control over the runtime and dependencies. This runs on a Linux plan.
After creation you deploy your app through any supported method: continuous deployment from GitHub or Azure DevOps, ZIP deploy, a container registry pull, or local Git. You manage settings such as application settings and connection strings in the app's Configuration blade. Because App Service is PaaS, you never touch the underlying VM; you only manage the app and its configuration. The remaining tasks in this lesson (certificates, custom domains, backups, networking, and deployment slots) are all configured on this web app resource once it exists.
Certificates, TLS, and mapping a custom DNS name
By default your app answers on <name>.azurewebsites.net over HTTPS. To use your own domain and certificate, you configure two related things: the custom domain and the TLS/SSL binding.
Mapping a custom DNS name. Under Custom domains > Add custom domain, you point your domain at the app through your DNS provider. You add a CNAME record pointing your subdomain (for example www) to <name>.azurewebsites.net, or an A record to the app's inbound IP for a root or apex domain. To prove you own the domain, you also add a TXT verification record (an asuid value Azure supplies). Custom domains require at least the Shared tier, and a TLS binding requires Basic or higher.
Certificates and TLS. You have several options for the certificate that secures the domain: a free App Service managed certificate, which Azure creates and auto-renews for your custom domain; a certificate you bring yourself by uploading a PFX file; or one imported from Azure Key Vault. You then create a TLS/SSL binding that ties the certificate to the custom domain (typically SNI-based). Finally, turn on the HTTPS Only setting so any HTTP request is redirected to HTTPS, and optionally raise the minimum TLS version. On the exam, a free auto-renewing certificate is the App Service managed certificate, and forcing secure traffic is the HTTPS Only toggle.
Deployment slots: staging, swap, and rollback
Deployment slots are the standout App Service feature, and the exam loves them. A slot is a live app running in the same plan with its own hostname and configuration, for example a staging slot alongside production. Slots are available on Standard (up to 5) and Premium (up to 20) tiers.
The point of a slot is the swap. You deploy a new version to staging, let its instances warm up, and test it on the staging hostname. When you are satisfied, you swap staging with production: Azure exchanges the two slots' running instances so the warmed-up build instantly becomes production with zero downtime. If something is wrong, you swap back to roll back just as quickly.
Some settings should not move during a swap. You mark app settings and connection strings as deployment slot settings ("sticky" settings) so they stay with their slot: for instance, a staging database connection string stays on staging and never follows the app into production. Settings not marked as sticky swap along with the app.
Admin scenario. You must release a new version of a busy production web app with no outage. You deploy the build to the staging slot, verify it on the staging URL, and then perform a swap with production, so users move to the new, already-warm instances seamlessly. A defect appears in production, so you immediately swap back, restoring the previous version. That test-in-staging-then-swap pattern is the exam's canonical zero-downtime deployment.
Backups and networking settings
Two more admin tasks round out App Service configuration: backups and networking.
Backup. App Service can take scheduled or on-demand backups of your app to an Azure Storage account, including the app's configuration, file content, and a connected database, and restore them to the same or a new app. Backup is available on Standard tier and above; you configure it under the app's Backups blade, choosing the storage account, a schedule, and a retention period. Free, Shared, and Basic plans do not offer built-in backups, so a scenario that requires scheduled backups implies at least Standard.
Networking. App Service networking splits by direction. For outbound traffic, meaning your app calling into private resources such as a database or storage account in a virtual network, you enable VNet integration, which lets the app reach resources inside a VNet. For inbound traffic you control who can reach the app: access restrictions are IP-based allow and deny rules, and a private endpoint gives the app a private IP inside your VNet and removes its public exposure entirely. On AZ-104 you configure these at a recognition level (VNet integration for outbound, access restrictions and private endpoints for inbound), while the deeper virtual-network mechanics belong to the networking domain. Together, backups and these network controls make an App Service production-ready.
Tip. Watch for the scale wording: change to a bigger tier for more resources is scale up, while add more instances is scale out, and automatic instance changes based on CPU are autoscale rules that require the Standard tier or higher. Deployment-slot questions describe zero-downtime deployment with swap and rollback, or test in staging then swap to production, both of which point to deployment slots. You may also match a feature (custom TLS, autoscale, slots, backups) to its minimum pricing tier, or identify VNet integration for outbound and access restrictions for inbound networking.
- Azure App Service is a managed PaaS for web apps and APIs; every app runs on an App Service plan, which is the compute you pay for.
- The plan's pricing tier (Free, Shared, Basic, Standard, Premium, Isolated) decides compute, whether apps share hardware, and which features are available.
- Scale up changes the tier for bigger instances; scale out adds more instances, manually or with autoscale rules (Standard tier and above).
- Custom TLS bindings need Basic tier; autoscale, deployment slots, and scheduled backups need Standard or higher.
- Map a custom domain with a CNAME or A record plus a TXT verification record, secure it with a managed or uploaded certificate, and force HTTPS with HTTPS Only.
- Deployment slots (Standard and above) let you test in a staging slot then swap with production for zero-downtime deployment and instant rollback; sticky slot settings stay with their slot.
- Use VNet integration for outbound access and access restrictions or private endpoints for inbound access.
Frequently asked questions
What is an Azure App Service plan?
An App Service plan is the set of compute resources (VMs) that host your App Service apps, defined by its operating system, region, and pricing tier. The plan is what you pay for, and multiple apps can share one plan and its CPU, memory, and instances. The pricing tier you pick determines the resources per instance, the maximum instance count, whether hardware is shared, and which features (autoscale, slots, custom TLS, backups) are available.
What is the difference between scaling up and scaling out in App Service?
Scaling up (vertical) means changing the App Service plan to a higher pricing tier so each instance gets more CPU, memory, and features. Scaling out (horizontal) means adding more instances that each run a copy of your app to handle more load, either with a manual instance count or with autoscale rules based on a metric or schedule. Autoscale requires the Standard tier or higher.
What is a deployment slot in Azure App Service?
A deployment slot is a live app running in the same App Service plan with its own hostname and configuration, such as a staging slot next to production. You deploy and test a new version in staging, then swap it with production so the warmed-up build goes live with zero downtime; if there is a problem you swap back to roll back. Slots require the Standard tier (up to 5) or Premium (up to 20), and settings marked as slot settings stay with their slot.
How do I map a custom domain to an Azure App Service?
In the app's Custom domains blade you add your domain and create the required DNS records at your provider: a CNAME record pointing a subdomain to <name>.azurewebsites.net, or an A record to the app's inbound IP for a root domain, plus a TXT record with the asuid value Azure supplies for domain verification. Custom domains require at least the Shared tier, and adding a TLS binding for the domain requires Basic or higher.
Which App Service tier do I need for autoscale and backups?
Autoscale, deployment slots, and scheduled backups all require the Standard tier or higher. Custom TLS bindings require Basic or higher, and custom domains require at least Shared. Free and Shared tiers run on shared infrastructure and cannot autoscale, while Isolated adds an App Service Environment for network isolation and the highest scale. On the exam, pick the lowest tier that satisfies the required feature.
Sign up free to mark lessons complete, bookmark topics and track your exam readiness.