How to Map Custom Domain with Azure Web Site

This article explains how to map a custom domain with the Azure App Service, Web Apps. When you create a web app, Azure assigns it to a sub-domain of Azurewebsites.net.

In this article we assume you already have a registered domain name.

Here we will create a web app in Azure portal for managing custom domains.

  1. Open a web browser and type “portal.azure.com”.
  2. Go to to the “BROWSE ALL” blade.
  3. Click on "Web Apps" and then "+ Add".


                                                                 Figure: Add an app

  4. Type your app name and then click on create and your app will be created.

    Create a web app
                                  Figure: Create a web app

    Our application will look like: 

    Complete application
                                                    Figure: Complete application.

Manage Custom Domain Name

Here are a few steps to manage our custom domain name.

Step 1

Open a Web Browser and type manage.windowsazure.com and login to our account then select web app to all items.

Selection of web app from all items
                                                   Figure: Selection of web app from all items.

Step 2

After choosing web app, click on our web app name domainconfigrationdemo.com.

Choose your web app
                                                                  Figure: Choose your web app.

Step 3

Setting a custom domain name is only available for the Shared, Basic and Standard modes for Web Apps, we switch a web app from the free mode to the shared mode. So go to SCALE and select SHARED from the app service plan tier and save it.

Showing SCALE
                                                               Figure: Showing SCALE

Step 4

Go to the configure blade and configure our domain.

Showing domain names
                                                            Figure: Showing domain names

Strep 5

Click on manage domains, our “Manage Custom Domain” window will open.

Manage custom Domains
                                                   Figure: Manage custom Domains

Create the DNS Records

If we have our specific domain then log into your domain registrar and add an “A Record”.

A Record
                                                     Figure: A Record.

When we create a record, the fields will allow mapping our domain name to an IP address. For a CNAME (canonical name) record, we will map from our custom domain to our azurewebsites.net subdomain like domainconfigrationdemo.azurewebsites.net.

Example

Our custom domain name is domainconfigrationdemo.com and it is mapped to my ip (127.0.1.1). And my CNAME record www.domainconfigrationdemo.com is mapped to domainconfigrationdemo.azurewebsites.net.

Create an awverify record

An awverify record is used to determine whether our own domain is attempting to use something. The following is the procedure.

  • Create a CNAME record that maps from awverify.domainconfigrationdemo.com to awverify.
    CNAME record
                                                               Figure: CNAME record
  • This step is for Azure to verify your domain. If you have a sub-domain like test.domainconfigrationdemo.com then create a CNAME record that maps from awverify.test.domainconfigrationdemo.com to awverify.

Summary

I hope this article provides you a better understanding of how to “manage your custom domain”.

Up Next
    Ebook Download
    View all
    Learn
    View all