With the latest release to Windows Azure Web Site now supports the ability to map multiple custom DNS domain names using both CNAMEs and A-records.  This feature is available for websites running either shared or reserved mode.  This tutorial will cover how to setup a CNAME record for your Windows Azure Web Site.

The main steps are:

  1. Create a new Azure Web Site
  2. Scale the Azure Web Site from free to shared mode
  3. Create a CNAME record with your custom domain DNS provider
  4. Add the CNAME in Azure to authorized the configuration of the custom domain name
  5. Verify the CNAME alias works

It’s that simple, so lets do it!

STEP 1: Create a new Azure Web Site

 

Log in to your Azure account via http://manage.windowsazure.com and click on NEW  → COMPUTE → WEB SITE → QUICK CREATE.
Type in the URL prefix (I’m using bahhh.azurewebsites.net) you would like to use for your web site.
Select the region to which the website will be deployed (during preview you only have 1 option).
Select the subscription you want this web site hosted under, this only applies if you have more then 1 subscription associated to 1 live ID.

Click on CREATE WEB SITE located in the bottom right corner.
Once the we site is created you should see the below with the status as Running.
Click on the web site name to access the web site options.

 

STEP 2: Scale the Azure Web Site from free to shared mode

 

This step is required as the custom DNS names feature is only enabled in shared and reserved mode.  For more information about the features each mode offers see Scott Gu’s post.
Click on the SCALE option as shown in the below screenshot.

Once you’re in the SCALE options under the general section switch the WEB SITE MODE from FREE to SHARED (or RESERVED depending on your needs) by clicking the SHARED button.

Now click the SAVE button on the footer menu in order for the configuration changes to take effect.

 

You will receive a warning message that making these changes may have a billing impact, click on the YES button in order to proceed and the configuration changes take effect.
To understand what the billing impact may be visit Scott Gu’s or the official Azure pricing here.

STEP 3: Create a CNAME record with your custom domain DNS provider


In this step you will need to access your custom domain control panel in order to setup a CNAME record also know as a Alias record under your custom domain.
If you do not know how to access your DNS settings for you custom domain contact your domain registrar technical support for assistance.
Your DNS setting for the CNAME record should look something like the below.

 

STEP 4: Add the CNAME in Azure to authorized the configuration of the custom domain name

 

Now back in the Azure Management Site  click on WEB SITES tab located on the left side.
In the bottom options you should now see the option to MANAGE DOMAINS, click on it and an overlay Manage Custom Domain section should appear.

Type in your CNAME into the textbox (I’m using azure.bahhh.ca)

Click on the checkmark besides the textbox to verify and add the CNAME.

It can take some time for your CNAME to propagate through the DNS system. You cannot set the CNAME for the web site until the CNAME has propagated. You can use a  service such as http://www.digwebinterface.com to verify that the CNAME is available.

Click on the checkmark button in the bottom right corner to save the changes.

 

STEP 5: Verify the CNAME alias works

The easiest and final step; open your favorite web browser and browse to the CNAME (azure.bahhh.ca in my case)  you have created to verify that that the DNS is properly routing to your Azure Web Site.

For more details and more information about Custom Domain Names for your Windows Azure Web Sites visit the following:

Scott Gu’s

Windows Azure Documentation

 

 

 

 

Leave a Reply