0

My registrar tell me that I can't have a CNAME record that doesn't start with www. Is it true?

So I am using amazon ec2 with load balancing. the loadbalancer has a convoluted DNS name, and specifically tells you to use a CNAME to send requests to that DNS name, and not an A record.

myloadbalancer-1234567890.us-west-1.elb.amazonaws.com (A Record)

Note: Because the set of IP addresses associated with a LoadBalancer can change over time, you should never create an "A" record with any specific IP address. If you want to use a friendly DNS name for your load balancer instead of the name generated by the Elastic Load Balancing service, you should create a CNAME record for the LoadBalancer DNS name, or use Amazon Route 53 to create a hosted zone. For more information, see Using Domain Names With Elastic Load Balancing.

I purchased a domain. The registrar doesn't allow you to add records yourself, only by emailing them a request. So they set up a CNAME record

mydomain.org  SOA 111  whatever
www.mydomain.org    CNAME   3596    myloadbalancer-1234567890.us-west-1.elb.amazonaws.com   

when I asked them why it doesn't work with www, the registrar answered that there is a technical prohibition to make a CNAME record without www. Is it true, or are they incompetent/lying and I should switch registrars?

1
  • You phrase your question a bit awkwardly, the "technical prohibition to make a CNAME record without www" applies the bare domain, i.e. example.com or example.co.uk also called the apex. That's why I close your question as a duplicate. In addition to www any other valid hostname can be used as CNAME records i.e. www2.example.com. , ftp.servers.example.com. etc. can all be CNAME's – HBruijn Jun 22 '16 at 13:24
1

A CNAME (Alias) record points to an A (Host) record. You can create multiple CNAME records and point them to an A record. The most common CNAME record used is the subdomains www, which is supported by every provider. You can also use Route53 to create A or CNAME. it supports 'www'.

Cheers!!

Tested Solution :

Update - To solve your problem you can use route 53 to create an A record for the ELB using root domain such as 'example.com' and CNAME as www.example.com.

2
  • a cname can point to another cname too. anyway, my problem is that cname records for root addresses are not allowed – f.khantsis Jun 22 '16 at 12:40
  • In route 53 you can use Alias record for the root address (which is called Apex zone) check out here.. aws.amazon.com/route53/faqs – C Singh Jun 22 '16 at 12:45
4

A CNAME resource record cannot point at a zone, RFC1034: "If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different." Therefore you can't have a CNAME and an SOA called mydomain.org, so they are partly correct.

However, www is not special, it's just a string and your registrar should allow you to specify what that string should be, such as myserver.mydomain.org.

4

This is utter nonsense. A CNAME record can be as arbitrary as an A record. This crap together with the fact they need emails to change records is a clear hint to run!

Edit: To avoid confusion: Having a CNAME point to the zone itself (like example.com instead of www.example.com, this is called the Apex) is not possible, but I thought you wanted to have something else then www as the name, e.g. myserver.example.com).

2
  • well, to try it out, I went to Amazon Route 53, and they also don't allow CNAME on apex zone (whatever that means) – f.khantsis Jun 22 '16 at 12:36
  • Please see my edit. – Sven Jun 22 '16 at 12:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.