Skip to content

Commit 5b0c099

Browse files
brhamilton529KarlErickson
authored andcommitted
initial edits
1 parent c163f42 commit 5b0c099

File tree

1 file changed

+35
-18
lines changed

1 file changed

+35
-18
lines changed
Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
1-
# Maps custom domains to Azure Spring Apps
1+
---
2+
title: Map a custom domain to Azure Spring Apps
3+
description: Learn how to map a web domain to apps in Azure Spring Apps.
4+
author: karlerickson
5+
ms.author: haojianzhong
6+
ms.service: spring-apps
7+
ms.topic: quickstart
8+
ms.date: 03/14/2023
9+
ms.custom: devx-track-java
10+
---
11+
12+
# Map a custom domain to Azure Spring Apps
213

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

5-
Domain Name Service (DNS) is a technique for storing network node names throughout a network. This articles maps a domain to your spring app, such as [www.contoso.com](https://www.contoso.com/), using a CNAME record. It secures the custom domain with a certificate and shows how to enforce Transport Layer Security (TLS), also known as Secure Sockets Layer (SSL).
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 is made known to the Domain Name Service (DNS) that stores node names throughout the network.
617

7-
# Prerequisites
8-
* An application deployed to Azure Spring Apps (see Quickstart: Launch an existing application in Azure Spring Apps using the Azure portal, or use an existing app).
9-
* A domain name with access to the DNS registry for domain provider such as GoDaddy.
10-
* A certificate resource created under Azure Container App Environment (see [Add certificate in Container App](https://learn.microsoft.com/en-us/azure/container-apps/custom-domains-certificates))
18+
The mapping secures the custom domain with a certificate and enforces Transport Layer Security (TLS), also known as Secure Sockets Layer (SSL).
1119

12-
13-
# Add custom domain
20+
## Prerequisites
21+
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).
25+
26+
## Map a custom domain
27+
28+
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.
1429

1530
## Create the CNAME record
1631

17-
* Go to your DNS provider and add a CNAME record to map your domain to the fqdn of your spring app.
18-
* Add an TXT record with then name asuid.{subdomain}, and the value of the TXT record is the custom domain verification id of your container app managed environment. You can find this value using:
32+
* Contact your DNS provider to request a CNAME record to map your domain to the Full Qualified Domain Name (FQDN) of your spring app.
33+
* Add a TXT record with the name `asuid.{subdomain}`, with the value being the verification ID of your Azure Container Apps Environment. You can find this value using the following command.
1934

2035
```azurecli
2136
az containerapp env show \
@@ -24,16 +39,16 @@ az containerapp env show \
2439
--query 'properties.customDomainConfiguration.customDomainVerificationId'
2540
```
2641

27-
After you add the CNAME and TXT record, the DNS records page will resemble the following example:
42+
After you add the CNAME and TXT record, the DNS records page will resemble the following table.
2843

29-
| Name | Type | Value |
30-
| ----------- | ----------- | ----------- |
31-
| {subdomain} | CNAME | testapp.agreeablewater-4c8480b3.eastus.azurecontainerapps.io |
32-
| asuid.{subdomain} | A | 6K861CL04CATKUCFF604024064D57PB52F5DF7B67BC3033BA9808BDA8998U270 |
44+
| Name | Type | Value |
45+
|-------------------|-------|------------------------------------------------------------------|
46+
| {subdomain} | CNAME | testapp.agreeablewater-4c8480b3.eastus.azurecontainerapps.io |
47+
| asuid.{subdomain} | A | 6K861CL04CATKUCFF604024064D57PB52F5DF7B67BC3033BA9808BDA8998U270 |
3348

34-
## Create the custom domain
49+
## Bind the custom domain
3550

36-
You can bind custom domain for your Azure Spring App using the following Azure CLI command:
51+
Bind the custom domain to your app using the following Azure CLI command.
3752

3853
```azurecli
3954
az spring app custom-domain bind \
@@ -42,4 +57,6 @@ az spring app custom-domain bind \
4257
--app <app name> \
4358
--domain-name <your custom domain name> \
4459
--certificate <name of your certificate under managed environment>
45-
```
60+
```
61+
62+
## Next steps

0 commit comments

Comments
 (0)