Get going faster--use the NEW Azure guided walkthrough! It makes associating a custom domain name AND securing communication (SSL) with Azure Cloud Services or Azure App Service Web Apps a snap.
When you create a web app, Azure assigns it to a subdomain of azurewebsites.net. For example, if your web app is named contoso, the URL is contoso.azurewebsites.net. Azure also assigns a virtual IP address.
For a production web app, you probably want users to see a custom domain name. This article explains how to reserve or configure a custom domain with App Service Web Apps. (This article provides generic instructions for any domain registrar. The tabs at the top of this article link to some articles for specific registrars.)
This article is for Web Apps; for Cloud Services, see Configuring a Custom Domain Name in Azure.
For instructions on using Traffic Manager to load balance traffic to a web app, use the selector at the top of this article to select the Traffic Manager specific steps.
Custom domain names cannot be used with Free web app. You must configure your web app for Shared, Basic, or Standard mode, which may change how much you are billed for your subscription. See Web Apps Pricing Details for more information.
If you have a domain name already, or you want reserve domain from other domain registrars, here are the general steps to bring a custom domain name for web app:
Within this basic outline, there are specific cases to consider:
Setting a custom domain name is only available for the Shared, Basic and Standard modes for Web Apps. Before switching a web app from the Free mode to the Shared, Basic or Standard mode, you must first remove spending caps in place for your Web Apps subscription.
For more information on the App Service plan modes, including how to change the mode of your site, see How to scale web apps.
The Domain Name System (DNS) uses data records to map domain names into IP addresses. There are several types of DNS records. For web apps, you’ll create either an A record or a CNAME record.
If the IP address changes, a CNAME entry is still valid, whereas an A record must be updated. However, some domain registrars do not allow CNAME records for the root domain or for wildcard domains. In that case, you must use an A record.
The IP address may change if you delete and recreate your web app, or change the web app mode back to free.
Skip this step if you are creating a CNAME record. To create an A record, you need the virtual IP address of your web app. To get the IP address:
Log in to your domain registrar and use their tool to add an A record or CNAME record. Every registrar’s web app is slightly different, but here are some general guidelines.
The page might list A records and CNAME records separately, or else provide a drop-down to select the record type. Also, it might use other names for the record types, such as IP Address record instead of A record, or Alias Record instead of CNAME record. Usually the registrar creates some records for you, so there may already be records for the root domain or common subdomains, such as www.
When you create or edit a record, the fields will let you map your domain name to an IP address (for A records) or another domain (for CNAME records). For a CNAME record, you will map from your custom domain to your azurewebsites.net subdomain.
In many registrar tools, you will just type the subdomain portion of your domain, not the entire domain name. Also, many tools use ‘@’ to mean the root domain. For example:
|Host||Record type||IP Address or URL|
Assuming the custom domain name is ‘contoso.com’, this would create the following records:
You can use Azure DNS to host the necessary domain records for your web app. To configure your custom domain, and create your records, in Azure DNS, see Create custom DNS records for a web app.
If you create an A record, web app also requires a special CNAME record, which is used to verify that you own the domain you are attempting to use. This CNAME record must have the following form.
Visitors to your web app will not see the awverify subdomain; it’s only for Azure to verify your domain.
After the records for your domain name have propagated, you must associate them with your Web App. Use the following steps to enable the domain names using your web browser.
It can take some time for CNAME records created in the previous steps to propagate through the DNS system. You cannot add the domain name of to your web app until the CNAME has propagated. If you are using an A record, you cannot add the A record domain name to your web app until the awverify CNAME record created in the previous step has propagated.
You can use a service such as http://www.digwebinterface.com/ to verify that the CNAME is available.
In your browser, open the Azure Management Portal.
In the Web Apps tab, click the name of your web app, select Settings, and then select Custom domains and SSL
In the Custom domains and SSL blade, click Bring external domains.
Use the DOMAIN NAMES text boxes to enter the domain names to associate with this web app.
Click Save to save the domain name configuration.
Once configuration has completed, the custom domain name will be listed in the domain names section of your web app.
At this point, you should be able to enter the custom domain name in your browser and see that it successfully takes you to your web app.
If you want to get started with Azure App Service before signing up for an Azure account, go to Try App Service, where you can immediately create a short-lived starter web app in App Service. No credit cards required; no commitments.