3 out of 3 rated this helpful - Rate this topic

How to Map CDN Content to a Custom Domain

Updated: November 29, 2011

Use the following procedures to associate a subdomain with a Windows Azure CDN endpoint.

To provide access to a Content Delivery Network (CDN) endpoint through a custom sub domain, the following requirements must be met:

  • This technique uses a CNAME record to map your domain to the CDN endpoint. It is not possible to map a CNAME record to a root domain. CNAME records must map a specific subdomain such as www.example.com or myblog.example.com. For example, contoso.com can only map to a CDN endpoint using a URI such as documents.contoso.com. If you want to map www.contoso.com to your storage account, you can use the "www" subdomain to map www.contoso.com to your CDN endpoint, but you cannot map the root domain, contoso.com, to a CDN endpoint.

  • You can only associate one dedicated subdomain with a CDN endpoint. The CNAME record that you create will route all traffic addressed to the subdomain to the Windows Azure to the specified endpoint.

    noteNote
    You can register a different subdomain of your domain that has a different Windows Azure CDN endpoint.

Configuring a custom domain for a Windows Azure CDN endpoint involves several tasks, which are described in the following procedures:

  1. Register the domain with a domain registrar.

  2. Create a storage account; see How to Create a Storage Account for a Windows Azure Subscription.

  3. To configure a custom domain for a Windows Azure CDN endpoint

  4. To create a CNAME record for domain validation in Windows Azure

  5. To validate the subdomain in Windows Azure

  6. To create a CNAME record that associates the subdomain with the CDN endpoint

  7. To verify that the subdomain references the CDN endpoint

  1. Log into the Windows Azure Management Portal.

  2. In the navigation pane, click Hosted Services, Storage Accounts & CDN.

  3. At the top of the navigation pane, click CDN.

  4. In the items list, click the CDN endpoint that you want to associate with a custom domain.

  5. On the ribbon, in the Custom Domain group, click Add Domain.

    The Add a Custom Domain dialog box opens.

  6. In Custom domain name, enter the subdomain to use to reference the endpoint (for example, documents.contoso.com). Click OK.

  7. The Validate Custom Domain dialog box opens. The dialog box displays the information that you must have in order to create a CNAME record on the domain registrar's Web site.

  8. Use the Copy button at the right end of each field to copy the alias and destination host name. Paste these values into e-mail or a text editor for later use. At the confirmation prompt, click Yes to allow the values to be copied to the Clipboard. You will paste these values into the Web site of your domain registrar in the next procedure.

    The items list shows the new custom subdomain under the CDN endpoint. The custom domain has Pending status until you validate the subdomain in the Management Portal. Your next step is to create a CNAME record that Windows Azure will use to confirm that you control the subdomain.

  1. On your domain registrar's Web site, add a CNAME record to the domain. Use the alias and destination host name that you copied from the Validate Custom Domain dialog box.

    For example, if you are using the subdomain forms.contoso.com, your CNAME record will use values that resemble this:

    • Alias name: 0e6cd138-82b8-4136-adae-91dbaa369576.forms.contoso.com

    • Points to host name: verify.azure.com

    noteNote
    Different domain registrars use different names for the two parameters in the CNAME record.

  2. Allow time for the CNAME record to propagate to all name servers on the Internet. Propagation can take 12 hours or longer.

  1. In the Windows Azure Management Portal, click Hosted Services, Storage Accounts & CDN in the navigation pane.

  2. At the top of the navigation pane, click CDN.

  3. In the items list, under the CDN endpoint, click the custom subdomain that you want to validate.

  4. On the ribbon, in the Custom Domain group, click Validate Domain.

    If the validation is successful, the status of the custom subdomain changes to Allowed.

    noteNote
    If the validation is not successful, the Validate Custom Domain dialog box displays a validation status of Validation Failed, and the items list shows the custom subdomain status as Forbidden. In that case, you might have to wait awhile longer to allow the updated domain record to finish propagating to all name servers on the Internet.

    ImportantImportant
    Windows Azure only validates that a CNAME record for the domain corresponds to the alias that you copied from the Validate Custom Domain dialog box. (In the Properties pane for the custom domain, this alias is displayed under CName redirect.) Windows Azure does not check to make sure that you used a subdomain for the custom domain. If you did not use a subdomain for the custom domain, you will not be able to access your blobs using the custom domain name, even if validation succeeds.

After you validate the subdomain in Windows Azure, you must create a second CNAME record to associate the subdomain with the storage account.

  1. On the domain registrar's Web site, add a second CNAME record to the domain. This CNAME record associates the validated custom subdomain name with the Windows Azure CDN endpoint.

    For example, if your validated subdomain is documents.contoso.com, create a CNAME record with the following entries:

    • Alias name: documents.contoso.com

    • Points to host name: <identifier>.vo.msecnd.net

  2. Allow time for the CNAME record to propagate to all name servers on the Internet.

After propagation of the CNAME record is completed, you can use the subdomain in URIs to reference content from the CDN endpoint.

  • In a Web browser, use a URI in the following format to access the CDN endpoint:

    http://<custom.sub.domain>/

    If you are using a hosted service as an endpoint use the following format:

    http://<custom.sub.domain>/cdn/<application name>

    For example, you might type the following URI to access a document file via a documents.contoso.com custom subdomain that maps your CDN endpoint:

    http://documents.contoso.com/example.pdf

See Also

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.