About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
Do not publish a CNAME for the zone apex, the name example.com itself. RFC 1034 section 3.6.2 says: "If a CNAME RR is present at a node, no other data should be present". Section 4.2.1 says the top node of a zone has "name server RRs that list, one per RR, all of the servers for the zone, and a single SOA RR". Those records are other data. An apex CNAME breaks the rule.
The usual goal, sending the bare domain to a website, needs address records on the apex, or a facility your DNS host documents under a name other than CNAME. RFC 1034 does not define that facility.
What the symptom means
A CNAME marks its owner as an alias and names the canonical target in the record data. When a lookup does not find the requested type, and the name holds a CNAME of the same class, "the name server includes the CNAME record in the response and restarts the query at the domain name specified in the data field of the CNAME record". Queries for the CNAME type itself are not restarted.
At the apex that restart is the wrong outcome. A query for the address of example.com would follow the alias and answer for the target, not for the zone. The SOA and NS records that define the zone would not be the answer. Mail records on the same name are other data too, so they should not be published beside the CNAME. The same rule applies at any name: mail records beside a CNAME break it.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| A CNAME was added on the apex so the website shares a hostname with another service | The bare domain follows a target; mail or the zone itself misbehaves | dig example.com CNAME and dig example.com A |
The DNS console offers CNAME on @ and accepts the save |
A CNAME comes back for the apex | Query the servers named by the parent, not only the console |
| Address records were removed and a CNAME left in their place | A lookups return a CNAME and then the target |
dig example.com A without +short |
A name under the zone, such as www, was confused with the apex |
Only www is a CNAME, and example.com has SOA and A records |
Query both names |
Prove the cause before changing anything
All of these are read-only. The dig manual's form is dig @server name type. The default output is the verbose form. +short is a terse answer, so use the default when you need to see that a CNAME was returned on the way to an address.
dig @ns1.example.net example.com SOA
dig @ns1.example.net example.com NS
dig @ns1.example.net example.com CNAME
dig @ns1.example.net example.com A
dig @ns1.example.net example.com MX
Save that output:
dig @ns1.example.net example.com SOA > /root/apex-soa-example.com-2026-11-22.txt
dig @ns1.example.net example.com CNAME > /root/apex-cname-example.com-2026-11-22.txt
dig @ns1.example.net example.com A > /root/apex-a-example.com-2026-11-22.txt
dig @ns1.example.net example.com MX > /root/apex-mx-example.com-2026-11-22.txt
If you edit in a console, copy the apex record list into a dated note as well. A CNAME in the answer for example.com, or an A lookup that returns a CNAME and then a different name, is the alias. SOA and NS on that same name are the other data section 4.2.1 requires.
Fix
Before the change, save the apex NS and AAAA answers in files of their own, next to the SOA, CNAME, A and MX files saved above.
dig @ns1.example.net example.com NS > /root/apex-ns-example.com-2026-11-22.txt
dig @ns1.example.net example.com AAAA > /root/apex-aaaa-example.com-2026-11-22.txt
Risk: Deleting the apex CNAME and publishing an address stops the name from following the old target. Browsers, mail and any service that used the alias then use the records you add. A wrong address sends them to the wrong host.
In the zone the parent actually delegates to, delete the CNAME on the apex. Leave the SOA and the NS records in place. Add the A record, and the AAAA record if you use IPv6, for the address that should answer for example.com. Add MX records on the apex only if this domain receives mail, and do not add them beside a CNAME. Do not add a new CNAME on the apex.
www.example.com can still be a CNAME, because that name is not the top of the zone, provided it has no records of its own.
To undo it: delete only the A and AAAA records you added, the ones the saved A and AAAA files do not show, and put back the CNAME shown in the saved CNAME file. The restored CNAME again shares the apex with SOA and NS, so the undo returns the name to the fault you started with. Keep it only while you correct a bad address, then replace it with the correct address records.
Example (illustrative): the console for example.com has example.com CNAME sites.example.net plus the SOA and NS records the host added itself. dig @ns1.example.net example.com A returns the CNAME and then an address for sites.example.net. The website should be 192.0.2.10. The administrator deletes the apex CNAME and adds example.com A 192.0.2.10. www is a CNAME to example.com and stays that way.
Confirm the fix
dig @ns1.example.net example.com CNAMEreturns no CNAME.dig @ns1.example.net example.com SOAanddig @ns1.example.net example.com NSstill return the zone's own SOA and name servers.dig @ns1.example.net example.com Areturns the address you published, and the reply is not a CNAME restart.- If the domain receives mail,
dig @ns1.example.net example.com MXreturns the mail hosts, on the apex, with no CNAME.
What to watch afterwards
- When a form offers CNAME on
@, that is the apex. Put the address on@instead. - Keep
wwwas a CNAME only ifwwwhas no other records. - If the lookup still shows the CNAME, the parent may be delegating to a different set of servers from the zone you edited.
Read next
Related articles you may want next.
- TroubleshootingMX and CNAME at the same name: mail breaks because a CNAME owns the nameAn MX and a CNAME at the same name conflict. RFC 1034 says no other data should be present beside a CNAME. RFC 5321 says a CNAME found in the mail lookup is followed.Read article
- Troubleshootingdig NXDOMAIN for a subdomain that should existdig returns NXDOMAIN for a subdomain you expected. Read the status without +short, ask the authoritative server, and check a cached name error before you add the record.Read article
- HostingApplication Email Rejected or Junked After a Server Move: SPF, DKIM, DMARC and PTRApplication mail bouncing or junked after a migration? Read Authentication-Results, then fix SPF, DKIM, DMARC alignment, PTR and Microsoft 365 relay settings for the new path.Read article
Risks and limits
- RFC 1034 uses "should", not a separate error string. A DNS host may describe the refusal in its own words.
- A product feature that answers the apex from somewhere else, under a name other than CNAME, is not defined in RFC 1034. Follow that host's own documentation for the feature.
Sources
- RFC 1034: Domain Names - Concepts and Facilities — IETF, November 1987, accessed 22 November 2026
- BIND 9.18.44 manual pages: dig — ISC, no date shown, accessed 22 November 2026
This article was originally published on .