Step by step guide to add a custom domain to Azure Container Apps with managed SSL certificate
Every Azure Container App comes with an auto-generated address that looks like your-app.random-id.region.azurecontainerapps.io. It works, but it is not something you want in an OAuth redirect list, a client demo or an email signature. In this guide we map a friendly subdomain, nw360.whyazure.in, to a Container App and secure it with a free, auto-renewing managed SSL certificate, with no certificate to buy, no PFX file to export and no renewal reminders to set.
A note on the screenshots: values that are unique to my environment, such as IP addresses, verification IDs and the app’s generated domain, have been replaced with labels like <YOUR-APP-IP>. Yours will show real values. Click any screenshot to enlarge it, and click again to close it.
What you need before you start
- A running Container App with HTTP ingress enabled. In the portal, open Networking → Ingress, set the ingress type to HTTP and make sure the app is reachable from the public internet. Azure’s certificate authority has to be able to reach it to issue the certificate.
- A domain you control, and access to its DNS settings. You will add two records there. Any DNS provider works, although the screens differ slightly from one to the next.
- Permission to edit the Container App in the Azure portal.
How the pieces fit together
Azure does not simply trust that you own whyazure.in. It hands you two DNS records, you create them at your DNS provider, and Azure checks that they exist before it issues a certificate.
nw360.whyazure.in at the app’s generated domain.asuid.nw360 that holds your Custom Domain Verification ID.Here is what the two records look like for this walkthrough. The panel in the portal shows the generic host names www or {subdomain} and asuid.www or asuid.{subdomain}. Substitute your own subdomain, which in my case is nw360.
| Type | Name / host | Value | Purpose |
|---|---|---|---|
| CNAME | nw360 |
<your-app>.<unique-id>.<region>.azurecontainerapps.io |
Routes the subdomain to your Container App |
| TXT | asuid.nw360 |
Your Custom Domain Verification ID | Proves domain ownership |
Step-by-step walkthrough
Open your Container App in the Azure portal
Search for Container Apps in the portal’s search bar and open the app you want to publish on your own domain. Here we are working with networth360.
Go to Networking → Custom domains
In the left menu, expand Networking and select Custom domains. The blade shows the app’s IP address and its Custom Domain Verification ID, and the list of custom domains is empty (0 items). The IP address is only needed if you map a root domain with an A record. The verification ID goes into the TXT record. Select Add custom domain.
Choose a managed certificate and enter your domain
In the Add custom domain and certificate panel, set:
- TLS/SSL certificate: Managed certificate. The other options are Bring your own certificate and Add certificate later.
- Domain: your full custom domain, here
nw360.whyazure.in. - Hostname record type: CNAME for a subdomain. For a root (apex) domain such as
example.com, choose the A record option instead.
The Domain validation section then lists the two DNS records Azure expects: a CNAME and a TXT. Keep this panel open, because we will come back to it. Validate will not pass until the records exist.
Create the CNAME record at your DNS provider
Open the DNS management page for whyazure.in and add a new record with these values:
- Type: CNAME
- Name:
nw360 - Value: the generated domain copied from the Azure panel
- TTL: the default is fine, and a shorter TTL simply helps changes show up sooner
Save it, and the record appears in the DNS table:
nw360, not nw360.whyazure.in, or you may end up with a record for nw360.whyazure.in.whyazure.in.Create the TXT verification record
Add a second record:
- Type: TXT
- Name:
asuid.nw360 - Value: the Custom Domain Verification ID from Azure
Validate, then add the domain
Return to the Azure panel and select Validate. When both records are found, each row gets a green tick and the panel says Validation passed. Select Add to finish up. Select Add.
Azure now works in the background. Two notifications appear in the portal: one while the hostname is added, and one while the managed certificate is created and the SSL binding is configured.
Wait for the certificate to be issued
Back on the Custom domains blade, a banner warns that it might take up to 10 minutes for Managed Certificate to be issued. In the meantime the domain is listed with a red No binding status. That is expected while Azure finishes the certificate and binding task from the previous step, so give it a few minutes and use Refresh.
Confirm the domain is Secured
Once the certificate is ready, the status turns to a green Secured and the binding type shows SNI SSL. That is your managed certificate, bound to the custom domain.
Browse to your app over HTTPS
Open https://nw360.whyazure.in in a browser. The app now loads on your own domain, served over HTTPS with the certificate Azure created for you.
Troubleshooting
Validation will not pass
- Check that the names are exactly
nw360andasuid.nw360(your own subdomain, without the root domain), and that the values were pasted without extra spaces or quotes. - Give DNS a few minutes, then confirm what the world can see from your own machine:
# CNAME should return the app's generated domain
nslookup -type=CNAME nw360.whyazure.in
# TXT should return your verification ID
nslookup -type=TXT asuid.nw360.whyazure.in
The certificate is not issued, or renewal fails
Microsoft’s documentation lists the requirements that must stay true for as long as the managed certificate is in use:
- The CNAME must point directly at the app’s generated domain. Mapping through an intermediate CNAME, such as a proxy or a traffic manager in front, blocks issuance and renewal.
- HTTP ingress must be enabled and the app must be publicly reachable.
- The app must be running. If it is stopped, the validation request times out.
- If your root domain has a CAA record, add one that allows the certificate authority:
0 issue digicert.com.
Once the requirement is fixed, you can resubmit the managed certificate configuration to trigger a fresh attempt.
I want to use a root domain, not a subdomain
Choose the A record option as the hostname record type, create an A record at @ pointing to the IP address shown on the Custom domains blade, and add the TXT record with the host name asuid. Everything else in this guide stays the same.
Prefer the command line?
The same result is possible with the Azure CLI. Create the DNS records first, then run:
# 1) Register the hostname on the container app
az containerapp hostname add \
--resource-group <resource-group> \
--name <app-name> \
--hostname nw360.whyazure.in
# 2) Create the managed certificate and bind it
az containerapp hostname bind \
--resource-group <resource-group> \
--name <app-name> \
--hostname nw360.whyazure.in \
--environment <environment-name> \
--validation-method CNAME
For a root domain with an A record, use --validation-method HTTP instead.
Wrap-up
- A custom domain on Azure Container Apps needs two DNS records: a CNAME that routes traffic, and an
asuidTXT record that proves ownership. - Choose Managed certificate and Azure issues, binds and renews the SSL certificate for you at no extra cost.
- Point the CNAME straight at the app’s generated domain, keep ingress public and keep the app running, or issuance and renewal will fail.
- Expect a few minutes of No binding before the status flips to Secured.
Further reading: Custom domain names and free managed certificates in Azure Container Apps on Microsoft Learn.