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
Copy file name to clipboardExpand all lines: articles/container-apps/rule-based-routing-custom-domain.md
+21-14Lines changed: 21 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,17 +43,33 @@ Using the DNS provider that is hosting your domain, create DNS records for your
43
43
> [!NOTE]
44
44
> The IP address of your Container Apps environment and the domain verification code can be found in the [Custom DNS suffix settings](./environment-custom-dns-suffix.md#add-a-custom-dns-suffix-and-certificate) of the Container App Environment.
45
45
>
46
-
> Don't bind the custom domain to the Container App Environment or to a Container App.
46
+
> Don't bind the custom domain to the Container App Environment or to a Container App. A domain can only be bound to one app, route, or environment.
47
47
48
48
## Route configuration
49
49
50
+
Update your Container Apps YAML file to include a `customDomains` section. Include a bindingType and certificateId, based on the following criteria.:
51
+
52
+
| bindingType value | Description |
53
+
|--|--|
54
+
| Disabled | No certificate is provided. The domain will only be available over HTTP. HTTPS will not be available. |
55
+
| Auto | A certificate is optional. If a managed certificate is already created for this domain, it will be added to the route automatically. Otherwise, the domain will initially only be available over HTTP. To create a managed certificate for this domain, create a new managed certificate after the route is created. After the certificate is created, it will automatically be added to the route. |
> If you set bindingType: "Auto" or "Disabled", you don't need a certificateId. Create the route before you add the certificate so that the certificate registration check for ownership succeeds. If you are bringing your own certificate, set the bindingType to "Auto" or "Disabled" when you first create the route, and then set bindingType to "SniEnabled" and set the certificateId after you add the certificate to the environment.
52
-
Once you add the certificate, Container Apps automatically adds it to the route spec and binds it to the domain. The site is only accessible over HTTP (not HTTPS) until setup is complete.
65
+
> To add a certificate to your environment, use one of the following methods:
66
+
> - To add a Container Apps managed certificate, use the [az containerapp env certificate create](/cli/azure/containerapp/env/certificate#az-containerapp-env-certificate-create) CLI command.
67
+
> - To bring your own existing certificate, use the [az containerapp env certificate upload](/cli/azure/containerapp/env/certificate#az-containerapp-env-certificate-upload) CLI command.
53
68
>
54
-
> The certificateId is in the format /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{ContainerAppEnvironmentName}/certificates/{CertificateFriendlyName}
69
+
> Don't bind the certificate to a Container App.
70
+
55
71
56
-
Update your Container Apps YAML file to include a `customDomains` section. The following example demonstrates how to set up this configuration.
72
+
The following example demonstrates how to set up the route configuration.
57
73
58
74
```yml
59
75
customDomains:
@@ -167,15 +183,6 @@ az containerapp env http-route-config delete \
167
183
--http-route-config-name <CONFIGURATION_NAME>
168
184
```
169
185
170
-
## Add a certificate
171
-
172
-
To add a certificate to your environment, use one of the following methods:
173
-
- To add a Container Apps managed certificate, use the [az containerapp env certificate create](/cli/azure/containerapp/env/certificate#az-containerapp-env-certificate-create) CLI command.
174
-
- To bring your own existing certificate, use the [az containerapp env certificate upload](/cli/azure/containerapp/env/certificate#az-containerapp-env-certificate-upload) CLI command.
175
-
176
-
> [!NOTE]
177
-
> Don't bind the certificate to a Container App.
178
-
179
186
## Verify HTTP routing
180
187
181
188
After configuring your custom domain with rule-based routing:
0 commit comments