3
votes

We want to host a website on Windows Azure and it can technically be a Website or a Web role, we don't particularly care. Is there currently a way to set an A-record for either of them?

It seems that shared Websites don't support DNS entries at all and that the reserved instances support CNAME only. Do web roles support A-type DNS records?

If not, how real-world deployments on Azure deal with that? For our web site, it is absolutely necessary that it serves both www.example.com and example.com.

3
Think that currently with azure Web Sites : Free = no custom domains, Shared and Reserved = Both A and CNAME possible windowsazure.com/en-us/develop/net/common-tasks/…MemeDeveloper

3 Answers

6
votes

[UPDATE] As of 9.17.2012 it is possible to add an A Record to a instance, follow the Configuring a Custom Domain name for a Windows Azure Web Site instructions on WindowsAzure.com


A records are not possible suggested, but CNAMEs are.

Steve Marx blogged about setting up custom domains on windows azure, you'll want to take a look at that.

There is also DNSAzure, I've never tried the service and am simply stating that is a potential option. I do not guarantee it is a supported alternative, nor that it is a valid service.

4
votes

At the moment you cannot use A records or naked domains for Web Sites. For Web Roles this is possible, but there's a caveat.

Each time you deploy for the first time to an empty slot (production/staging) you will get a reserved IP address, and you'll keep this until you delete that deployment. So, you can use A records on that IP address, but beware never to delete it or you'll lose the IP address.

Quoting the Windows Azure website:

Note, however, because the lifetime of the IP address is associated with a deployment, it is important not to delete your deployment if you need the IP address to persist. Conveniently, the IP address of a given deployment slot (production or staging) is persisted when using the two upgrade mechanisms in Windows Azure: VIP swaps and in-place upgrades.

2
votes

I've been struggling with exactly this issue. I have a wildcard CNAME in DNS (route 53) to map everything for

*.example.com to example.cloudapp.net

All fine. Except the damn naked (root) domain.

I previously used 301 redirection as I had a dedicated server with a static IP. Simply had an

A record for example.com to server IP 

then in IIS a site with correct bindings with a simple

HTTP redirect (permanent 301)

Everything was just fine and life was good. Then we got rid of our dedicated server, and suddenly... No sensible way to get naked traffic to the example.cloudapp.net address ! Pain, problems, hours of Googling, hair pulling at how something so simple and so obviously necessary could be such a pain (or cost so much)...

Then ... about to throw in the towel in dismay and buy some needless hosting / service ... I stumbled upon the fantastic wwwizer.com

And joy one minute later all is sunny again