You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Custom domain names and free managed certificates in Azure Container Apps
15
15
16
-
Azure Container Apps allows you to bind one or more custom domains to a container app. You can automatically configure a free managed certificate for your custom domain when your container app is publicly accessible from the [digicert IP addresses](https://knowledge.digicert.com/alerts/ip-address-domain-validation).
16
+
Azure Container Apps allows you to bind one or more custom domains to a container app. You can automatically configure a free managed certificate for your custom domain when your container app is publicly accessible from the [DigiCert IP addresses](https://knowledge.digicert.com/alerts/ip-address-domain-validation).
17
17
18
-
If you want to set up a custom domain using your own certificate, see [Custom domain names and certificates in Azure Container Apps](custom-domains-certificates.md).
18
+
If you want to set up a custom domain that uses your own certificate, see [Custom domain names and bring your own certificates in Azure Container Apps](custom-domains-certificates.md).
19
19
20
20
> [!NOTE]
21
-
> If you configure a [custom environment DNS suffix](environment-custom-dns-suffix.md), you can't add a custom domain that contains this suffix to your Container App.
21
+
> If you configure a [custom environment DNS suffix](environment-custom-dns-suffix.md), you can't add a custom domain that contains this suffix to your container app.
22
22
23
23
## Free certificate requirements
24
24
25
-
Azure Container Apps provides a free managed certificate for your custom domain. Without any action required from you, this TLS/SSL server certificate is automatically renewed as long as your app continues to meet the requirements for managed certificates.
25
+
Container Apps provides a free managed certificate for your custom domain. This TLS/SSL server certificate is automatically renewed without any action from you as long as your app continues to meet the requirements for managed certificates.
26
26
27
27
The requirements are:
28
28
29
-
- Enable HTTP ingress and ensure your container app is publicly accessible from the [digicert IP addresses](https://knowledge.digicert.com/alerts/ip-address-domain-validation).
29
+
- Enable HTTP ingress and ensure your container app is publicly accessible from the [DigiCert IP addresses](https://knowledge.digicert.com/alerts/ip-address-domain-validation).
30
30
31
-
-Must have an A record for apex domains that points to your Container Apps environment's IP address.
31
+
-Have an A record for apex domains that points to your Container Apps environment's IP address.
32
32
33
33
- Establish a CNAME record for subdomains that maps directly to the container app's generated domain name. Mapping to an intermediate CNAME value blocks certificate issuance and renewal. Examples of CNAME values are traffic managers, Cloudflare, and similar services.
34
34
35
-
- If any [Certification Authority Authorization (CAA) domain record](https://wikipedia.org/wiki/DNS_Certification_Authority_Authorization) exists on the root domain, you must explicitly allow DigiCert as a certificate issuer by creating a CAA domain record with the value `0 issue digicert.com`. Without this setting, the certificate issuance and **renewal** will fail.
35
+
- If any [Certification Authority Authorization (CAA) domain record](https://wikipedia.org/wiki/DNS_Certification_Authority_Authorization) exists on the root domain, you must explicitly allow DigiCert as a certificate issuer by creating a CAA domain record with the value `0 issue digicert.com`. Without this setting, the certificate issuance and renewal fail.
36
36
37
37
> [!NOTE]
38
-
> To ensure the certificate issuance and subsequent renewals proceed successfully, all requirements must be met at all times when the managed certificate is assigned.
38
+
> To ensure that the certificate issuance and subsequent renewals proceed successfully, all requirements must be met at all times when the managed certificate is assigned.
39
39
40
40
## Add a custom domain and managed certificate
41
41
42
42
::: zone pivot="azure-portal"
43
43
44
-
1.Navigate to your container app in the [Azure portal](https://portal.azure.com)
44
+
1.Go to your container app in the [Azure portal](https://portal.azure.com).
45
45
46
-
1. Verify that your app has HTTP ingress enabled by selecting **Ingress** in the *Settings* section. If ingress isn't enabled, enable it with these steps:
46
+
1. Verify that your app has HTTP ingress enabled by selecting **Ingress** in the **Networking** section in the left pane. If ingress isn't enabled, enable it with these steps:
47
47
48
-
1. Set *HTTP Ingress* to **Enabled**.
49
-
1. Select the desired *Ingress traffic* setting.
50
-
1. Enter the *Target port*.
48
+
1. Set **Ingress** to **Enabled**.
49
+
1. Select the **Ingress traffic** setting that you want.
50
+
1. Set the **Ingress type** to **HTTP**.
51
+
1. Enter the **Target port**.
51
52
1. Select **Save**.
52
53
53
-
1. Under the *Settings* section, select **Custom domains**.
54
+
1. Under **Networking** in the left pane, select **Custom domains**.
54
55
55
56
1. Select **Add custom domain**.
56
57
57
-
1. In the *Add custom domain and certificate* window, in *TLS/SSL certificate*, select **Managed certificate**.
58
+
1. In the **Add custom domain and certificate** pane, for the **TLS/SSL certificate**, select **Managed certificate**.
58
59
59
-
1. In *domain*, enter the domain you want to add.
60
+
1. In the **Domain** box, enter the domain that you want to add.
60
61
61
-
1. Select the *Hostname record type* based on the type of your domain.
62
+
1. Select the **Hostname record type**, based on the type of your domain:
62
63
63
64
| Domain type | Record type | Notes |
64
65
|--|--|--|
65
66
| Apex domain | A record | An apex domain is a domain at the root level of your domain. For example, if your DNS zone is `contoso.com`, then `contoso.com` is the apex domain. |
66
-
| Subdomain | CNAME | A subdomain is a domain that is part of another domain. For example, if your DNS zone is `contoso.com`, then `www.contoso.com` is an example of a subdomain that can be configured in the zone. |
67
+
| Subdomain | CNAME | A subdomain is a domain that's part of another domain. For example, if your DNS zone is `contoso.com`, then `www.contoso.com` is an example of a subdomain that can be configured in the zone. |
67
68
68
-
1.Using the DNS provider that is hosting your domain, create DNS records based on the *Hostname record type*you selected using the values shown in the *Domain validation* section. The records point the domain to your container app and verify that you're the owner.
69
+
1.By using the DNS provider that's hosting your domain, create DNS records based on the **Hostname record type** that you selected using the values shown in the **Domain validation** section. The records point the domain to your container app and verify that you're the owner.
69
70
70
-
- If you selected *A record*, create the following DNS records:
71
+
- If you selected **A record**, create the following DNS records:
71
72
72
73
| Record type | Host | Value |
73
74
|--|--|--|
74
75
| A |`@`| The IP address of your Container Apps environment. |
75
76
| TXT |`asuid`| The domain verification code. |
76
77
77
-
- If you selected *CNAME*, create the following DNS records:
78
+
- If you selected **CNAME**, create the following DNS records:
78
79
79
80
| Record type | Host | Value |
80
81
|--|--|--|
81
-
| CNAME | The subdomain (for example, `www`) | The generated domain of your container app. |
82
-
| TXT |`asuid.` followed by the subdomain (for example, `asuid.www`) | The domain verification code. |
82
+
| CNAME | The subdomain (for example, `www`).| The generated domain of your container app. |
83
+
| TXT |`asuid.` followed by the subdomain (for example, `asuid.www`).| The domain verification code. |
83
84
84
85
1. Select **Validate**.
85
86
86
-
1.Once validation succeeds, select **Add**.
87
+
1.After validation succeeds, select **Add**.
87
88
88
89
It might take several minutes to issue the certificate and add the domain to your container app.
89
90
90
91
91
-
1.Once the operation is complete, you see your domain name in the list of custom domains with a status of *Secured*. Navigate to your domain to verify that it's accessible.
92
+
1.After the operation is complete, you see your domain name in the list of custom domains with a status of **Secured**. Go to your domain to verify that it's accessible.
92
93
93
94
::: zone-end
94
95
95
96
::: zone pivot="azure-cli"
96
97
97
-
Container Apps supports apex domains and subdomains. Each domain type requires a different DNS record type and validation method.
98
+
Container Apps supports apex domains and subdomains. Each domain type requires a different DNS record type and validation method:
98
99
99
100
| Domain type | Record type | Validation method | Notes |
100
101
|--|--|--|--|
101
102
| Apex domain | A record | HTTP | An apex domain is a domain at the root level of your domain. For example, if your DNS zone is `contoso.com`, then `contoso.com` is the apex domain. |
102
-
| Subdomain | CNAME | CNAME | A subdomain is a domain that is part of another domain. For example, if your DNS zone is `contoso.com`, then `www.contoso.com` is an example of a subdomain that can be configured in the zone. |
103
+
| Subdomain | CNAME | CNAME | A subdomain is a domain that's part of another domain. For example, if your DNS zone is `contoso.com`, then `www.contoso.com` is an example of a subdomain that can be configured in the zone. |
103
104
104
-
1.Log in to Azure with the Azure CLI.
105
+
1.Sign in to Azure by using the Azure CLI:
105
106
106
107
```azurecli
107
108
az login
108
109
```
109
110
110
-
1. Next, install the Azure Container Apps extension for the CLI.
111
+
1. Install the Container Apps extension for the CLI:
111
112
112
113
```azurecli
113
114
az extension add --name containerapp --upgrade
@@ -127,18 +128,18 @@ Container Apps supports apex domains and subdomains. Each domain type requires a
127
128
```
128
129
129
130
- Replace `<CERTIFICATE_LOCAL_PATH>` with the local path of your certificate file.
130
-
- Replace `<CERTIFICATE_LOWERCASE_NAME>` with a lowercase certificate name that is unique within the environment.
131
+
- Replace `<CERTIFICATE_LOWERCASE_NAME>` with a lowercase certificate name that's unique within the environment.
131
132
- Replace `<TARGET_PORT>` with the port that your container app is listening on.
132
133
133
-
1. Verify that your container app has HTTP ingress enabled.
134
+
1. Verify that your container app has HTTP ingress enabled:
134
135
135
136
```azurecli
136
137
az containerapp ingress show \
137
138
-n $CONTAINER_APP \
138
139
-g $RESOURCE_GROUP
139
140
```
140
141
141
-
If ingress isn't enabled, enable it with these steps:
142
+
If ingress isn't enabled, enable it:
142
143
143
144
```azurecli
144
145
az containerapp ingress enable \
@@ -149,7 +150,7 @@ Container Apps supports apex domains and subdomains. Each domain type requires a
149
150
--transport auto
150
151
```
151
152
152
-
1. If you're configuring an apex domain, get the IP address of your Container Apps environment.
153
+
1. If you're configuring an apex domain, get the IP address of your Container Apps environment:
153
154
154
155
```azurecli
155
156
az containerapp env show \
@@ -159,7 +160,7 @@ Container Apps supports apex domains and subdomains. Each domain type requires a
159
160
--query "properties.staticIp"
160
161
```
161
162
162
-
1. If you're configuring a subdomain, get the automatically generated domain of your container app.
163
+
1. If you're configuring a subdomain, get the automatically generated domain of your container app:
163
164
164
165
```azurecli
165
166
az containerapp show \
@@ -169,7 +170,7 @@ Container Apps supports apex domains and subdomains. Each domain type requires a
169
170
--query "properties.configuration.ingress.fqdn"
170
171
```
171
172
172
-
1. Get the domain verification code.
173
+
1. Get the domain verification code:
173
174
174
175
```azurecli
175
176
az containerapp show \
@@ -179,23 +180,23 @@ Container Apps supports apex domains and subdomains. Each domain type requires a
179
180
--query "properties.customDomainVerificationId"
180
181
```
181
182
182
-
1. Using the DNS provider that is hosting your domain, create DNS records based on the record type you selected using the values shown in the *Domain validation* section. The records point the domain to your container app and verify that you own it.
183
+
1. Using the DNS provider that's hosting your domain, create DNS records based on the record type you selected by using the values shown in the **Domain validation** section. The records point the domain to your container app and verify that you own it.
183
184
184
-
- If you selected *A record*, create the following DNS records:
185
+
- If you selected **A record**, create the following DNS records:
185
186
186
187
| Record type | Host | Value |
187
188
|--|--|--|
188
189
| A | `@` | The IP address of your Container Apps environment. |
189
190
| TXT | `asuid` | The domain verification code. |
190
191
191
-
- If you selected *CNAME*, create the following DNS records:
192
+
- If you selected **CNAME**, create the following DNS records:
192
193
193
194
| Record type | Host | Value |
194
195
|--|--|--|
195
-
| CNAME | The subdomain (for example, `www`) | The generated domain of your container app. |
196
-
| TXT | `asuid.` followed by the subdomain (for example, `asuid.www`) | The domain verification code. |
196
+
| CNAME | The subdomain (for example, `www`). | The generated domain of your container app. |
197
+
| TXT | `asuid.` followed by the subdomain (for example, `asuid.www`). | The domain verification code. |
197
198
198
-
1. Add the domain to your container app.
199
+
1. Add the domain to your container app:
199
200
200
201
```azurecli
201
202
az containerapp hostname add \
@@ -204,7 +205,7 @@ Container Apps supports apex domains and subdomains. Each domain type requires a
204
205
-n $CONTAINER_APP
205
206
```
206
207
207
-
1. Configure the managed certificate and bind the domain to your container app.
208
+
1. Configure the managed certificate and bind the domain to your container app:
208
209
209
210
```azurecli
210
211
az containerapp hostname bind \
@@ -215,17 +216,17 @@ Container Apps supports apex domains and subdomains. Each domain type requires a
215
216
--validation-method <VALIDATION_METHOD>
216
217
```
217
218
218
-
- If you're configuring an *A record*, replace `<VALIDATION_METHOD>` with `HTTP`.
219
+
- If you're configuring an **A record**, replace `<VALIDATION_METHOD>` with `HTTP`.
219
220
220
-
- If you're configuring a *CNAME*, replace `<VALIDATION_METHOD>` with `CNAME`.
221
+
- If you're configuring a **CNAME**, replace `<VALIDATION_METHOD>` with `CNAME`.
221
222
222
223
It might take several minutes to issue the certificate and add the domain to your container app.
223
224
224
-
1. Once the operation is complete, navigate to your domain to verify that it's accessible.
225
+
1. After the operation is complete, go to your domain to verify that it's accessible.
225
226
226
227
::: zone-end
227
228
228
-
## Next steps
229
+
## Next step
229
230
230
231
> [!div class="nextstepaction"]
231
232
> [Authentication in Azure Container Apps](authentication.md)
0 commit comments