Sunday, May 17, 2015

How to configure custom domain in azure cloud service deployment

Hi All,

In this post i am going to show how to configure custom domains in azure cloud services.
As you my have multiple web roles in your cloud service, you need to configure your website to use your custom domain.

For example: if your domain is: www.MostafaElzoghbi.com --> You want this domain to point to the azure cloud service url: mycloudservice.cloudapp.net

The way to configure custom domains in azure cloud services is different than the web apps. In the web app scenario you have custom domain option to set your configuration per web app.
In case of the cloud service here are the steps you need to follow:

1) Login to Azure Portal, Click on Cloud Services.
2) Select your cloud service.
3) Copy your cloud service Site Url.
For example: mycloudservice.cloudapp.net

4) Copy your Cloud Service Public Virtual IP Address (VIP).
For Example: 191.236.48.195



5) Login to your hosting/domain provider, access your control panel and edit the DNS entries for the domain you want to point to azure cloud service.

6) Add CNAME record with the following values:
Type: CNAME
Name: www
Data: mycloudservice.cloudapp.net

7) Add A record with the following vaues:
Type: A Record
Data: VIP of the cloud service.

8) Save your entries and give it few minutes or hours to propagate.

7) Check out your cloud service web role using the custom domain: www.mycustomdomaain.com

Enjoy!

No comments: