DNS Records Explained: A, CNAME, MX and TXT
What the common DNS record types do, one rule about CNAME records that catches people out, and how to change DNS safely.
What the common DNS record types do, one rule about CNAME records that catches people out, and how to change DNS safely.
DNS maps names to the information needed to reach services. You manage it with records at your DNS provider. This guide covers the types most small sites use.

An A record points a name to an IPv4 address. An AAAA record does the same for an IPv6 address. They are typically used to point a domain to a server.
A CNAME makes one name an alias of another name. It is common for pointing "www" at a hosting provider's address. The key rule comes from the DNS standard: if a CNAME exists at a name, no other data should exist at that name (RFC 1034, section 3.6.2; RFC 2181, section 10.1 makes this stricter, allowing only DNSSEC-related records). The root of your domain, also called the apex, already holds records such as NS and SOA, and often MX and TXT, so a plain CNAME at the apex is not allowed. Some providers offer proprietary workarounds with names like ALIAS or "CNAME flattening". Whether yours does depends on the provider, so check its documentation.

MX records say which mail servers receive email for the domain. Changing the website's DNS must not remove them or your email can stop.
TXT records hold text. Services use them to verify domain ownership and to publish email authentication settings such as SPF.
The nameservers for your domain decide where your DNS records live. If you switch nameservers, the records at the old provider stop applying. Anything not copied to the new provider, such as email, verification or subdomain records, stops working. The DNS change check on this site helps you list what needs copying.