Share via


Cname or Virtual IP

Question

Tuesday, March 17, 2015 8:48 AM

Hi Guys,

I have a virtual machine which runs multiple websites. All domains are on Godaddy. 

At the moment for each of these domains I have set up A record which points to VM's VIP. Is this a good practice as the IP is not static. 

Should I change this to CNAME record and point to XXX.claudapp.net?

Thanks in advance

James

All replies (7)

Monday, March 23, 2015 5:28 PM ✅Answered

Hi,

At this time, you can’t reserve an IP address for a cloud service that you have already created.

Hence you need to create a New Cloud Service and Reserve the VIP at the time of creation. You can then create VMs under the Cloud Service.

Regards,

Sowmya


Tuesday, March 17, 2015 2:38 PM

Hi,

A CNAME record maps a specific domain, such as contoso.com or www.contoso.com, to a canonical domain name. In this case, the canonical domain name is the <myapp>.cloudapp.net domain name of your Azure hosted application. Once created, the CNAME creates an alias for the <myapp>.cloudapp.net. The CNAME entry will resolve to the IP address of your <myapp>.cloudapp.net service automatically, so if the IP address of the cloud service changes, you do not have to take any action.

An A record maps a domain, such as contoso.com or www.contoso.com, or a wildcard domain such as *.contoso.com, to an IP address.  In the case of an Azure Cloud Service, the virtual IP of the service.

So the main benefit of an A record over a CNAME record is that you can have one entry that uses a wildcard, such as *.contoso.com, which would handle requests for multiple sub-domains such as mail.contoso.com, login.contoso.com, or www.contso.com.

Since an A record is mapped to a static IP address, it cannot automatically resolve changes to the IP address of your Cloud Service. The IP address used by your Cloud Service is allocated the first time you deploy to an empty slot (either production or staging.) If you delete the deployment for the slot, the IP address is released by Azure and any future deployments to the slot may be given a new IP address.

You might want to refer to the below link to know more about Configuring Custom Domain

http://blogs.msdn.com/b/kaushal/archive/2013/07/06/windows-azure-web-sites-how-to-configure-a-custom-domain.aspx

Hope this helps !

Regards,

Sowmya


Tuesday, March 17, 2015 3:20 PM

Thanks Sowmay,

this is really helpful but it is the same thing that I came across. It's always how to set up a custom domain with an Azure website, but I can't find any link which explains how to set up a custom domain with a website on the dedicated virtual machine not on an Azure website. Or maybe I'm missing a step which will link virtual dedicated machine's website with an Azure website

Regarding VIP address do you mean by deploy creating a virtual dedicated machine? Which means I can stop, restart, upgrade, downgrade do what ever I want as long as I don't delete it and the VIP will stay the same?

Thanks a lot!

james


Tuesday, March 17, 2015 6:19 PM

Hi,

Virtual IP Address (VIP) is specific to Cloud Service and will continue to stay unchanged until there are zero deployments in the particular Cloud Service.

However you can choose to reserve the Virtual IP with the concept of Reserved IP Address in Azure.

Reserved IP allows you to reserve a public Virtual IP address in Azure, which you can then associate to a new cloud service. The Reserved IP address is sticky, meaning once it’s associated with the cloud service, it won’t change unless you decide to disassociate it. In a Virtual Machine scenario, the Reserved IP address will remain associated with your cloud service even when all the VMs in the cloud service are stop/deallocated. At this time, you can’t reserve an IP address for a cloud service that you have already created.

Suggest you to check the below article about using CName

http://blogs.msdn.com/b/sriharsha/archive/2012/02/25/domain-mapping-on-windows-azure.aspx

Hope this helps !

Regards,

Sowmya


Wednesday, March 18, 2015 9:35 PM

Hi Sowmya

following this your comment could you please send me a link where I can find exact definition of " zero deployments" 

thanks


Thursday, March 19, 2015 3:08 PM

Hi,

VIP of a cloud service will never change as long as it has a provisioned virtual machine within the cloud service. One way to ensure the VIP is never lost is to keep a small virtual machine provisioned. However, Microsoft has created a better option: the ability to actually reserve VIPs for an Azure subscription. These VIPs can then be used with cloud services.

You might want to refer to the below article to know about VIP and Reserving VIP

https://msdn.microsoft.com/en-us/library/azure/dn690120.aspx

http://blogs.msdn.com/b/lalitesh_kumar/archive/2014/10/06/static-ip-reserved-ip-and-instance-level-ip-in-azure.aspx

Hope this helps !

Regards,

Sowmya


Thursday, March 19, 2015 3:12 PM

Thanks! But our problem is that we already have 3 live websites running on the Virtual machine. And as far as I can understand you can Reserve existing VIP assigned to the VM. You need first to reserve VIP and than to create a VM under the reserved VIP. Is there any way doing this  without downtime?