Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b02b130

Browse files
committedNov 6, 2020
edited existing doc
1 parent 61623a8 commit b02b130

File tree

4 files changed

+57
-100
lines changed

4 files changed

+57
-100
lines changed
 

‎articles/cdn/cdn-map-content-to-custom-domain.md

Lines changed: 57 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
---
2-
title: Tutorial - Add a custom domain to your Azure CDN endpoint | Microsoft Docs
2+
title: 'Tutorial: Add a custom domain to your endpoint'
3+
titleSuffix: Azure Content Delivery Network
34
description: Use this tutorial to add a custom domain to an Azure Content Delivery Network endpoint so that your domain name is visible in your URL.
45
services: cdn
5-
documentationcenter: ''
66
author: asudbring
7-
manager: danielgi
8-
editor: ''
9-
7+
manager: KumudD
108
ms.service: azure-cdn
11-
ms.workload: media
12-
ms.tgt_pltfrm: na
13-
ms.devlang: na
149
ms.topic: tutorial
15-
ms.date: 06/11/2018
10+
ms.date: 11/06/2020
1611
ms.author: allensu
1712
ms.custom: mvc
1813
# As a website owner, I want to add a custom domain to my CDN endpoint so that my users can use my custom domain to access my content.
1914

2015
---
21-
# Tutorial: Add a custom domain to your Azure CDN endpoint
22-
This tutorial shows how to add a custom domain to an Azure Content Delivery Network (CDN) endpoint. When you use a CDN endpoint to deliver content, a custom domain is necessary if you would like your own domain name to be visible in your CDN URL. Having a visible domain name can be convenient for your customers and useful for branding purposes.
16+
# Tutorial: Add a custom domain to your endpoint
17+
18+
This tutorial shows how to add a custom domain to an Azure Content Delivery Network (CDN) endpoint.
19+
20+
The endpoint name in your CDN profile is a subdomain of azureedge.net. By default when delivering content, the CDN profile domain is included within the URL.
2321

