Custom Domain Name For Azure Website

Let’s have a clear view about Domain Name.

A domain name is an identification string that defines a realm of administrative autonomy, authority or control within the Internet. The domain name is a component of Uniform Resource Locator (URL) used to access websites, for example.

When your create a web app in azure it will create a URL/Domain name for you like the following: http://givenname.azurewebsites.net (look into image1 and image2.).



Figure 1: Web App in Azure



Figure 2: URL of created Web app

So how can we manage this one to our custom domain name.

Actually azure assigns our web app a domain and also a Virtual IP address, we need to map this IP address to the specific domain which we buy from any domain registrar. But to set custom domain for web app, the facility is only available for Shared, Basic and standard modes of web apps.

The first step is to scale your website if it is in free mode:



Figure 3: Scale your website

After that you will find one feature manage domains, click that.



Figure 4: Manage Domain

One popup will open, in that we will get the IP Address and CNAME to map our website to specific domain name.



Figure 5: Cname and IP Address

DNS Record Type

DNS uses data record like A record and CNAME which allows us to associate a domain name with IP address.

  • A record map domain name with IP address.
  • CNAME stands for canonical name or alias maps a domain name to another that is in our case we need to map our givenname.azurewebsites.net name to myweb.com.

Now open your domain provider DNS zone (here I am using Godaddy).



Figure 6: DNS Zone of Domain name

Now copy the IP address given by azure for your web app to A(Host) record and create CNAME for your web app:



Figure 7: Adding IP address and CNAME

Now go back to azure portal and put your domain name.



Figure 8: Manage Domain

Now type your domain name (myweb.com) in the browser and check your website. It works!


Similar Articles