web dev//DNS//apex
The apex is the domain with nothing in front of it: `example.com`, as opposed to the subdomain `www.example.com`; it is also called the **naked domain**. In a zone it is written `@`. The two behave differently because of one rule of the DNS standard: a CNAME is not allowed at the apex. The apex already carries records that are mandatory for the domain to exist, and a CNAME cannot share a name with any other record.
The apex is the domain with nothing in front of it: example.com, as opposed to the subdomain www.example.com; it is also called the naked domain. In a zone it is written @. The two behave differently because of one rule of the DNS standard: a CNAME is not allowed at the apex. The apex already carries records that are mandatory for the domain to exist, and a CNAME cannot share a name with any other record.
A subdomain can therefore be pointed at a hosting platform with a CNAME from any DNS provider, while the apex cannot. Cloudflare gets around the rule with a technique of its own, CNAME flattening, which resolves the alias internally and answers with addresses; it can only do that inside its own DNS.
Serving a site on the bare domain from Pages is what forces the nameservers to move to Cloudflare. With www alone, a CNAME at the old DNS provider would have been enough.