I have two servers, both of which host multiple websites. I would like both servers setup to use a single domain.

I have Kloxo installed on both of them and would like to be able to access it via a URL, like server1.example.com or server2.example.com, which would obviously point to different IP addresses.

Currently, I have a single A record (@) for example.com that points to the IP address. Then I have several CNAMEs that point to @.

Should I create two more A records, one for server1 that points to it's IP address and another for server2 that points to it's address? Should I still keep the @ record and point the CNAMEs to it, or should the CNAMEs then point to server1.example.com instead of @?

EDIT - I'm not looking to have the example.com website on both servers. It is an Apache vhost on server1 and is fine like that. What I'm trying to do is properly DNS register the servers themselves using example.com such that I can access the Kloxo admin panels via a URL instead of an IP address, or can set PTR/rDNS/whatever records so that email works.

closed as off-topic by HopelessN00b Apr 9 '15 at 18:56

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.


Yes - Create the A records for each server.

(and leave the existing records unchanged)

For example:

Lets say your example.com website itself is hosted on, and your two Kloxo servers are on and, respectively.

You would want something like the following in your zone:

@           IN     A
www         IN     CNAME @
server1     IN     A
server2     IN     A

CNAMEs are more for logical ordering than any fundamental part of how DNS works. Clients such as web browsers have no idea whether the IP address came from an A record or a chain of any number of CNAME records. The idea is that because the URLs http://www.example.com and http://example.com will always both be served by the same webserver, you will always have to update the IP addresses of both at the same time. So a CNAME says that www.example.com should just use whatever IP address example.com has.

If your domains and subdomains have relationships like that example, where two domains should always have the same IP address then a CNAME is appropriate. Otherwise, an A record is appropriate. It doesn't really matter all that much. So as long as it works you are generally okay. (There are some exceptions to this regarding MX records.)

You said in the question that you have

a single A record (@) for example.com that points to the IP address

A records only have one IP address. Do you have two A records for the same domain with different IP addresses? This would be DNS load balancing.

If that is the case, you should definitely create new A records for server1 and server2 for each of your Kloxo installs.

  • At the moment I have a single A record for example.com that points to the IP for server1, which has an Apache vhost for example.com. I don't want the website itself to be hosted on both servers, I just want to be able to use the domain to identify the hosts themselves in a server1.example.com way. Hope that makes sense. – Biggles Jun 17 '12 at 22:41

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