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

I have a website that I will be hosting the DNS for (testing purposes at first and then it will have some limited traffic).

I have set up DNS so that site.tld has an A record to the actual IP, but I don't know what to do about

Both site.tld and will point to the same server / application so my logic tells me to add a CNAME record so that becomes an alias for site.tld.

BUT, I've been checking my settings with and if I only add a CNAME for the it gives me the following error:

ERROR: I could not get any A records for!

(the error clears once I do an A record for to point to the actual IP)

I don't know if there is a "rule" that www should always be an A record even though it's actually pointing to the same IP / application.

Thanks for helping me understand this!

share|improve this question
Did you remember to add an extra dot "." to the end of the domain in the CNAME record? It should be "", not "" – Scrivener Jan 17 '11 at 22:48
Can you share your cname entry? – Sameer Jan 18 '11 at 3:32
Yes, they are FQDNs :). The domain name is – Sorin Buturugeanu Jan 18 '11 at 6:42

The difference between having a A record vs CNAME for www would be an extra look up. In case of the CNAME the after figuring out that www is a CNAME to, another look will be done for

Other than that if you are planning to use a CDN or a 3 party acceleration service then a CNAME would come into play. Example a lookup of results in the following. Notice the difference in TTL of and 36545 IN CNAME 294 IN A

This gives the flexibility of changing the record, keeping a lower TTL, doing fancy stuff like geo redirection, if employing third party services.

In your case it doesn't matter since you are pointing both to the same IP.

share|improve this answer

There is no rule that the www. address needs to be an A record. It is very common for a web site to be a CNAME to something else. For example:

$ host is an alias for


$ host is an alias for

If things aren't working for you, it suggests a configuration error. Without seeing your actual DNS records it's hard to help out, but using command line tools like dig can help you debug the problem by showing you exactly what DNS records are being exposed by your name servers.

share|improve this answer
The actual domain is I've had the CNAME deleted for the nigh and I've just re-added it. CNAME alias for From your answer and from Sameer's I understand that if the resulting IP is the same it makes no difference (I'm not concerned by the extra lookup). Thanks! – Sorin Buturugeanu Jan 18 '11 at 6:38

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.