1 out of 3 rated this helpful - Rate this topic

Register a Custom Subdomain Name for Accessing Blobs in Windows Azure

Updated: October 26, 2011

Use the following procedures to associate your own subdomain with a Windows Azure storage account. In the Windows Azure Management Portal, this is done by adding a custom domain to the storage account. (Note that a custom domain must reference a subdomain.) Custom domains let you show your organization’s domain name in URIs that access your public blob containers.

The following table compares the URI formats that are used to reference metadata, blobs, and the root container for the Blob service with and without using a custom domain.

 

Resource Type URI Formats

Storage account

Default format: http://<mystorageaccount>.blob.core.windows.net

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

Blob

Default format: http://<mystorageaccount>.blob.core.windows.net/<mycontainer>/<myblob>

Custom domain format: http://<custom.sub.domain>/<mycontainer>/<myblob>

Root container

Default format:

http://<mystorageaccount>.blob.core.windows.net/<myblob>, or

http://<mystorageaccount>.blob.core.windows.net/$root/<myblob>

Custom domain format:

http://<custom.sub.domain>/<myblob>, or

http://<custom.sub.domain>/$root/<myblob>

To provide access to containers and blobs through a custom subdomain for a Windows Azure storage account, the following requirements must be met:

  • This technique can only map a subdomain to your storage account. For example, contoso.com can only map to a storage account using a URI such as blobs.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 storage account, but you cannot map the root domain, contoso.com, to a storage account.

  • You can only associate one dedicated subdomain with a storage account. The CNAME record that you create will route all traffic addressed to the subdomain to the Windows Azure Blob storage account that you specify.

    noteNote
    You can register a different subdomain of your domain with a different Windows Azure storage account.

  • Blob containers that will be accessed by using a custom subdomain must allow public access.

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

  1. Before you begin, register the domain with a domain registrar, and configure your blob containers for anonymous public access

  2. To configure a custom domain for a Windows Azure storage account

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

  4. To validate the subdomain in Windows Azure

  5. To create a CNAME record that associates the subdomain with the storage account

  6. To verify that the subdomain references the Blob service

  1. Register the domain with the domain registrar of your choice.

  2. Ensure that the Blob containers you want to access by using the subdomain are configured for container-level or blob-only public access. For more information, see Restricting Access to Containers.

  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 Storage Accounts.

  4. In the items list, click the storage account that you want to associate with a custom subdomain.

  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 that you will use to reference blob containers for the storage account (for example, blobs.contoso.com), and then click OK.

    The Validate Custom Domain dialog box (shown below) opens. The dialog box displays the information that you need to create a CNAME record on the domain registrar's website.

    Validate Custom Domain dialog box
  7. Use the Copy button at the right end of each field to copy the alias and destination host name that you will use in the CNAME record, and 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 website of your domain registrar in the next procedure.

    The items list shows the new custom subdomain under the storage account. 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 website, add a CNAME record to the domain, using 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 look similar to 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 Storage Accounts.

  3. In the items list, under the storage account, 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 need 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 website, add a second CNAME record to the domain. This CNAME record associates the validated custom subdomain name with the Windows Azure storage account.

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

    • Alias name: forms.contoso.com

    • Points to host name: <mystorageaccount>.blob.core.windows.net

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

After propagation of the CNAME record completes, you should be able to use the subdomain in URIs to reference public containers and blobs in the storage account.

  • In a web browser, use a URI in the following format to access a blob in a public container:

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

    For example, you might type the following URI to access a Web form via a forms.contoso.com custom subdomain that maps to a blob in your myforms container:

    http://forms.contoso.com/myforms/applicationform.htm

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.
facebook page visit twitter rss feed newsletter