24-
After you create a CDN endpoint in your profile, the endpoint name, which is a subdomain of azureedge.net, is included in the URL for delivering CDN content by default (for example, https:\//contoso.azureedge.net/photo.png). For your convenience, Azure CDN provides the option of associating a custom domain with a CDN endpoint. With this option, you deliver your content with a custom domain in your URL instead of an endpoint name (for example, https:\//www.contoso.com/photo.png).
22+
For example, **https://contoso.azureedge.net/photo.png**.
23+
24+
Azure CDN provides the option of associating a custom domain with a CDN endpoint. This option delivers your content with a custom domain in your URL instead of the default domain.
2525

2626
In this tutorial, you learn how to:
2727
> [!div class="checklist"]
@@ -33,76 +33,64 @@ In this tutorial, you learn how to:
3333

3434
## Prerequisites
3535

36-
Before you can complete the steps in this tutorial, you must first create a CDN profile and at least one CDN endpoint. For more information, see [Quickstart: Create an Azure CDN profile and endpoint](cdn-create-new-endpoint.md).
36+
* Before you can complete the steps in this tutorial, create a CDN profile and at least one CDN endpoint.
37+
* For more information, see [Quickstart: Create an Azure CDN profile and endpoint](cdn-create-new-endpoint.md).
3738

38-
If you do not already have a custom domain, you must first purchase one with a domain provider. For example, see [Buy a custom domain name](../app-service/manage-custom-dns-buy-domain.md).
39+
* If you don't have a custom domain, purchase one with a domain provider.
40+
* For more information, see [Buy a custom domain name](../app-service/manage-custom-dns-buy-domain.md).
3941

40-
If you are using Azure to host your [DNS domains](../dns/dns-overview.md), you must delegate the domain provider's domain name system (DNS) to an Azure DNS. For more information, see [Delegate a domain to Azure DNS](../dns/dns-delegate-domain-azure-dns.md). Otherwise, if you are using a domain provider to handle your DNS domain, proceed to [Create a CNAME DNS record](#create-a-cname-dns-record).
42+
* If you're using Azure to host your [DNS domains](../dns/dns-overview.md), delegate your custom domain to Azure DNS.
43+
* For more information, see [Delegate a domain to Azure DNS](../dns/dns-delegate-domain-azure-dns.md).
44+
* If you're using a domain provider to handle your DNS domain, continue to [Create a CNAME DNS record](#create-a-cname-dns-record).
4145

4246

4347
## Create a CNAME DNS record
4448

45-
Before you can use a custom domain with an Azure CDN endpoint, you must first create a canonical name (CNAME) record with your domain provider to point to your CDN endpoint. A CNAME record is a type of DNS record that maps a source domain name to a destination domain name. For Azure CDN, the source domain name is your custom domain name and the destination domain name is your CDN endpoint hostname. After Azure CDN verifies the CNAME record that you create, traffic addressed to the source custom domain (such as www\.contoso.com) is routed to the specified destination CDN endpoint hostname (such as contoso.azureedge.net).
49+
Before you can use a custom domain with an Azure CDN endpoint, you must first create a canonical name (CNAME) record with your domain provider to point to your CDN endpoint.
50+
51+
A CNAME record is a DNS record that maps a source domain name to a destination domain name.
52+
53+
For Azure CDN, the source domain name is your custom domain name and the destination domain name is your CDN endpoint hostname.
4654

47-
A custom domain and its subdomain can be associated with only a single endpoint at a time. However, you can use different subdomains from the same custom domain for different Azure service endpoints by using multiple CNAME records. You can also map a custom domain with different subdomains to the same CDN endpoint.
55+
Azure CDN routes traffic addressed to the source custom domain to the destination CDN endpoint hostname after it verifies the CNAME record.
56+
57+
A custom domain and its subdomain can be associated with a single endpoint at a time. Use multiple CNAME records to use different subdomains from the same custom domain for different Azure service endpoints.
58+
59+
You can map a custom domain with different subdomains to the same CDN endpoint.
4860

4961
> [!NOTE]
50-
> Any alias record type can be used for Custom domains if you're using Azure DNS as your domain provider. This walkthrough uses the CNAME record type. If you're using A or AAAA record types, follow the same steps below and replace CNAME with the record type of your choice. If you're using an alias record to add a root domain as a custom domain and you want to enable TLS, you must use manual validation as described in [this article](./cdn-custom-ssl.md?tabs=option-1-default-enable-https-with-a-cdn-managed-certificate#custom-domain-is-not-mapped-to-your-cdn-endpoint). For more information, see [Point zone apex to Azure CDN endpoints](../dns/dns-alias.md#point-zone-apex-to-azure-cdn-endpoints).
62+
> Any alias record type can be used for custom domains if you're using Azure DNS as your domain provider. This tutorial uses the CNAME record type. If you're using A or AAAA record types, follow the same steps below and replace CNAME with the record type of your choice.
5163
5264
## Map the temporary cdnverify subdomain
5365

54-
When you map an existing domain that is in production, there are special considerations. While you are registering your custom domain in the Azure portal, a brief period of downtime for the domain can occur. To avoid interruption of web traffic, first map your custom domain to your CDN endpoint hostname with the Azure cdnverify subdomain to create a temporary CNAME mapping. With this method, users can access your domain without interruption while the DNS mapping occurs.
66+
When you map an existing domain that is in production, there are special considerations. While you're registering your custom domain in the Azure portal, a brief period of downtime for the domain can occur.
5567

56-
Otherwise, if you are using your custom domain for the first time and no production traffic is running on it, you can directly map your custom domain to your CDN endpoint. Proceed to [Map the permanent custom domain](#map-the-permanent-custom-domain).
68+
To avoid interruption of web traffic, map your custom domain to your CDN endpoint hostname with the Azure **cdnverify** subdomain. This process creates a temporary CNAME mapping.
5769

58-
To create a CNAME record with the cdnverify subdomain:
70+
With this method, users can access your domain without interruption while the DNS mapping occurs.
5971

60-
1. Sign in to the web site of the domain provider for your custom domain.
72+
If production downtime considerations aren't a concern, you can directly map your custom domain to your CDN endpoint. Continue to [Map the permanent custom domain](#map-the-permanent-custom-domain).
73+
74+
To create a CNAME record with the cdnverify subdomain:
6175

62-
2. Find the page for managing DNS records by consulting the provider's documentation or searching for areas of the web site labeled **Domain Name**, **DNS**, or **Name server management**.
76+
1. Sign in to the web site of the DNS provider for your custom domain.
6377

64-
3. Create a CNAME record entry for your custom domain and complete the fields as shown in the following table (field names may vary):
78+
2. Create a CNAME record entry for your custom domain and complete the fields as shown in the following table (field names may vary):
6579

6680
| Source | Type | Destination |
6781
|---------------------------|-------|---------------------------------|
6882
| cdnverify.www.contoso.com | CNAME | cdnverify.contoso.azureedge.net |
6983

70-
- Source: Enter your custom domain name, including the cdnverify subdomain, in the following format: cdnverify.<custom domain name>. For example, cdnverify.www.contoso.com.
84+
- Source: Enter your custom domain name, including the cdnverify subdomain, in the following format: **cdnverify.\<custom-domain-name>**
85+
- For example: **cdnverify.www.contoso.com**
7186

72-
- Type: Enter *CNAME*.
87+
- Type: Enter or select **CNAME**.
7388

74-
- Destination: Enter your CDN endpoint hostname, including the cdnverify subdomain, in the following format: cdnverify._&lt;endpoint name&gt;_.azureedge.net. For example, cdnverify.contoso.azureedge.net.
89+
- Destination: Enter your CDN endpoint hostname, including the cdnverify subdomain, in the following format: **cdnverify.\<endpoint-name>.azureedge.net**.
90+
- For example: **cdnverify.contoso.azureedge.net**
7591

7692
4. Save your changes.
7793

78-
For example, the procedure for the GoDaddy domain registrar is as follows:
79-
80-
1. Sign in and select the custom domain you want to use.
81-
82-
2. In the Domains section, select **Manage All**, then select **DNS** | **Manage Zones**.
83-
84-
3. For **Domain Name**, enter your custom domain, then select **Search**.
85-
86-
4. From the **DNS Management** page, select **Add**, then select **CNAME** in the **Type** list.
87-
88-
5. Complete the following fields of the CNAME entry:
89-
90-
![Screenshot shows C NAME entry with Type, Host, Points to, and T T L values for a temporary cdnverify subdomain.](./media/cdn-map-content-to-custom-domain/cdn-cdnverify-cname-entry.png)
91-
92-
- Type: Leave *CNAME* selected.
93-
94-
- Host: Enter the subdomain of your custom domain to use, including the cdnverify subdomain name. For example, cdnverify.www.
95-
96-
- Points to: Enter the host name of your CDN endpoint, including the cdnverify subdomain name. For example, cdnverify.contoso.azureedge.net.
97-
98-
- TTL: Leave *1 Hour* selected.
99-
100-
6. Select **Save**.
101-
102-
The CNAME entry is added to the DNS records table.
103-
104-
![Screenshot shows that the C NAME entry has been added to the D N S records table for a temporary cdnverify subdomain.](./media/cdn-map-content-to-custom-domain/cdn-cdnverify-dns-table.png)
105-
10694

10795
## Associate the custom domain with your CDN endpoint
10896

@@ -112,19 +100,18 @@ After you've registered your custom domain, you can then add it to your CDN endp
112100

113101
2. On the **CDN profile** page, select the CDN endpoint to associate with the custom domain.
114102

115-
The **Endpoint** page opens.
103+
:::image type="content" source="media/cdn-map-content-to-custom-domain/cdn-endpoint-selection.png" alt-text="CDN endpoint selection" border="true":::
116104

117-
3. Select **Custom domain**.
118-
119-
![CDN custom domain button](./media/cdn-map-content-to-custom-domain/cdn-custom-domain-button.png)
105+
3. Select **+ Custom domain**.
120106

121-
The **Add a custom domain** page opens.
107+
:::image type="content" source="media/cdn-map-content-to-custom-domain/cdn-custom-domain-button.png" alt-text="Add custom domain button" border="true":::
122108

123-
4. For **Endpoint hostname**, the endpoint host name to use as the destination domain of your CNAME record is prefilled and is derived from your CDN endpoint URL: *&lt;endpoint hostname&gt;*.azureedge.net. It cannot be changed.
109+
4. In **Add a custom domain**, **Endpoint hostname**, is pre-filled and is derived from your CDN endpoint URL: **\<endpoint-hostname>**.azureedge.net. It cannot be changed.
124110

125-
5. For **Custom hostname**, enter your custom domain, including the subdomain, to use as the source domain of your CNAME record. For example, www\.contoso.com or cdn.contoso.com. Do not use the cdnverify subdomain name.
111+
5. For **Custom hostname**, enter your custom domain, including the subdomain, to use as the source domain of your CNAME record.
112+
1. For example, **www.contoso.com** or **cdn.contoso.com**. **Don't use the cdnverify subdomain name**.
126113

127-
![CDN custom domain dialog](./media/cdn-map-content-to-custom-domain/cdn-add-custom-domain.png)
114+
:::image type="content" source="media/cdn-map-content-to-custom-domain/cdn-add-custom-domain.png" alt-text="Add custom domain" border="true":::
128115

129116
6. Select **Add**.
130117

@@ -159,60 +146,30 @@ To create a CNAME record for your custom domain:
159146

160147
| Source | Type | Destination |
161148
|-----------------|-------|-----------------------|
162-
| <www.contoso.com> | CNAME | contoso.azureedge.net |
149+
| www.contoso.com | CNAME | contoso.azureedge.net |
163150

164-
- Source: Enter your custom domain name (for example, www\.contoso.com).
151+
- Source: Enter your custom domain name.
152+
- For example: **www.contoso.com**
165153

166-
- Type: Enter *CNAME*.
154+
- Type: Enter or select **CNAME**.
167155

168-
- Destination: Enter your CDN endpoint hostname. It must be in the following format:_&lt;endpoint name&gt;_.azureedge.net. For example, contoso.azureedge.net.
156+
- Destination: Enter your CDN endpoint hostname in the following format: **\<endpoint-name>.azureedge.net**.
157+
- For example: **contoso.azureedge.net**
169158

170159
4. Save your changes.
171160

172161
5. If you're previously created a temporary cdnverify subdomain CNAME record, delete it.
173162

174163
6. If you are using this custom domain in production for the first time, follow the steps for [Associate the custom domain with your CDN endpoint](#associate-the-custom-domain-with-your-cdn-endpoint) and [Verify the custom domain](#verify-the-custom-domain).
175164

176-
For example, the procedure for the GoDaddy domain registrar is as follows:
177-
178-
1. Sign in and select the custom domain you want to use.
179-
180-
2. In the Domains section, select **Manage All**, then select **DNS** | **Manage Zones**.
181-
182-
3. For **Domain Name**, enter your custom domain, then select **Search**.
183-
184-
4. From the **DNS Management** page, select **Add**, then select **CNAME** in the **Type** list.
185-
186-
5. Complete the fields of the CNAME entry:
187-
188-
![Screenshot shows C NAME entry with Type, Host, Points to, and T T L values for a permanent custom domain.](./media/cdn-map-content-to-custom-domain/cdn-cname-entry.png)
189-
190-
- Type: Leave *CNAME* selected.
191-
192-
- Host: Enter the subdomain of your custom domain to use. For example, www or cdn.
193-
194-
- Points to: Enter the host name of your CDN endpoint. For example, contoso.azureedge.net.
195-
196-
- TTL: Leave *1 Hour* selected.
197-
198-
6. Select **Save**.
199-
200-
The CNAME entry is added to the DNS records table.
201-
202-
![Screenshot shows that the C NAME entry has been added to the D N S records table for a permanent custom domain.](./media/cdn-map-content-to-custom-domain/cdn-dns-table.png)
203-
204-
7. If you have a cdnverify CNAME record, select the pencil icon next to it, then select the trash can icon.
205-
206-
8. Select **Delete** to delete the CNAME record.
207-
208165

209166
## Clean up resources
210167

211168
In the preceding steps, you added a custom domain to a CDN endpoint. If you no longer want to associate your endpoint with a custom domain, you can remove the custom domain by performing these steps:
212169

213170
1. In your CDN profile, select the endpoint with the custom domain that you want to remove.
214171

215-
2. From the **Endpoint** page, under Custom domains, right-click the custom domain that you want to remove, then select **Delete** from the context menu.
172+
2. From the **Endpoint** page, under Custom domains, right-click the custom domain that you want to remove, then select **Delete** from the context menu. Select **Yes**.
216173

217174
The custom domain is disassociated from your endpoint.
218175

Loading
Loading
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.