How to create a CNAME for a domain's root name

Amazon is aware of the problem with root domains and the Elastic Load Balancer. They recommend this workaround:

  • Configure the root domain to a service that redirects mydomain.com to www.mydomain.com (or any other subdomain of your choice)
  • Set up a CNAME record that maps the load balancer DNS name to "www.mydomain.com".

I don't like this solution, but is more "clean" that the "force root domain to CNAME" solution.

UPDATE: Amazon now addresses this for ELB/S3 via ALIAS records, a Route53 DNS feature.


No, it is not legal. CNAME is not allowed to coexist with other records and you need at least SOA here.

The example does not prove otherwise, because it does not imply having any other records there.


But, my DNS server doesn't allow this; nor goes GoDaddy's DNS manager. So, I'm looking to do exactly what the owner of lrnskls.com did. Anyone know how he did it?

You are probably going to need to do some search into DNS servers. Most DNS servers do not allow you to do this. I think I remember seeing another question on serverfault where someone posted which DNS server someone used to setup a cname at the root, but I can't find it.

See also: - Root Cname - WHM? - Set root domain record to be a CNAME


If you use Amazon's Route 53 DNS servers, then it will achieve what you want.

I was curious: the no CNAME in apex is forbidden by the RFC. What is the technical reason for this (assuming it isn't arbitrary).