Skip to content

Commit 1e7dbed

Browse files
committed
staged review
1 parent 7dfff7a commit 1e7dbed

File tree

6 files changed

+71
-67
lines changed

6 files changed

+71
-67
lines changed

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

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ The DNS record type you need to add with your domain provider depends on the dom
2828

2929
* [Create an App Service app](./index.yml), or use an app that you created for another tutorial. The web app's [App Service plan](overview-hosting-plans.md) must be a paid tier and not **Free (F1)**. See [Scale up an app](manage-scale-up.md#scale-up-your-pricing-tier) to update the tier.
3030
* Make sure you can edit the DNS records for your custom domain. To edit DNS records, you need access to the DNS registry for your domain provider, such as GoDaddy. For example, to add DNS entries for `contoso.com` and `www.contoso.com`, you must be able to configure the DNS settings for the `contoso.com` root domain. Your custom domains must be in a public DNS zone; private DNS zone is only supported on Internal Load Balancer (ILB) App Service Environment (ASE).
31-
* If you don't have a custom domain yet, you can [purchase an App Service domain](manage-custom-dns-buy-domain.md).
31+
* If you don't have a custom domain yet, you can [purchase an App Service domain](manage-custom-dns-buy-domain.md) instead.
3232

3333
## 1. Configure a custom domain
3434

