AZ-204 Develop Azure compute solutions Practice Question
You need to deploy a web application to Azure App Service. The application requires a custom domain name and SSL/TLS certificate. You want to automate the deployment using Azure CLI. Which command should you use to upload the SSL certificate to the App Service?
⚠ Common exam trap
Test-takers frequently confuse the deprecated `az appservice` command group with the current `az webapp` group, or they misremember the exact command syntax (e.g., thinking `az webapp certificate upload` exists) because Azure CLI commands have evolved significantly across versions.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
az webapp config ssl upload
The `az webapp config ssl upload` command is the Azure CLI command used to upload an SSL/TLS certificate (in .pfx format) to an existing Azure App Service web app. This command binds the certificate to the app, enabling HTTPS for custom domains.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
az appservice web config ssl upload
Why it's wrong here
The command az appservice web config ssl upload is fundamentally incorrect because `appservice web` is not a valid top-level command group or subcommand combination within the Azure CLI for managing web applications. Azure CLI commands for web apps typically start with `az webapp`, followed by specific configuration subcommands. This syntax error would result in a "command not found" error, preventing any certificate operation.
- ✗
az appservice certificate import
Why it's wrong here
The `az appservice certificate import` command is designed to integrate an existing certificate from Azure Key Vault into an Azure App Service plan, or to manage App Service Certificates purchased directly through Azure. It does not facilitate the direct upload of a local `.pfx` file from your machine to the App Service. Its primary function is to link and synchronize certificates already secured within Azure's ecosystem, rather than initiating a new upload from an external source.
- ✓
az webapp config ssl upload
Why this is correct
The `az webapp config ssl upload` command is the correct and designated method within the Azure CLI for uploading a local `.pfx` file, which contains both the public certificate and its corresponding private key, directly to an Azure App Service. Upon successful upload, this command also enables the binding of the newly uploaded certificate to a specific custom domain configured for the web app, thereby securing traffic with HTTPS. This is crucial for enabling SSL/TLS for custom domains.
- ✗
az webapp certificate upload
Why it's wrong here
The command `az webapp certificate upload` is syntactically incorrect and will not execute successfully in the Azure CLI. While `az webapp` is the correct base command group for managing web applications, the specific subcommand for uploading SSL certificates requires the `config ssl` prefix. The correct structure is `az webapp config ssl upload`, indicating that SSL certificate operations are part of the web app's configuration settings. Omitting `config ssl` makes the command invalid.
Go deeper
Related to this question
About these practice questions
This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.