Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's how I have my DNS records setup:          IN     A         <server ip>     IN     CNAME     IN     CNAME      IN     CNAME and are alternate ways of accessing By default my host had an A record for * but I removed it.

Is this setup correct?

share|improve this question
Is this configuration related to bind or a dns provider web interface (or any other software) ? If this is a zone file in bind, you have some misconfiguration. The records should be: "sub1 IN CNAME". Notice the lack of "" in sub1 and the addition of "." in – Torian Sep 30 '10 at 16:48
This is my configuration in my host's control panel interface. – AmIDoingThisRight Sep 30 '10 at 17:21

The A record for is exactly right, you can't use a CNAME there.

My personal view is that pointing a CNAME back at the apex of your domain is sub-optimal:

  1. It inadvertently means that any other records at your apex (especially NS, SOA and MX) also exist for those subdomains. That may have unintended consequences.
  2. It's marginally slower than using an A record as the DNS client has to follow the CNAME chain.

To avoid the first problem my recommendation would be:          IN     A         <server ip>      IN     A         <server ip>     IN     CNAME     IN     CNAME
share|improve this answer

Alternatively, you don't even need CNAME records, and I don't recommend using them unless you have a really good reason to do so.          IN     A         <server ip>      IN     A         <server ip>     IN     A         <server ip>     IN     A         <server ip>
share|improve this answer
Why do you not recommend using CNAMES? – dunxd Sep 30 '10 at 17:15
They are faster (1 query vs 2 queries). It is especially useless when you are just looking at the same server, CNAMEs are best for pointing to a server outside your domain, see this article: – MaQleod Sep 30 '10 at 17:54
After reading that CNAMEs are a bit slower, like you mentioned, I deleted my CNAMEs and replaced them with As. Now I can't access but can access What should I do? OpenDNS's cache checker is returning NXDOMAIN for www. by the way – AmIDoingThisRight Sep 30 '10 at 18:40
It may take some time for the changes to propagate. Some hosts can take 24-48 hours, some will have it updated in 4-6 hours. – MaQleod Sep 30 '10 at 22:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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