Apex domain vs www
You set up example.com and www.example.com, and one opens the site while the other fails, or the DNS panel refuses a CNAME on the bare domain. The two are separate hostnames with separate records. The bare name, called the zone apex, also carries a restriction that www does not have.
Two names, two sets of records
example.com is the zone apex, while www.example.com is a separate hostname beneath it. A record on one does nothing for the other, so each must be configured, and a query for one tells you nothing about the other.
Why the apex usually cannot be a CNAME
A CNAME says “this name is an alias, look elsewhere”, and DNS does not allow other records beside it at the same name. The apex must hold the zone’s own SOA and NS records, so a standard CNAME cannot sit there. Providers therefore support A/AAAA directly at the apex and CNAME for www. Some offer proprietary flattening or ALIAS-like features that give the apex similar behaviour.
Which name should visitors end up on
Decide separately whether HTTP should redirect one public hostname to the other. DNS cannot redirect a browser. The redirect is the web server’s job, and both names have to reach a server for it to happen.
Checking each name on its own
Check the name and query type first, then the authoritative answer, then the recursive resolver you use. A recursive resolver can answer from cache, so what a user gets is not necessarily fetched from the authoritative server, and the TTL shows how long it remains usable. NXDOMAIN, SERVFAIL, REFUSED and a timeout are different conditions.
After a change, compare authoritative data with several resolvers. Clearing a local cache helps only when the stale answer is actually local. If neither name resolves, check the registration: 2ip domain information shows the registrar, status and expiry date.