Skip to content

Commit ed57eff

Browse files
committed
add verification ID
1 parent b573397 commit ed57eff

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

articles/app-service/app-service-web-tutorial-custom-domain.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords: app service, azure app service, domain mapping, domain name, existing
66
ms.assetid: dc446e0e-0958-48ea-8d99-441d2b947a7c
77
ms.devlang: nodejs
88
ms.topic: tutorial
9-
ms.date: 06/06/2019
9+
ms.date: 04/27/2020
1010
ms.custom: mvc, seodec18
1111
---
1212

@@ -89,6 +89,12 @@ When you see the following notification, the scale operation is complete.
8989

9090
<a name="cname" aria-hidden="true"></a>
9191

92+
## Get domain verification ID
93+
94+
To add a custom domain to your app, you need to verify your ownership of the domain by adding a verification ID as a TXT record with your domain provider. In the left navigation of your app page, click **Resource explorer** under **Development Tools**, then click **Go**.
95+
96+
In the JSON view of your app's properties, search for `customDomainVerificationId`, and copy its value inside the double quotes. You need this verification ID for the next step.
97+
9298
## Map your domain
9399

94100
You can use either a **CNAME record** or an **A record** to map a custom DNS name to App Service. Follow the respective steps:
@@ -110,11 +116,14 @@ In the tutorial example, you add a CNAME record for the `www` subdomain (for exa
110116

111117
#### Create the CNAME record
112118

113-
Add a CNAME record to map a subdomain to the app's default domain name (`<app_name>.azurewebsites.net`, where `<app_name>` is the name of your app).
119+
Map a subdomain to the app's default domain name (`<app_name>.azurewebsites.net`, where `<app_name>` is the name of your app). To create a CNAME mapping for the `www` subdomain, create two records:
114120

115-
For the `www.contoso.com` domain example, add a CNAME record that maps the name `www` to `<app_name>.azurewebsites.net`.
121+
| Record type | Host | Value | Comments |
122+
| - | - | - |
123+
| CNAME | `www` | `<app_name>.azurewebsites.net` | The domain mapping itself. |
124+
| TXT | `asuid.www` | [The verification ID you got earlier](#get-domain-verification-id) | App Service accesses the `asuid.<subdomain>` TXT record to verify your ownership of the custom domain. |
116125

117-
After you add the CNAME, the DNS records page looks like the following example:
126+
After you add the CNAME and TXT records, the DNS records page looks like the following example:
118127

119128
![Portal navigation to Azure app](./media/app-service-web-tutorial-custom-domain/cname-record.png)
120129

@@ -179,25 +188,20 @@ In the **Custom domains** page, copy the app's IP address.
179188

180189
#### Create the A record
181190

182-
To map an A record to an app, App Service requires **two** DNS records:
191+
To map an A record to an app, usually to the root domain, create two records:
183192

184-
- An **A** record to map to the app's IP address.
185-
- A **TXT** record to map to the app's default domain name `<app_name>.azurewebsites.net`. App Service uses this record only at configuration time, to verify that you own the custom domain. After your custom domain is validated and configured in App Service, you can delete this TXT record.
186-
187-
For the `contoso.com` domain example, create the A and TXT records according to the following table (`@` typically represents the root domain).
188-
189-
| Record type | Host | Value |
193+
| Record type | Host | Value | Comments |
190194
| - | - | - |
191-
| A | `@` | IP address from [Copy the app's IP address](#info) |
192-
| TXT | `@` | `<app_name>.azurewebsites.net` |
195+
| A | `@` | IP address from [Copy the app's IP address](#info) | The domain mapping itself (`@` typically represents the root domain). |
196+
| TXT | `asuid` | [The verification ID you got earlier](#get-domain-verification-id) | App Service accesses the `asuid.<subdomain>` TXT record to verify your ownership of the custom domain. For the root domain, use `asuid`. |
193197

194198
> [!NOTE]
195199
> To add a subdomain (like `www.contoso.com`) using an A record instead of a recommended [CNAME record](#map-a-cname-record), your A record and TXT record should look like the following table instead:
196200
>
197201
> | Record type | Host | Value |
198202
> | - | - | - |
199203
> | A | `www` | IP address from [Copy the app's IP address](#info) |
200-
> | TXT | `www` | `<app_name>.azurewebsites.net` |
204+
> | TXT | `asuid.www` | `<app_name>.azurewebsites.net` |
201205
>
202206
203207
When the records are added, the DNS records page looks like the following example:
@@ -253,6 +257,11 @@ Add a CNAME record to map a wildcard name to the app's default domain name (`<ap
253257

254258
For the `*.contoso.com` domain example, the CNAME record will map the name `*` to `<app_name>.azurewebsites.net`.
255259

260+
| Record type | Host | Value | Comments |
261+
| - | - | - |
262+
| CNAME | `*` | `<app_name>.azurewebsites.net` | The domain mapping itself. |
263+
| TXT | `asuid.<subdomain>` | [The verification ID you got earlier](#get-domain-verification-id) | App Service accesses the `asuid.<subdomain>` TXT record to verify your ownership of the custom domain. |
264+
256265
When the CNAME is added, the DNS records page looks like the following example:
257266

258267
![Portal navigation to Azure app](./media/app-service-web-tutorial-custom-domain/cname-record-wildcard.png)
23.4 KB
Loading
26.7 KB
Loading
81.2 KB
Loading

0 commit comments

Comments
 (0)