3535
1. In the [Azure portal](https://portal.azure.com), navigate to your app's management page.
3636
1. In the left menu for your app, select **Custom domains**.
3737
1. Select **Add custom domain**.
3838

39-
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/add-custom-domain.png" alt-text="A screenshot showing how to open the Add custom domain dialog.":::
39+
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/add-custom-domain.png" alt-text="A screenshot showing how to open the Add custom domain dialog." border="true":::
4040

4141
1. For **Domain provider**, select **All other domain services** to configure a third-party domain.
4242

@@ -57,84 +57,90 @@ The DNS record type you need to add with your domain provider depends on the dom
5757

5858
The following screenshot shows the default selections for a `www.contoso.com` domain, which shows a CNAME record and a TXT record to add.
5959

60-
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/configure-custom-domain.png" alt-text="A screenshot showing how to configure a new custom domain, along with a managed certificate.":::
60+
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/configure-custom-domain.png" alt-text="A screenshot showing how to configure a new custom domain, along with a managed certificate." border="true":::
6161

6262
> [!WARNING]
6363
> While it's not absolutely required to add the TXT record, it's highly recommended for security. The TXT record is a *domain verification ID* that helps avoid subdomain takeovers from other App Service apps. For custom domains you previously configured without this verification ID, you should protect them from the same risk by adding the verification ID (the TXT record) to your DNS configuration. For more information on this common high-severity threat, see [Subdomain takeover](../security/fundamentals/subdomain-takeover.md).
6464
65+
<a name="a" aria-hidden="true"></a>
66+
67+
<a name="enable-a" aria-hidden="true"></a>
68+
69+
<a name="wildcard" aria-hidden="true"></a>
70+
71+
<a name="cname" aria-hidden="true"></a>
72+
6573
## 2. Create the DNS records
6674

6775
[!INCLUDE [Access DNS records with domain provider](../../includes/app-service-web-access-dns-records-no-h.md)]
6876

6977
Select the type of record to create and follow the instructions. You can use either a [CNAME record](https://en.wikipedia.org/wiki/CNAME_record) or an [A record](https://en.wikipedia.org/wiki/List_of_DNS_record_types#A) to map a custom DNS name to App Service.
7078

71-
# [A](#tab/a)
79+
# [Root domain (e.g. contoso.com)](#tab/root)
80+
81+
Create two records according to the following table:
82+
83+
| Record type | Host | Value | Comments |
84+
| - | - | - | - |
85+
| A | `@` | The app's IP address shown in the **Add custom domain** dialog. | The domain mapping itself (`@` typically represents the root domain). |
86+
| TXT | `asuid` | The domain verification ID shown in the **Add custom domain** dialog. | For root domain, App Service accesses `asuid` TXT record to verify your ownership of the custom domain. |
7287

73-
- For a root domain like `contoso.com`, create two records according to the following table:
88+
![Screenshot that shows a DNS records page.](./media/app-service-web-tutorial-custom-domain/a-record.png)
7489

75-
| Record type | Host | Value | Comments |
76-
| - | - | - |
77-
| A | `@` | The app's IP address shown in the **Add custom domain** dialog. | The domain mapping itself (`@` typically represents the root domain). |
78-
| TXT | `asuid` | The domain verification ID shown in the **Add custom domain** dialog. | For root domain, App Service accesses `asuid` TXT record to verify your ownership of the custom domain. |
90+
# [Subdomain (e.g. www.contoso.com)](#tab/subdomain)
7991

80-
![Screenshot that shows a DNS records page.](./media/app-service-web-tutorial-custom-domain/a-record.png)
92+
# [With an A record](#tab/subdomain/a)
8193

82-
- To map a subdomain like `www.contoso.com` with an A record instead of a recommended CNAME record, your A record and TXT record should look like the following table instead:
94+
Create two records according to the following table:
8395

84-
|Record type|Host|Value| Comments |
85-
|--- |--- |--- |--- |
86-
|A|\<subdomain\> (for example, www)|IP address shown in the **Add custom domain** dialog.||
87-
|TXT|asuid.\<subdomain\> (for example, asuid.www)|The domain verification ID shown in the **Add custom domain** dialog.||
96+
|Record type|Host|Value|Comments|
97+
|--- |--- |--- |--- |
98+
|A|\<subdomain\> (for example, www)|IP address shown in the **Add custom domain** dialog.| The domain mapping itself. |
99+
|TXT|asuid.\<subdomain\> (for example, asuid.www)|The domain verification ID shown in the **Add custom domain** dialog.| App Service accesses the `asuid.<subdomain>` TXT record to verify your ownership of the custom domain. |
88100

89-
![Screenshot that shows a DNS records subdomain page.](./media/app-service-web-tutorial-custom-domain/a-record-subdomain.png)
101+
![Screenshot that shows a DNS records subdomain page.](./media/app-service-web-tutorial-custom-domain/a-record-subdomain.png)
90102

91-
# [CNAME](#tab/cname)
103+
# [With a CNAME record](#tab/subdomain/cname)
92104

93-
For a subdomain like `www` in `www.contoso.com`, create two records according to the following table:
105+
Create two records according to the following table:
94106

95107
| Record type | Host | Value | Comments |
96108
| - | - | - |
97109
| CNAME | `<subdomain>` (for example, `www`) | `<app-name>.azurewebsites.net` | The domain mapping itself. |
98-
| TXT | `asuid.<subdomain>` (for example, `asuid.www`) | The verification ID shown in the **Add custom domain** dialog. | App Service accesses the `asuid.<subdomain>` TXT record to verify your ownership of the custom domain. |
110+
| TXT | `asuid.<subdomain>` (for example, `asuid.www`) | The domain verification ID shown in the **Add custom domain** dialog. | App Service accesses the `asuid.<subdomain>` TXT record to verify your ownership of the custom domain. |
99111

100112
![Screenshot that shows the portal navigation to an Azure app.](./media/app-service-web-tutorial-custom-domain/cname-record.png)
101113

114+
---
115+
102116
# [Wildcard (CNAME)](#tab/wildcard)
103117

104118
For a wildcard name like `*` in `*.contoso.com`, create two records according to the following table:
105119

106120
| Record type | Host | Value | Comments |
107-
| - | - | - |
121+
| - | - | - | - |
108122
| CNAME | `*` | `<app-name>.azurewebsites.net` | The domain mapping itself. |
109123
| TXT | `asuid` | The domain verification ID shown in the **Add custom domain** dialog. | App Service accesses the `asuid` TXT record to verify your ownership of the custom domain. |
110124

111125
![Screenshot that shows the navigation to an Azure app.](./media/app-service-web-tutorial-custom-domain/cname-record-wildcard.png)
112126

113-
-----
114-
115-
<a name="a" aria-hidden="true"></a>
116-
117-
<a name="enable-a" aria-hidden="true"></a>
118-
119-
<a name="wildcard" aria-hidden="true"></a>
120-
121-
<a name="cname" aria-hidden="true"></a>
127+
---
122128

123129
## 3. Validate and complete
124130

125131
1. Back in the **Add custom domain** dialog in the Azure portal, select **Validate**.
126132

127-
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/configure-custom-domain-validate.png" alt-text="A screenshot showing how to validate your DNS record settings in the Add a custom domain dialog.":::
133+
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/configure-custom-domain-validate.png" alt-text="A screenshot showing how to validate your DNS record settings in the Add a custom domain dialog." border="true":::
128134

129135
1. If the **Domain validation** section shows green check marks next for both domain records, then you've configured them correctly. Select **Add**. If it shows any red X, fix any errors in the DNS record settings in your domain provider's website.
130136

131-
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/configure-custom-domain-add.png" alt-text="A screenshot showing the Add button activated after validation.":::
137+
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/configure-custom-domain-add.png" alt-text="A screenshot showing the Add button activated after validation." border="true":::
132138

133139
1. You should see the custom domain added to the list. You may also see a red X with **No binding**.
134140

135141
If you selected **App Service Managed Certificate** earlier, wait a few minutes for App Service to create the managed certificate for your custom domain. When the process is complete, the red X becomes a green check mark with **Secured**. If you selected **Add certificate later**, this red X will remain until you [add a private certificate for the domain](configure-ssl-certificate.md) and [configure the binding](configure-ssl-bindings.md).
136142

137-
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/add-custom-domain-complete.png" alt-text="A screenshot showing the custom domains page with the new secured custom domain.":::
143+
:::image type="content" source="./media/app-service-web-tutorial-custom-domain/add-custom-domain-complete.png" alt-text="A screenshot showing the custom domains page with the new secured custom domain." border="true":::
138144

139145
> [!NOTE]
140146
> Unless you configure a certificate binding for your custom domain, Any HTTPS request from a browser to the domain will receive an error or warning, depending on the browser.

0 commit comments

Comments
 (0)