1

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?

Grant
  • 189
  • 1
  • 6

3 Answers3

8

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.

Ben Doom
  • 684
  • 3
  • 6
2

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 1.2.3.4

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.

Schof
  • 972
  • 1
  • 6
  • 10
2

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.

benc
  • 683
  • 1
  • 5
  • 13