What is the difference between an A record and a CNAME record?

An A record maps a hostname directly to an IPv4 address. For example, it can point example.com to the public address of a web server. An AAAA record performs the same job for IPv6. These records are useful when the destination has a stable address supplied by the hosting provider.
A CNAME record makes one hostname an alias of another hostname. A www record might point to example.com, or a service subdomain might point to a vendor’s assigned name. DNS then resolves the target name to its address. If the vendor changes the underlying address, the alias continues to follow the target.
Standard DNS rules do not allow a CNAME at a name that also has other records, and the root domain normally has records such as SOA and NS. Some DNS providers offer ALIAS, ANAME, or CNAME flattening features for the root. These provider-specific features return address results while accepting a hostname as the configured target.
Use the record type specified by the service you are connecting. Enter only the hostname or address requested and avoid including https://, a path, or a trailing page name. After saving, check the authoritative response and confirm that the hosting platform has the same domain registered on its side.