7

Some of our sites are setup with an "a record" to an IP address and some are setup as a cname of a server that then has an "a name" to the same server IP. I want it to be consistent.

Which is the best way?

2 Answers 2

4

CNAME records that point to other CNAME records should be avoided due to their lack of efficiency, but are not an error. The following example is not recommended:

foo.example.com.  CNAME  bar.example.com.

Nevertheless this is the very common practice:

  • example.com (@) is done via "A" record (obviously)
  • www, ftp etc subdomains are done via "CNAME" pointing to @

While "CNAME" is more convenient to use (you need to specify IP address less times, quite often just once when all subdomains are hosted on the same server) it is a bit slower than "A" -- as it needs additional lookups when resolving to the final IP address (while "A" resolves directly). But resolved names are usually cached so the performance difference here is almost non-existent in long run (only matters on initial request).

From DNS point of view it should make no difference/impact on SEO -- I doubt Google checks how DNS record is defined -- the final IP is what matters.

2

They will only affect your SEO if different canonical names can pull up the same content. Then you'll run into duplicate content issues. The most common example of this is being able to pull up the same content with and without the "www". If this is the case you can use <link rel="canonical"> to specify the correct URL for any given content. (You can also solve the "www" issue with 301 redirects and settings in Google Webmaster Tools but I wanted to keep the answer specific to CNAME records).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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