Tuesday, July 31, 2012

Using a naked domain with a Windows Azure Web Site











So I’m doing two things here:





So what’s wrong with doing this?







  1. I've personally used a CNAME on the naked domain, also using NameCheap for DNS, but to a Azure VM and I can confirm it breaks MX records, but otherwise it seems to work okay.

  2. Hi David,

    I encountered this issue about a year ago for the Azure site for my open source minification tool hosted on Azure (http://rejuice.me)

    I had a discussion with my (awesome!) DNS provider (http://dnsimple.com) and they gave a great, detailed explanation:

    "It is true that some DNS providers allow it, but it goes against the DNS protocol and thus we do not. From RFC 1912 (http://www.ietf.org/rfc/rfc1912.txt):

    2.4 CNAME records

    other words, if suzy.podunk.xx is an alias for sue.podunk.xx, you
    can't also have an MX record for suzy.podunk.edu, or an A record, or
    records like this!:

    podunk.xx. IN NS ns1
    IN NS ns2
    IN CNAME mary
    mary IN A

    This is often attempted by inexperienced administrators as an obvious
    resources for that name. Since no other records are allowed to
    hosts in the podunk.xx domain are ignored as well!

    If there were a way to do it and still be compliant I assure you we would. Perhaps you can use an A record with a low TTL and dynamically update it from the host if the host address changes? Jason Seifer put together a nice example of how to do this with a shell script: http://jasonseifer.com/2011/04/04/auto-update-ip-dnsimple"

    I hope that helps.


  3. @Mark: glad to hear that! It gives me hope that it won't completely blow up in my face :)

  4. @Sam: thanks for sharing this info, which gives some good context from people who obviously know more than me :)

    At this point, I'm waiting to find a concrete case that's broken for me. This very blog is using a CNAME for blog.davidebbo.com, and the 'illegal' naked CNAME entry is apparently not hurting it.

    I guess time will tell. I'll update this post if I run into anything interesting.

  5. One somewhat related caveat: You can't currently do SSL with this approach. https://davidebbo.azurewebsites.net works, but https://www.davidebbo.com will not. This isn't so much because of the DNS config (I don't think), but more because Azure doesn't currently support it and give you a place to put a SSL certificate.