Oversimplified DNS

... or, even a rocket scientist can understand DNS

Step 6 - Check CNAME records

GOALS: Make sure that any CNAME records are accurate and problem free. Make sure that there are no unnecessary CNAME records that could cause problems later.

BACKGROUND: CNAME records are "canonical name" records. DNS allows machines to have a true (canonical name), as well as an unlimited number of aliases. The CNAME record takes care of aliases. These should only be used when absolutely necessary, unless you are very familiar with DNS, since they can cause lots of problems if not used properly.

One of the times where CNAME records can be useful is when you want a subdomain to point to a computer outside of your domain. For example, you might want "news.example.com" to go to your ISP's newsserver. Instead of putting in the IP address, you could put in "news.example.com CNAME news.myisp.com", so that if the IP address of the newsserver changed, you wouldn't have to make any changes.

It is also said that CNAMEs may be useful when you are renaming a host, and will later get rid of the current name [RFC1912 2.4].

Finally, [RFC1912 2.4] suggests that CNAMES are good for generic names, for example, having "www.example.com CNAME funky.example.com", so the machine can have its own official name, but users can still find it without knowing its real name. Be careful with this though! In this case, you can have an A record for www.example.com pointing to the IP address that funky.example.com has (however, a reverse DNS lookup for the IP address can only return one of the names).

Step 6a: Find your CNAME entries

Get the CNAME information from step 4a, or repeat step 4a looking for CNAME records instead of A records. You should now have a list of all the CNAME entries for your domain.

Step 6b: Test your CNAME entries

Go through each CNAME entry, and make sure that the CNAME entry resolves correctly to an IP address. For example, if you have "news.example.com CNAME news.myisp.com", make sure that "news.myisp.com" has an A record pointing to a valid IP address. Also, make sure that the IP address responds as expected (in this case, run a news program to connect to the newsserver). See Step 4b for more information on making sure that the computer does what it is expected to, and is connected to the Internet.

Problem? Make sure that you have no unnecessary CNAME entries; they can make things confusing, and are only recommended if you have a legitimate need to have them and are quite familiar with DNS.

Problem? If you have a CNAME entry, make sure that it is the ONLY resource record for that domain. For example, if you have "www.example.com CNAME sparky.example.com", you must not have any A records, MX records, etc. for "www.example.com". [RFC1034 3.6.2] [RFC1912 2.4]

Problem? If MUST NOT have an NS record pointing to a CNAME. For example, "example.com NS dns.example.com" and "dns.example.com CNAME ns0.example.com" will cause problems [RFC1912 2.4]

Problem? If MUST NOT have an MX record pointing to a CNAME. For example, "example.com MX mail.example.com" and "mail.example.com CNAME smtp.example.com" will cause problems.

Problem? You SHOULD NOT have any other records pointing to a CNAME. At the very least, this causes unnecessary indirection (an extra step for looking up a domain name).