An apex domain is the registered domain name itself, such as example.com, written without any subdomain label in front of it; in DNS terms it is the name at the zone apex, the point where a zone’s SOA and NS records live. In the vocabulary of domain names on the Internet it is also called the root domain or naked domain, although the first synonym is easily confused with the DNS root.
The apex matters because it carries special technical constraints. It must hold the zone’s administrative records, which is why a CNAME is forbidden there, and it is the address that many users type first, so hosting, email and certificate decisions often begin at the apex.
What defines the apex of a domain
The apex is defined by where a DNS zone begins, not by how many labels a name has. For example.com, the apex is the second-level domain that the registrant obtained from a registrar. Under country codes with a registration layer, such as example.co.uk, the apex has three labels because co.uk is a public suffix.
Tools that need to find the apex automatically, such as browsers setting cookies or certificate authorities checking scope, rely on the Public Suffix List to decide where the registrable part of a name starts. The table below shows how the apex relates to other levels of a hostname.
| Level | Example | Who controls it |
|---|---|---|
| DNS root | The trailing dot | Root zone operators under IANA |
| Top-level domain | com, de, org | Registry operator |
| Public suffix | com or co.uk | Registry, listed in the Public Suffix List |
| Apex domain | example.com or example.co.uk | Registrant through the registrar |
| Subdomain | shop.example.com | Registrant through its DNS zone |
Why a CNAME cannot exist at the apex
A CNAME cannot exist at the apex because the DNS standards require that a name holding a CNAME hold no other data, while every zone apex must hold SOA and NS records. RFC 1034 and later clarifications make these two rules incompatible, so a compliant authoritative server rejects an apex CNAME.
This becomes a practical problem when a site is hosted on a platform that provides only a hostname, such as a content delivery network or a load balancer whose IP addresses change. A subdomain can simply point a CNAME at that hostname, but the apex needs another mechanism to follow the target.
| Method | How it works | Main trade-off |
|---|---|---|
| Static A and AAAA | Apex holds fixed IPv4 and IPv6 addresses | Breaks if the provider changes addresses |
| ALIAS or ANAME | DNS provider resolves the target and answers with addresses | Proprietary, not portable between providers |
| CNAME flattening | Provider follows the CNAME chain at query time | Geographic routing may be less precise |
| HTTPS or SVCB record | AliasMode record points the apex to a target name | Client support is still incomplete |
| Redirect to www | Apex A record reaches a server that issues an HTTP 301 | Requires a small redirect service |
The HTTPS and SVCB record types, standardized in RFC 9460, are the first standards-based answer to the apex aliasing problem, but A and AAAA records remain necessary as a fallback for clients that ignore them.
Apex domain versus the www subdomain
The apex and the www subdomain are separate names that can serve the same website, and operators must choose which one is the canonical address. Both must resolve, and one should redirect permanently to the other so that search engines index a single version.
| Aspect | Apex as canonical | Subdomain www as canonical |
|---|---|---|
| Appearance | Shorter and cleaner in marketing | Conventional and instantly recognized |
| CDN integration | Needs ALIAS, flattening or static addresses | A plain CNAME works |
| Cookie scope | Cookies set on the apex can reach all subdomains | Cookies stay isolated to www |
| Operational flexibility | Harder to move between providers | Easier traffic steering and failover |
The cookie scope issue is often overlooked: when a site sets cookies for example.com with a domain attribute, browsers send them to every subdomain, including unrelated services, which adds bandwidth and potential security exposure.
Records commonly published at the apex
Beyond the mandatory SOA and NS records, the apex usually holds the records that describe the domain as a whole. Because email addresses and verification checks use the bare domain, these records must be placed at the apex rather than on a subdomain.
- MX records that route mail for addresses such as info@example.com.
- TXT records carrying SPF policies and ownership verification tokens.
- CAA records that restrict which certificate authorities may issue certificates.
- DS records at the parent, linking the apex to the DNSSEC chain of trust.
- A, AAAA or HTTPS records that point web traffic for the bare name.
DMARC is the notable exception: its policy lives at _dmarc.example.com, a dedicated label below the apex, so that it does not crowd the apex TXT record set.
Common mistakes with apex domains
Most apex problems arise when operators configure only one of the two common hostnames or treat the apex like an ordinary subdomain. The table lists frequent errors and their corrections.
| Mistake | Consequence | Correction |
|---|---|---|
| No record for the apex | Typing the bare domain shows an error | Add A, AAAA or ALIAS records with a redirect |
| Certificate covers only www | Browser warning on the bare domain | Include both names in the certificate |
| CNAME added at the apex | Zone rejected or mail delivery breaks | Use ALIAS, flattening or static addresses |
| Missing AAAA record | IPv6-only clients cannot connect | Publish IPv6 addresses for the apex |
Some DNS control panels once accepted an apex CNAME silently; the record then shadowed the MX records, and mail delivery failed even though the website worked. Testing mail and web separately after any apex change avoids this trap.
Understanding it simply
Think of a domain as a street address. The apex domain is the main building number, such as example.com, while subdomains such as shop.example.com are individual apartments inside that building.
The main address has duties the apartments do not have. It holds the official details about who manages the building and where mail goes, so it cannot simply forward everything elsewhere. That is why setting up a website on the bare domain sometimes needs a special arrangement with the DNS provider.
Applied in practice
A small online bookstore moves its website to a content delivery network that provides only a hostname, such as bookstore.cdn-provider.net. The www subdomain gets a simple CNAME to that hostname, but the apex bookstore.example cannot. The DNS provider offers CNAME flattening, so the administrator creates a flattened record at the apex that returns the network’s current IPv4 and IPv6 addresses.
The apex keeps its MX and SPF records for the shop’s mail, and the web server issues an HTTP 301 from www to the bare domain, which the owner prefers for branding. A certificate covering both names is installed. After the switch, both addresses load in under a second, mail keeps flowing, and search results consolidate on one canonical apex address.