Websites and Tech

CNAME

Also called Canonical name record, alias record

A DNS alias pointing one hostname at another, so the destination's owner can change servers without you editing anything.

Quick facts: CNAME

Category
Websites and Tech
Also called
Canonical name record, alias record
Level
Intermediate
Affects
Third-party service setup, tracking domains, branded email links
Where to see it
Your DNS control panel, dig, the connecting platform's verification screen
In this article4
  1. How a CNAME works
  2. Why CNAMEs matter
  3. Common mistakes with CNAMEs
  4. Getting CNAMEs right

How a CNAME works

A CNAME record — short for canonical name — points one hostname, usually a subdomain, at another hostname rather than at a numeric address. The resolver reads it, sees that it has been sent on to a different name, and repeats the lookup on that name until it finally reaches an A record holding a real address.

That indirection is the entire point. When another company hosts something for you — a shop, a support portal, a landing page builder, an email platform’s tracking links — the machine serving it will move as they grow or change providers. If your zone held a fixed address you would have to keep up with every one of those moves. Pointing at their hostname instead means they update their own record and yours carries on working untouched.

Why CNAMEs matter

Almost every service that asks you to connect your own domain is asking for a CNAME. Domain verification, custom tracking domains, hosted checkout pages, status pages and knowledge bases all use the same mechanism; only the wording of the instructions differs. The feature you are paying for works or fails on whether that one record was entered exactly as supplied, on exactly the right host name.

There is a marketing reason to care as well. Sending campaigns through a sending domain on your own name, rather than the platform’s shared one, is set up with CNAMEs the platform issues. It puts your brand in the link a recipient sees when they hover, and ties sending reputation to your domain instead of a pool shared with strangers.

Common mistakes with CNAMEs

Trying to put one on the bare domain is the most frequent. The standard does not allow a CNAME to sit alongside other records on the same name, and the bare domain always carries other records, its mail routing among them. Some panels reject the attempt; others accept it and take mail down with the change. Providers offer workarounds under names like ALIAS, ANAME or CNAME flattening, and those are what you should use.

The second is pasting a full hostname into a field that already appends your domain, creating a record with your domain in it twice. It looks correct in the form and never resolves. The third is chaining, where a CNAME points at another CNAME which points at a third: every hop adds a lookup and another place for the whole thing to break silently.

Getting CNAMEs right

Copy the value the platform gives you character for character, then work out how your panel treats the host field, because some expect only the subdomain and some expect the whole name. Save it and look the record up from outside your own network before you press verify, since a failed verification often drops the platform into a retry cycle you then have to sit through.

Clear out records for services you have stopped paying for. A subdomain still aliased to a platform you cancelled can be claimed by whoever registers that name there next, which is how businesses end up serving other people’s content on their own domain. Make a zone review part of cancelling any tool, alongside revoking its logins.

Do and do not

Do

  • Copy the value the platform supplies exactly
  • Check whether the panel appends your domain automatically
  • Delete aliases for services you have cancelled

Do not

  • Put a CNAME on the bare root domain
  • Chain one alias to another without reason
  • Alias a hostname your mail routing depends on

Questions people ask about this

Why can't I add a CNAME on my main domain?

Because a CNAME cannot coexist with other records on the same name, and your bare domain must also hold mail routing and verification records. Adding one there either fails or breaks email. If a platform asks you to alias the root domain, use your provider's ALIAS, ANAME or flattening option, or point a subdomain at it instead.

What is the difference between a CNAME and a redirect?

A CNAME works in the lookup, before any connection is made, and the visitor's address bar never changes. A redirect is a response from a web server telling the browser to go somewhere else, and the address in the bar does change. Use a CNAME to connect a service, and a redirect to send people from one page to another.

Does using a CNAME slow my site down?

A single alias adds one extra lookup, which is cached afterwards and rarely noticeable. Long chains are a different matter: each hop is another round trip before anything loads, and every link in the chain can fail independently. Keep aliases one step deep wherever a platform gives you the choice.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.