Server Domain Naming Conventions

Server A Records

To begin, name each host (via the appropriate method for your operating system) and set its DNS A record to a hostname of the server: A

This name should be used for physical labeling of the equipment and will be most useful for operations engineers, remote hands and record keeping. It’s also what should be resolved by the reverse DNS PTR record.

See also Server Host Naming Conventions

CNAME Records

Then assign one or more DNS CNAME records to cover practical machine details, such as location, environment, work department, purpose, etc. This is all information that is easily reflected in your CMDB.

Format example: <ServerType><Seq>.<Environment>.<Location>

The CNAME documents should be known and used by developers for interconnection services. If these names are kept consistent, the mental effort required to remember your hostname will be reduced when you need it.

Standardized CNAME Structure

Start with your registered domain and divide into a correct sub-domain each piece of additional information. DNS is hierarchical by design, which will give us some advantages later on.

<wip> CNAME

Specify Location

After your domain name, add a subdomain referencing the geography of the host. Use the 5-character United Nations Code for Trade and Transport Locations (UN/LOCODE) value based on the address of the host’s data center. It covers more specific locations than something like the IATA airport codes and is still a well-defined standard.

Add a subdomain that refers to the location of the host after your domain name. Use the UN Trade and Transport Code (UN / LOCODE) 5-Character value based on host data center addresses. It covers more specific sites than IATA codes and continues to be a well-defined standard.

<wip> CNAME

Specify Environment

Next up, specify the environment that the host is a part of:

dev – Development tst – Testing stg – Staging prd – Production

These should be based on whatever process model you follow for release management…you may have more or less designations as well as environments like sandbox, training, etc..

<wip> CNAME

Specify Server Type and Serial Number

Last up, specify the basic category of the host’s function and append a serial number/sequence:

  • app – Application Server (non-web)
  • sql – Database Server (MS Sql Server, mySQL)
  • ftp – FTP/sFTP Server
  • mta – Mail Server
  • dns – Name Server
  • cfg – Configuration Management (puppet/ansible/etc.)
  • mon – Monitoring Server (nagios, zabbix, etc.)
  • prx – Proxy Server
  • lbl – Load Balancer
  • ssh – SSH Jump/Bastion Host
  • sto – Storage Server
  • vcs – Version Control Software Server (Git/SVN/CVS/etc.)
  • vmm – Virtual Machine Manager
  • web – Web Server

For the serial number, use zero-padded numbers based on your expected capacity. Plan for expansion, but usually two digits will be more than sufficient. CNAME

Increment the serial numbers sequentially and segment them based on the type of server in a particular data center, rather than a globally-unique index. That means you may have a web01 in multiple data centers.

Convenience Names

Beyond the standardized structure, you may want additional CNAME records for convenience words like webmail, cmdb, puppet, etc.. CNAME