Categories
CNAME

CNAME

February 26,2026 in Online Advertising Glossary | 0 Comments

CNAME, short for Canonical Name record, is a DNS record that does not create its own final destination, but instead says that one hostname is simply an alias of another hostname. In other words, instead of pointing a domain or subdomain directly to an IP address through an A or AAAA record, it first points to another hostname, and only that hostname is then resolved further. That is exactly why CNAME is often used where multiple names or subdomains should all lead to one main technical target.

At first glance, CNAME can seem like a small DNS shortcut. In reality, it plays an important role anywhere domain management needs to stay simple and administrators do not want to maintain the same IP address or the same destination server manually in several places. That is why CNAME is widely used with subdomains, CDN services, external SaaS tools and many hosted platforms.

A CNAME record is the DNS record that makes one hostname an alias of another. It does not point directly to an IP address. Instead, it points to another hostname, which is then resolved to the final technical destination. This makes it possible to manage one change centrally instead of repeating it manually across multiple subdomains.

What a CNAME record actually does in practice

When an A record is used, a domain or subdomain points directly to a specific IPv4 address.

With an AAAA record, the logic is the same for IPv6. CNAME works differently.

It does not say “this name goes to this IP address”. It says “this name is an alias of another name”.

That means the DNS lookup has to continue one step further. First, the resolver finds out which hostname the CNAME points to. Only then does it continue looking for the final IP address or other relevant DNS data connected to that target name. That is the real logic of CNAME – it does not define its own technical endpoint, but refers to another name that already has one.

How to think about CNAME in simple terms

A useful comparison is a public-facing brand name or a business nickname that leads to one central office. One name is the main one, and the other names simply point to it. That is very close to how CNAME works in DNS.

A subdomain does not need its own separate destination. It can simply say: if you are looking for me, follow that other hostname instead. This gives administrators an important practical advantage. If the real technical destination changes later, they do not need to update everything separately.

CNAME is useful when a subdomain should not have its own separate routing, but should instead inherit the destination from another hostname. A common example would be a blog, shop or other subdomain that should follow the same main service endpoint.

Why CNAME is used

The main benefit is simpler management. If several subdomains pointed directly to IP addresses and the target server changed, multiple records would need to be edited manually. With CNAME, administrators can keep the alias structure cleaner and reduce the number of places where changes must be made.

This is especially useful in environments where technical destinations change more often – for example with cloud services, CDNs, hosted applications or third-party platforms. That is why CNAME is not just a decorative DNS feature. It is a practical tool for keeping DNS setups cleaner and less error-prone.

CNAME does not point to an IP address

This is one of the most important things to understand. A CNAME record does not point to an IP address. It always points to another domain name or subdomain name. If the goal is to point directly to an IP address, the correct choice is an A record for IPv4 or an AAAA record for IPv6.

This is also where mistakes often happen. Some people expect CNAME to be just another way of sending traffic to a server. In reality, it serves a different purpose. It creates an alias from one name to another name.

Why CNAME should not exist alongside other records on the same name

This is another key property of CNAME. If a certain hostname has a CNAME record, that same hostname should not also have other normal DNS records such as A, MX or TXT on it. The reason is straightforward: CNAME says that the name is only an alias, not an independent place with its own separate set of DNS data.

In practical terms, this means that if a subdomain uses CNAME, it should not at the same time carry other unrelated DNS logic under the exact same name. That is why CNAME works best where a clean alias is really needed, not where multiple different DNS functions must coexist under one hostname.

A CNAME record is best understood as a full alias, not as one extra setting among several. Once a hostname is defined as an alias through CNAME, it should not also behave like a normal independent hostname with its own separate A, MX or TXT records.

Why CNAME matters in relation to MX records

In email infrastructure, one important rule is that an MX record should not point to a CNAME alias. Mail servers expect the MX target to be a real canonical hostname – in other words, a hostname that has its own A or AAAA record, not just another alias layer.

