Create CNAME records for a subdomain

A canonical name record (CNAME record) is an alias for a DNS name. These records are useful when multiple services query the DNS server. The host that has an address (A) record cannot have a CNAME record.

In some cases, a NetScaler appliance in proxy mode requests an address record from the cache instead of the server.

Add a CNAME record by using the CLI

At the command prompt, type the following commands to create a CNAME record and verify the configuration:

-  add dns cnameRec <aliasName> <canonicalName> [-TTL <secs>]
-  show dns cnameRec <aliasName>

Example:

> add dns cnameRec www.example.com www.examplenw.com
 Done
> show dns cnameRec www.example.com
        Alias Name      Canonical Name  TTL
1)      www.example.com        www.examplenw.com       5 secs
 Done

To remove a CNAME record for a given domain, type the rm dns cnameRec command and the alias of the domain name.

Add a CNAME record by using the GUI

Navigate to Traffic Management > DNS > Records > Canonical Records and create a CNAME record.

Cache CNAME records

NetScaler when deployed in a proxy mode does not always send the query for an address record to the back-end server. This happens when for a answer to a query for an address record, a partial CNAME chain is present in the cache. There are few conditions in which the ADC caches the partial CNAME record and serves the query from the cache. Following are the conditions:

  • NetScaler should be deployed in a proxy mode
  • The response from the back-end server should have a CNAME chain, for which the record type of last entry in the answer section must be a CNAME and the question type not a CNAME
  • The response from the back-end server cannot be a No-data or NX-Domain
  • The response from the back-end server has to be a authoritative response

Create CNAME records for a subdomain