I have been doing a server migration, and checking that everything related to DNS is configured correctly by using IntoDNS. After doing this though, it flags up a error saying that there is no A record for WWW. The website is working fine, and I noticed that there is only a CNAME record for that subdomain.

My question is, should I have both a CNAME record and an A record for that subdomain, or is a CNAME sufficient and I can safely ignore that error? Could it potentially prevent access for someone using a client that doesn't implement CNAME?

  • 6
    Your interpretation of this scenario is most likely incorrect. For one, a CNAME record cannot coexist with an A record. Considering the fact that the linked page will not generate the error you're describing when using www.yahoo.com (a CNAME), odds are very likely that you are not asking us about the right problem. Please provide the name of the subdomain if possible. – Andrew B May 17 '15 at 9:14

The reason the error is being flagged is because A records resolve quicker than CNAMEs since they only require a single lookup. So it is generally considered best practices to use A records for both your naked domain as well as the www subdomain (especially if the www subdomain is canonical).

There are of course exceptions to this rule, those exceptions being if you have a specific circumstance in which a CNAME would work better (for instance, routing your traffic through a CDN such as Akamai -- which reduces network load and speeds things up overall anyway, in which it would actually make more sense to point to their CNAME.)

If any of your subdomains point to third parties that tend to rotate IPs from a pool, then it would always be smarter to use a CNAME than an A record whenever the third party IP rolls so that you don't have to update your DNS every time they update theirs.

In your case, it really doesn't matter. But personally, I would go with the A record.


Most clients can interpret a CNAME. Make sure it points to an A record.

  • 1
    Yes, a cname is sufficient as long as it is pointing to the A record – kaka May 17 '15 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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