Comparing CNAME, ALIAS, and linked records

In IBM® NS1 Connect®, CNAME, ALIAS, and linked records provide similar functionality by performing indirection to a different domain name.

These types of records can help streamline DNS management where multiple domain names are associated with the same record data. There are key differences between these types of records that inform where and how they can be used.

  • CNAME records are applied to subdomains within a zone. They cannot be applied to the zone apex. CNAME records cannot exist next to other records within a zone; that is, a TXT record cannot share the same name as a CNAME record.
  • ALIAS records provide CNAME-like functionality at the zone apex and are the only record type that can be applied to secondary zones. ALIAS records can be used anywhere that indirection is required next to other names (next to a TXT record, for example). ALIAS records aren't standard record types, but rather specific to NS1 Connect. ALIAS records aren't included in outgoing zone transfers.
  • Linked records are used when the target record is also hosted on NS1 Connect. They cannot point to external targets and, similar to ALIAS records, they are not included in outgoing zone transfers.

CNAME records

Defined in RFC 1034, a CNAME record maps an alias name to the true or canonical domain name. CNAME is the most well-known way to symlink one DNS record to another. It works by answering queries that ask for the source with a simple referral (by domain name) to the target, which can be anywhere else on the internet.

When queried, a CNAME always includes a CNAME record in the response and might also include the resolved record pointing to the target, typically, an A or AAAA record. A full resolution is provided only if the target of the CNAME exists within the same zone. CNAME records cannot be used at the zone apex level. If indirection is required at the zone apex, use an ALIAS record.

When to use a CNAME record Create a CNAME record to implement simple indirection via referrals. In other words, use a CNAME when you want queries to the current domain name to be answered by records at another domain name.
When not to use a CNAME record Do not use CNAME records when:
  • The source is the zone apex (in this case, use an ALIAS record)
Source record type CNAME (RFC 1034)
Target record type Any (typically A or AAAA)
Query result If the CNAME points to a domain name in the same NS1 Connect zone, then the authoritative nameserver returns the target response if the record type exists. For example, if www.example.com has a CNAME record pointing to example.com, an authoritative name server returns both the CNAME record and the A record in the same response. This means the resolver doesn't have to send two DNS queries.
Chaining allowed? Yes
Can point to domains outside of NS1 Connect? Yes
Included in zone transfers?

Yes, because they are RFC-compliant, CNAME records are included in both incoming and outgoing zone transfers.

CNAME records with only one answer can be successfully transferred out. Most DNS servers don't accept more than one CNAME answer.

ALIAS records

(NS1 Connect-specific) ALIAS is a special record type that works like a CNAME record but can be used safely at the zone apex. These records work by performing address lookups for the ALIAS targets. Similar to other record types in NS1 Connect, ALIAS records can have Filter Chain and monitoring job configurations for each of their targets. ALIAS records can have more than one target/answer. NS1 Connect doesn't support the proxying of EDNS0 Client Subnet information for ALIAS records, so any EDNS operations performed by the authoritative name server is performed using the source prefix of the NS1 Connect POP from where the query originates.

NS1 Connect answers queries for A or AAAA records using the ALIAS record. The ALIAS record has no impact on queries for other record types. ALIAS records are only active if there are no A or AAAA records on the same label.

Note: ALIAS records are the only record type that can be added to a secondary zone in NS1 Connect.
Note: During ALIAS record configuration, you have the option to override any address records (A or AAAA) during the lookup process. In most cases, leave this option disabled for ALIAS records on primary zones and enabling it for ALIAS records on secondary zones. Refer to Types of DNS records to learn more about ALIAS record configuration.
When to use an ALIAS record Use ALIAS records to achieve CNAME-like behavior at the zone apex or when a CNAME cannot be used next to another record.
Source record type ALIAS (NS1 Connect-specific pseudo record)
Note: NS1 Connect's ALIAS records are not part of the DNS specification.
Target record type A or AAAA (address) record
Query result A or AAAA record(s)
Chaining allowed? Not recommended due to performance reasons as chaining incurs multiple lookups
Can point to domains outside of NS1 Connect? Yes
Included in zone transfers? No

Linked records

A linked record points to another (target) record hosted elsewhere in NS1 Connect and responds to queries using the same answers and traffic steering configurations applied to the target record. Linked records help avoid the timely and error-prone tasks of manually creating and maintaining identical configurations across multiple records. Additionally, compared to CNAME records, a linked record typically requires one less DNS lookup which can shorten the response time for the requesting resolver or client to receive the final answer.

When queried, the NS1 Connect authoritative server uses the full configuration details specified in the original record (also referred to as the real or target record) to resolve the query. This includes any advanced configurations like a Filter Chain and any connected data feeds. Any changes made to the original record are automatically reflected in the response when a linked record is queried.

Note: Linked records can only point to targets on the same NS1 Connect network. Targets don't have to be in the same zone and they can be owned by another account.

For example, a CDN using NS1 Connect DNS services can instruct its customer (who is also using NS1 Connect) to use a linked record to point to the customer’s domain at the CDN, instead of a CNAME. This eliminates DNS round trips and (for A or AAAA records) allows direct resolution at the zone apex. A linked record can be any record type (A, MX, CNAME, and so on), but it must be the same type as a target or it will not resolve.

Linked records are specific to NS1 Connect, and their resolution is an entirely internal process. During resolution, the full configuration from the target record (including advanced configuration options) is duplicated into the source record such that (other than the name of the record) they resolve identically. DNS recursive resolvers making the query cannot differentiate between a linked record and the real target to which it points.

Linked records support all NS1 Connect features and capabilities used by the target record — including real-time data feeds.

When to use a linked record Use linked records to reuse an existing NS1 Connect record as opposed to creating and maintaining a separate one.
When not to use a linked record Do not use a linked record if you need to edit the configuration of one record, but not the other.
Source record type You can create a linked record that points to any other record type on NS1 Connect.
Target record type (same as source)
Query result Based on target (In other words, NS1 Connect defers to the real or original record to determine how to answer each query.)
Chaining allowed? Yes
Can point to domains outside of NS1 Connect? No
Included in zone transfers? No
Notes You can only create a linked record within a primary (or non-secondary) zone.