If this is configured incorrectly, the result can be compatibility problems or mail delivery issues. That is why, when working with MX records, administrators are usually told to use the real hostname of the mail server rather than a CNAME alias.

CNAME is useful for aliasing web services and other endpoints, but not as the target of an MX record. If a domain must receive email, MX should point to the actual mail server hostname, not to a CNAME alias.

CNAME and the root domain

Another common question concerns the main domain itself, sometimes called the zone apex or root of the zone. This is where CNAME becomes problematic in standard DNS, because the main domain usually also needs core zone records such as NS and SOA. That does not fit with the idea of a pure alias.

In practice, this is why many DNS providers handle similar needs through provider-specific features such as flattening, alias-style behaviour or proxy layers. That is not the classic behaviour of a standard CNAME record itself, but rather a workaround implemented by a particular DNS platform.

Where CNAME is used most often

CNAME is commonly used for subdomains that should point to an external service or a shared technical target. Typical examples include a company blog, an online shop running on an external platform, a landing page managed in a marketing tool, a CDN endpoint or different kinds of SaaS integrations.

In these situations, the big advantage is that the administrator does not need to know or constantly track the exact IP address of the target system. It is enough for the alias to point to the correct hostname provided by the service.

What are the limits of CNAME?

Although CNAME is very useful, it is not a universal answer for every DNS situation. It is not suitable where several different DNS functions must coexist under the same name. It should not be used as the target of an MX record, and in standard DNS it is also not a clean fit for the apex of a zone where core records must already exist.

So CNAME makes excellent sense in the right context, but only there. If it is used where a fully independent hostname with its own records is expected, it can create operational confusion instead of simplifying things.

What are the limits of CNAME? CNAME is ideal when one hostname should simply follow another hostname. It is much less suitable where that same name must also carry its own direct IP mapping, mail logic or multiple independent DNS functions. In those cases, other record types are usually the better fit.

Why this term is worth understanding even outside technical roles

CNAME is a good example of the fact that DNS is not only about turning domains into IP addresses. It is also a system that can work with aliases and with a cleaner separation of logic between different names. That matters for website owners, marketers and content managers as well, because they often connect domains to external services and need those connections to be set up correctly.

If you understand what CNAME does, it becomes much easier to see why some services ask for an alias to their hostname, why they do not simply give you an IP address, and why some DNS combinations work perfectly while others create technical conflicts.

That is why CNAME is worth understanding even outside strictly technical professions. It may look like a small DNS detail, but it often sits right at the point where websites, subdomains and external services are connected together.

Related terms

  • DNS – CNAME is one type of DNS record, and its role only makes full sense when the wider logic of DNS is understood.
  • Hostname – the specific name of a server or service on the network, such as app.example.com or mail.example.com. CNAME is important here because it points to another hostname rather than directly to an IP address.
  • A record – points directly to an IPv4 address and helps show how that differs from CNAME.
  • AAAA record – similar to an A record, but for IPv6 rather than IPv4.
  • Alias – an alternative name that does not have its own independent destination, but instead refers elsewhere. This is exactly the role CNAME plays in DNS.
  • IP address – the numerical address of a server or device on a network. In the context of CNAME, it matters because CNAME does not lead directly to an IP address, but first to another hostname.
  • MX record – important in relation to CNAME because MX should not point to an alias, but to the real hostname of a mail server.
  • Nameservers – CNAME records are stored on authoritative nameservers and served from there to the rest of the internet.
  • SPF, DKIM, DMARC – related email and verification records that show DNS is not only about website routing, but also about delivery, authentication and domain trust.

Was this article helpful?

Support us to keep up the good work and to provide you even better content. Your donations will be used to help students get access to quality content for free and pay our contributors’ salaries, who work hard to create this website content! Thank you for all your support!

Reaction to comment: Cancel reply

What do you think about this article?

Your email address will not be published. Required fields are marked.