Skip to content

Commit 41dc8ba

Browse files
committed
edits
1 parent 3459323 commit 41dc8ba

File tree

2 files changed

+42
-28
lines changed

2 files changed

+42
-28
lines changed
Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,76 @@
11
---
2-
title: Map a custom domain to Azure Spring Apps
2+
title: Map a custom domain to Azure Spring Apps with the Standard consumption plan
33
description: Learn how to map a web domain to apps in Azure Spring Apps.
44
author: karlerickson
55
ms.author: haojianzhong
66
ms.service: spring-apps
77
ms.topic: quickstart
8-
ms.date: 03/14/2023
8+
ms.date: 03/21/2023
99
ms.custom: devx-track-java
1010
---
1111

12-
# Map a custom domain to Azure Spring Apps
12+
# Map a custom domain to Azure Spring Apps with the Standard consumption plan
1313

1414
**This article applies to:** ✔️ Standard consumption (Preview) ❌ Basic/Standard ❌ Enterprise
1515

16-
This article shows how to map a custom web site domain, such as such as [www.contoso.com](https://www.contoso.com/), to your app in Azure Spring Apps. This mapping is accomplished by using a CNAME record that the Domain Name Service (DNS) uses to store node names throughout the network.
16+
This article shows you how to map a custom web site domain, such as such as `https://www.contoso.com`, to your app in Azure Spring Apps. This mapping is accomplished by using a `CNAME` record that the Domain Name Service (DNS) uses to store node names throughout the network.
1717

1818
The mapping secures the custom domain with a certificate and enforces Transport Layer Security (TLS), also known as the Secure Sockets Layer (SSL).
1919

2020
## Prerequisites
2121

22-
* An application deployed to Azure Spring Apps. For more information see [Quickstart: Build and deploy apps to Azure Spring Apps](/azure/spring-apps/quickstart-deploy-apps).
23-
* A domain name registered in the DNS registry as provided by a web hosting or domain provider.
24-
* A certificate resource created under the Azure Container Apps Environment, see [Add certificate in Container App](/azure/container-apps/custom-domains-certificates).
22+
- An Azure subscription. If you don't have a subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
23+
- [Azure CLI](/cli/azure/install-azure-cli)
24+
- An application deployed to Azure Spring Apps. For more information, see [Quickstart: Build and deploy apps to Azure Spring Apps](/azure/spring-apps/quickstart-deploy-apps).
25+
- A domain name registered in the DNS registry as provided by a web hosting or domain provider.
26+
- A certificate resource created under an Azure Container Apps environment. For more information, see [Add certificate in Container App](../container-apps/custom-domains-certificates.md).
2527

2628
## Map a custom domain
2729

2830
To map the custom domain, you create the CNAME record and then use the Azure CLI to bind the domain to an app in Azure Spring Apps.
2931

30-
### Create the CNAME record
32+
First, use the following steps to create the `CNAME` record:
3133

32-
Use the following steps to create the CNAME record:
34+
1. Contact your DNS provider to request a `CNAME` record to map your domain to the Full Qualified Domain Name (FQDN) of your Spring app.
3335

34-
1. Contact your DNS provider to request a CNAME record to map your domain to the Full Qualified Domain Name (FQDN) of your spring app.
35-
1. Add a TXT record with the name `asuid.{subdomain}` with the value being the verification ID of your Azure Container Apps Environment. You can obtain this value with the following command.
36+
1. Add a `TXT` record with the name `asuid.{subdomain}` with the value being the verification ID of your Azure Container Apps environment. You can obtain this value by using the following command.
3637

3738
```azurecli
38-
az containerapp env show \
39-
--name <managed environment name> \
40-
--resource-group <resource group> \
39+
az containerapp env show \
40+
--resource-group <resource-group-name> \
41+
--name <Azure-Container-Apps-environment-name> \
4142
--query 'properties.customDomainConfiguration.customDomainVerificationId'
42-
```
43+
```
4344

44-
After you add the CNAME and TXT record, the DNS records page will resemble the following table.
45+
After you add the `CNAME` and `TXT` record, the DNS records page will resemble the following table.
4546

46-
| Name | Type | Value |
47-
|-------------------|-------|------------------------------------------------------------------|
48-
| {subdomain} | CNAME | testapp.agreeablewater-4c8480b3.eastus.azurecontainerapps.io |
49-
| asuid.{subdomain} | A | 6K861CL04CATKUCFF604024064D57PB52F5DF7B67BC3033BA9808BDA8998U270 |
47+
| Name | Type | Value |
48+
|---------------------|---------|--------------------------------------------------------------------|
49+
| `{subdomain}` | `CNAME` | `testapp.agreeablewater-4c8480b3.eastus.azurecontainerapps.io` |
50+
| `asuid.{subdomain}` | `A` | `6K861CL04CATKUCFF604024064D57PB52F5DF7B67BC3033BA9808BDA8998U270` |
5051

51-
### Bind the custom domain
52-
53-
Bind the custom domain to your app using the following Azure CLI command.
52+
Next, bind the custom domain to your app by using the following command.
5453

5554
```azurecli
5655
az spring app custom-domain bind \
57-
--resource-group <resource group> \
58-
--service <service name> \
59-
--app <app name> \
60-
--domain-name <your custom domain name> \
61-
--certificate <name of your certificate under managed environment>
56+
--resource-group <resource-group-name> \
57+
--service <Azure-Spring-Apps-service-instance-name> \
58+
--app <app-name> \
59+
--domain-name <your-custom-domain-name> \
60+
--certificate <name-of-your-certificate-under-Azure-Container-Apps-environment>
61+
```
62+
63+
## Clean up resources
64+
65+
Be sure to delete the resources you created in this article when you no longer need them. To delete the resources, just delete the resource group that contains them. You can delete the resource group using the Azure portal. Alternately, to delete the resource group by using Azure CLI, use the following commands:
66+
67+
```azurecli
68+
echo "Enter the Resource Group name:" &&
69+
read resourceGroupName &&
70+
az group delete --name $resourceGroupName &&
71+
echo "Press [ENTER] to continue ..."
6272
```
6373

6474
## Next steps
75+
76+
- [Azure Spring Apps documentation](./index.yml)

articles/spring-apps/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ items:
2525
href: quickstart-provision-app-environment-with-virtual-network.md
2626
- name: Launch your first event-driven app
2727
href: quickstart-deploy-event-driven-app-standard-consumption.md
28+
- name: Map a custom domain to Azure Spring Apps
29+
href: quickstart-custom-domain.md
2830
- name: Run apps on Basic/Standard tier
2931
expanded: true
3032
items:

0 commit comments

Comments
 (0)