Take the 2-minute tour ×

Suppose I have a domain, foo.com where I have a series of pages like foo.com/123 and foo.com/456 etc. I want to use the domain and provide links without a www prefix. These pages also will have links to other pages (and each other) without the www prefix.

I'm using Azure to host our site which is the same as EC2 in that the domain cannot have an A record because the server environment is virtualized. So both Microsoft and Amazon tell you to use CNAME records to point your domain to an A record they manage. In the case of Azure, my CNAME record points to a cloudapp.net record (which microsoft manages):

foo.com  CNAME  foo.cloudapp.net

where foo.cloudapp.net is my domain I've setup on Azure.

I'm encountering all sorts of problems with various things like email delivery and various people not being able to load the site. 2 different nameserver providers and my hoster tells me that it violates the RFC to have a root domain be a CNAME entry which is why my problems are sporadic.

I'm surprised to hear this as you see so many sites these days hosted on EC2 or Azure, and do not use a www prefix. How are these sites setup so that they can use just foo.com (without www prefix)?

Update: While I asked the question about EC2 or Azure, I'm specifically looking for info on Azure.

share|improve this question
Turns out that Azure does not support static Virtual IPs like amazon does. According to an answer found in this thread, you can use the IP assigned to your foo.cloudapp.net domain and as long as you don't delete your instance, your VIP will never change. –  TMC Nov 5 '11 at 7:02
add comment

2 Answers

up vote 3 down vote accepted

Web sites running on EC2 can be served through zone apex or naked domain like "example.com" with A records. The fact that the server is running in a virtual machine has no impact on that. Many sites do this including most of mine.

If you are using a service that requires a CNAME, like Amazon's Elastic Load Balancer, then you cannot point to it with a zone apex or naked domain like "example.com" as CNAMEs cannot be used with naked domains. This is a restriction of the DNS spec, not something related to cloud or virtualization implementations.

You can still use Amazon's Elastic Load Balancer with a zone apex or naked domain like "example.com" as long as you host your DNS for that zone using Amazon's Route53 DNS service. Amazon does tricks to make an A record map dynamically to the results of what the CNAME would have returned, complying with the DNS spec while providing the flexibility and power that ELB needs to provide.


I don't know anything about Azure. You are violating the DNS spec in how you're trying to use it.

share|improve this answer
Thanks. this answers is for EC2. I added an update to my question which answers it for Azure. Since my question was asking about both EC2 or Azure, I'll mark your answer as correct since it's detailed enough. Thanks! –  TMC Nov 5 '11 at 7:03
add comment

You can do this if your DNS is hosted with either DNSimple using their ALIAS record type, or DNSMadeEasy using their ANAME record type.

Cloudflare's DNS also allows this.

Also, if you use EC2, ELB and Amazon's Route53 DNS service it's also possible.

share|improve this answer
add comment

Your Answer


