2

I recently registered my first domain name from GoDaddy, and want to point the domain to a website hosted in Azure VM.

Azure VMs change their public IP if restarted, so I don’t want to point my host’s A record to point to an IP, rather to the DNS name of my Azure VM (example.cloudapp.net).

But GoDaddy domain settings panel isn’t allowing me to point the host’s A record to a domain name, rather only to an IP address. Is it possible to achieve otherwise?

I was able to point subdomains using CNAME (i.e.- blog.mydomain.com can point to azure vm dns name example.cloudapp.net), since CNAME records allow to point to domain names. But not for the host’s A record.

1
  • 2
    CNAME points to another name, an A-record points to an IP. Period.
    – Tyson
    Jan 9, 2016 at 23:31

1 Answer 1

3

An A record is an A record and cannot have a host name; it needs a IP address. A CNAME is an alias but won’t work in a case like this.

So the problem is not your DNS settings as much as it is your Azure IP address setup. In general, Azure is not the only place that releases IP addresses on reboot. Amazon EC2 virtual hosting does a similar thing where the IP is changed on restart and to solve that you need to get an Elastic IP Address to basically have a static address that bridges to the different internal IP address a reboot would create.

Looking at the official documentation for Microsoft’s Azure cloud computing service shows that they offer reserved IP addresses that provide the functionality you describe:

To prevent IP addresses from changing, you can reserve an IP address. Reserved IPs can be used only as a VIP, ensuring that the IP address for the cloud service will be the same even as resources are shutdown or deallocated. Furthermore, you can convert existing dynamic IPs used as a VIP to a reserved IP address.

There is a cost associated with a reserved IP address, but it seems pretty trivial based on per-hour usage. I suggest you simply get a reserved IP address for the server and just point the domain name to that IP address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.