Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Hi i have a question about managing DNS records. Lets say i have a single server that contains an IIS server and an SQL server. A friend of mine has suggested that i have a single A record that points to that servers IP address and setup 2 CNAME records, sql.XXXX.XXX and www.XXXX.XXX.

I was wondering what the point is? couldnt someone access the SQL instance using www.XXXX.XXX and conversly access the IIS instance by using SQL.XXXX.XXX seeing as they point to the same server and IP?

If this is the case wouldnt it just be easier to have just everyone access via XXXX.XXX (no subdomain) and leave it at that?

share|improve this question
up vote 8 down vote accepted

The assumption here is that, at some point, the two server types may reside on different physical or virtual servers with (necessarily) two separate IP addresses. Separating the web and db servers is a pretty common setup. Using CNAMEs or separate A records lets you easily move one without having to add new DNS records.

share|improve this answer
I tend to just put A records, rather than CNAMEs, to save the (very minor) additional lookup. – Alister Bulman Nov 13 '09 at 22:46

The answer Ben Doom gave is complete and accurate, but I wanted to expand a bit about the methods I use:

I'll use an A record for the physical server itself, which has a unique name:

wellington A

Then I'll set up cnames for all the services on that server:

sql CNAME wellington
www CNAME wellington

Then if you ever need to split up sql and www on different boxes (or move both of them to a different box) you just change the cnames.

share|improve this answer

The point of using service-in-server names is that it gets end users focused on accessing the service, not the host.

When you have technical people (testers, admins, coders), you want them to know what system they are specifically accessing.

When you are in production, you want users to have simple, easy to remember paths.

When the ftp server is named "hawk" and the http server is named "dove", this is cute, but difficult to remember.

share|improve this answer

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.