2

I have a VM in setup in Azure that I want to use to host multiple websites but can't figure out how to setup an A record when Azure doesn't give you a static IP.

I've created a CNAME, to map "www" - but how to map the root - "Http"?

It seems the virtual IP that is given won't work because if you have to shut it down for any reason you lose it and you can't get a PIP without configuring a VNet…does this right? Seems a pretty basic thing - getting an IP for a VM.

  • What does tech support say?? A consistent and predictable IP address seems like a requirement to me. Do they want you to use their DNS to set your records perhaps?? – closetnoc Apr 13 '15 at 15:42
1

You need to get a Reserved IP address and assign it to your virtual machine. As far as I can tell, at the moment, setting this up requires you to use the Azure PowerShell cmdlets. I have never seen the option for it in the web portal.

Microsoft documents this as follows:

  1. First, create a Reserved IP for your subscription. You can use the following example, replacing items in "" with values specific to your deployment.

    New-AzureReservedIP -ReservedIPName "MyReservedIP" -Label "ReservedIPLabel" -Location "East US"
    
  2. Once a Reserved IP has been created in your subscription, you can then associate it with a new cloud service. In the example below, a new cloud service named "MyCloudServers" will be created and associated with the Reserved IP "MyReservedIP". A virtual machine "CloudServer1" will be deployed to the new cloud service using the specified parameters and image. Note that the location of the new cloud service must be in the same region as the Reserved IP.

    New-AzureVMConfig -Name "CloudServer1" -InstanceSize "Small" -ImageName "Name_of_image" | Add-AzureProvisioningConfig -Windows -AdminUsername "cloudadmin" -Password "ABC123" | New-AzureVM -ServiceName "MyCloudServers" -ReservedIPName "MyReservedIP" -Location "East US"
    

(And beware of copying and pasting Microsoft's examples from MSDN; they're littered with stupid "smart" quotes and other garbage.)

0

Easiest answer is to use something like the 'naked domain redirect' from wwwizer, so all you do is point your A record to 174.129.25.170 and they automatically redirect to your www subdomain.

It is very simple but if you want to read more see their page explaining it further: http://wwwizer.com/naked-domain-redirect

  • This doesn't appear to have any relevance to the question at all. – Michael Hampton Apr 15 '15 at 2:03
  • @MichaelHampton from the question "how to setup an A record" and "I've created a CNAME, to map www..." and in my answer "point your A record to 174.129.25.170". What part of this is not relevant? We know OP has the www subdomain working and needs to get the naked domain pointing to an IP address which points at their www.whatever site. Can you be more specific about why this wouldn't work? – Tom Brossman Apr 15 '15 at 7:29
  • Sorry for the delay…all the answers work - but Michael's is the most relevant. You can setup a reserved IP, and you can also setup an "Instance Public IP - PIP" in Azure. Both can now be done in the new Azure Portal - but only when configuring a new VM from scratch. You must use the command line instructions to assing an IP of either of these types to an existing VM. Neither of these types of IP addresses require a VNet - they can be done on stand-alone VM instances - and I'm now running two with no issues. Which is great considering Microsoft reps told me I had to setup a VNet first…lol – Rob50 Apr 17 '15 at 17:56
  • @Rob50 Aha, I'm yet to get the new portal; I'm still on the old one. – Michael Hampton Apr 17 '15 at 18:05

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.