title | description | services | documentationcenter | author | manager | editor | ms.assetid | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Configure a domain name for your Blob storage endpoint | Microsoft Docs |
Learn how to map a custom user domain to the Blob storage endpoint for an Azure storage account in the Azure Classic Portal. |
storage |
mmacy |
timlt |
tysonn |
aaafd8c5-eacb-49dc-8c8b-3f7011ad5e92 |
storage |
storage |
na |
na |
article |
12/08/2016 |
marsma |
You can configure a custom domain for accessing blob data in your Azure storage account. The default endpoint for Blob storage is <storage-account-name>.blob.core.windows.net
. If you map a custom domain and subdomain such as www.contoso.com to the blob endpoint for your storage account, then your users can also access blob data in your storage account using that domain.
Important
Azure Storage does not yet support HTTPS with custom domains. We are aware that customers are interested in this feature, and it will be available in a future release.
There are two ways to point your custom domain to the blob endpoint for your storage account. The simplest way is to create a CNAME record mapping your custom domain and subdomain to the blob endpoint. A CNAME record is a DNS feature that maps a source domain to a destination domain. In this case, the source domain is your custom domain and subdomain--note that the subdomain is always required. The destination domain is your Blob service endpoint.
The process of mapping your custom domain to your blob endpoint can, however, result in a brief period of downtime for the domain while you are registering the domain in the Azure Classic Portal. If your custom domain is currently supporting an application with a service-level agreement (SLA) that requires that there be no downtime, then you can use the Azure asverify subdomain to provide an intermediate registration step so that users will be able to access your domain while the DNS mapping takes place.
The following table shows sample URLs for accessing blob data in a storage account named mystorageaccount. The custom domain registered for the storage account is www.contoso.com:
Resource Type | URL Formats |
---|---|
Storage account | Default URL: http://mystorageaccount.blob.core.windows.net Custom domain URL: http://www.contoso.com |
Blob | Default URL: http://mystorageaccount.blob.core.windows.net/mycontainer/myblob Custom domain URL: http://www.contoso.com/mycontainer/myblob |
Root container | Default URL: http://mystorageaccount.blob.core.windows.net/myblob or http://mystorageaccount.blob.core.windows.net/$root/myblob Custom domain URL: http://www.contoso.com/myblob or http://www.contoso.com/$root/myblob |
Use this procedure to register your custom domain if you do not have concerns about having the domain be briefly unavailable to users, or if your custom domain is not currently hosting an application.
If your custom domain is currently supporting an application that cannot have any downtime, then use the procedure outlined in Register a custom domain for your storage account using the intermediary asverify subdomain.
To configure a custom domain name, you must create a new CNAME record with your domain registrar. The CNAME record specifies an alias for a domain name; in this case it maps the address of your custom domain to the Blob storage endpoint for your storage account.
Each registrar has a similar but slightly different method of specifying a CNAME record, but the concept is the same. Note that many basic domain registration packages do not offer DNS configuration, so you may need to upgrade your domain registration package before you can create the CNAME record.
- In the Azure Classic Portal, navigate to the Storage tab.
- In the Storage tab, click the name of the storage account for which you want to map the custom domain.
- Click the Configure tab.
- At the bottom of the screen click Manage Domain to display the Manage Custom Domain dialog. In the text at the top of the dialog, you'll see information on how to create the CNAME record. For this procedure, ignore the text that refers to the asverify subdomain.
- Log on to your DNS registrar's website, and go to the page for managing DNS. You might find this in a section such as Domain Name, DNS, or Name Server Management.
- Find the section for managing CNAMEs. You may have to go to an advanced settings page and look for the words CNAME, Alias, or Subdomains.
- Create a new CNAME record, and provide a subdomain alias, such as www or photos. Then provide a host name, which is your Blob service endpoint, in the format mystorageaccount.blob.core.windows.net (where mystorageaccount is the name of your storage account). The host name to use is provided for you in the text of the Manage Custom Domain dialog.
- After you have created the CNAME record, return to the Manage Custom Domain dialog, and enter the name of your custom domain, including the subdomain, in the Custom Domain Name field. For example, if your domain is contoso.com and your subdomain is www, enter www.contoso.com; if your subdomain is photos, enter photos.contoso.com. Note that the subdomain is required.
- Click the Register button to register your custom domain.
If the registration is successful, you will see the message Your custom domain is active. Users can now view blob data on your custom domain, so long as they have the appropriate permissions.
Use this procedure to register your custom domain if your custom domain is currently supporting an application with an SLA that requires that there be no downtime. By creating a CNAME that points from asverify.<subdomain>.<customdomain> to asverify.<storageaccount>.blob.core.windows.net, you can pre-register your domain with Azure. You can then create a second CNAME that points from <subdomain>.<customdomain> to <storageaccount>.blob.core.windows.net, at which point traffic to your custom domain will be directed to your blob endpoint.
The asverify subdomain is a special subdomain recognized by Azure. By prepending asverify to your own subdomain, you permit Azure to recognize your custom domain without modifying the DNS record for the domain. Once you do modify the DNS record for the domain, it will be mapped to the blob endpoint with no downtime.
-
In the Azure Classic Portal, navigate to the Storage tab.
-
In the Storage tab, click the name of the storage account for which you want to map the custom domain.
-
Click the Configure tab.
-
At the bottom of the screen click Manage Domain to display the Manage Custom Domain dialog. In the text at the top of the dialog, you'll see information on how to create the CNAME record using the asverify subdomain.
-
Log on to your DNS registrar's website, and go to the page for managing DNS. You might find this in a section such as Domain Name, DNS, or Name Server Management.
-
Find the section for managing CNAMEs. You may have to go to an advanced settings page and look for the words CNAME, Alias, or Subdomains.
-
Create a new CNAME record, and provide a subdomain alias that includes the asverify subdomain. For example, the subdomain you specify will be in the format asverify.www or asverify.photos. Then provide a host name, which is your Blob service endpoint, in the format asverify.mystorageaccount.blob.core.windows.net (where mystorageaccount is the name of your storage account). The host name to use is provided for you in the text of the Manage Custom Domain dialog.
-
After you have created the CNAME record, return to the Manage Custom Domain dialog, and enter the name of your custom domain in the Custom Domain Name field. For example, if your domain is contoso.com and your subdomain is www, enter www.contoso.com; if your subdomain is photos, enter photos.contoso.com. Note that the subdomain is required.
-
Click the checkbox that says Advanced: Use the 'asverify' subdomain to preregister my custom domain.
-
Click the Register button to preregister your custom domain.
If the preregistration is successful, you will see the message Your custom domain is active.
-
At this point, your custom domain has been verified by Azure, but traffic to your domain is not yet being routed to your storage account. To complete the process, return to your DNS registrar's website, and create another CNAME record that maps your subdomain to your Blob service endpoint. For example, specify the subdomain as www or photos, and the hostname as mystorageaccount.blob.core.windows.net (where mystorageaccount is the name of your storage account). With this step, the registration of your custom domain is complete.
-
Finally, you can delete the CNAME record you created using asverify, as it was necessary only as an intermediary step.
Users can now view blob data on your custom domain, so long as they have the appropriate permissions.
To verify that your custom domain is indeed mapped to your Blob service endpoint, create a blob in a public container within your storage account. Then, in a web browser, use a URI in the following format to access the blob:
http://<*subdomain.customdomain*>/<*mycontainer*>/<*myblob*>
For example, you might use the following URI to access a web form via a photos.contoso.com custom subdomain that maps to a blob in your myforms container:
http://photos.contoso.com/myforms/applicationform.htm
To unregister a custom domain, follow these steps:
- Sign in to the Azure Classic Portal.
- In the navigation pane, click Storage.
- On the Storage page, click the name of the storage account to display the dashboard.
- On the ribbon, click Manage Domain.
- In the Manage Custom Domain dialog box, click Unregister.