Interview Q&A / Computer Networks

AdvancedQuick answer1 min readUpdated 3 Oct 2026

Why can you not put a CNAME record on the root domain, such as example.com?

SHORT ANSWER

A CNAME means this name is an alias for another name, so no other record may exist at it. The root of a zone must also hold NS and SOA records, so a CNAME there would conflict. Providers offer ALIAS, ANAME or CNAME flattening as a workaround.

Explain it simply

A CNAME is a forwarding note: "for anything about me, ask that other person". If you also try to keep your own address book entries, they conflict with the note. The root of a domain must keep its own entries, so it cannot be only a forwarding note.

Example

text
Allowed:
  www.example.com.   CNAME  myapp.hosting.net.

Not allowed (breaks the zone):
  example.com.       CNAME  myapp.hosting.net.
  example.com.       NS     ns1.example.net.     <- must coexist at the apex
  example.com.       SOA    ...
  example.com.       MX     10 mail.example.com. <- email would break too

The rule says that if a name has a CNAME, it cannot have any other record type. The apex always has SOA and NS, and usually MX and TXT.

Workarounds: use A and AAAA records with the host's IP addresses, or use your DNS provider's ALIAS/ANAME/flattening feature. The provider resolves the target itself and answers with plain A records. Another route is to redirect the bare domain to www with an HTTP redirect.

What to say in the interview

"A CNAME cannot coexist with other records at the same name, and the zone apex must carry SOA and NS. So I use A/AAAA records, or the provider's ALIAS or CNAME flattening, or redirect to www."

Common mistakes

  • Using a CNAME at the apex because it worked in a tutorial for a subdomain.

#dns#cname#domain

Related questions

Practise more Computer Networks questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Computer Networks quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.