DNS records explained: A, CNAME, MX and TXT
Your website and email can share a domain while relying on different DNS records. Learn which record to change and what to check before you do.

Connecting a domain to a website does not always require changing its nameservers. DNS acts as a directory between your domain and the services you use. Updating the right record can help you move a website without interrupting email.
Find the authoritative DNS service
Your registrar, web host and DNS provider may be different companies. Make changes at the DNS service identified by the domain’s NS records. Adding a record in an unused control panel will not change what visitors see.
Before editing anything, export your existing zone or keep a secure copy of its records. Pay attention to MX and TXT records, aliases and subdomains. If you are changing nameservers, recreate the required records at the new provider first.
A and AAAA: a server’s IP address
An A record maps a name to an IPv4 address. An AAAA record maps it to an IPv6 address. Use the values supplied by your host. Updating A while leaving an old AAAA record in place can send some visitors to the old server.
Type: A
Name: @
Value: 192.0.2.10
This address is reserved for documentation and must not be used as a live hosting value. Many panels use @ for the domain’s root; others expect an empty name. Check the format your provider requires.
CNAME: an alias for another name
A CNAME maps one name to another hostname. You might use it to connect www to a target supplied by your provider. Do not include https:// or a page path. A CNAME is not an HTTP redirect and does not change the address shown in a visitor’s browser.
Standard DNS rules do not allow a CNAME to coexist with other record types at the same name. Some providers offer ALIAS, ANAME or CNAME flattening for the zone root. Use those features according to the provider’s documentation.
MX: where incoming mail is delivered
MX records identify the mail servers that receive messages for your domain. Their targets are normally hostnames, not IP addresses. A lower preference number is tried before a higher one.
Moving web hosting does not necessarily mean moving email. If your mail stays with its current provider, preserve its MX and authentication records. Do not mix old and new MX entries without understanding the intended mail routing.
TXT: verification and email policies
TXT records can verify domain ownership, publish SPF policies or hold DKIM public keys. A name can have multiple TXT records, but publishing multiple separate SPF policies for the same name can cause an SPF evaluation error.
Copy verification values in the format your service specifies. Avoid manually modifying long DKIM keys. Check whether your control panel adds quotation marks for you.
Check the result after making changes
- Confirm the new value is visible at the authoritative DNS servers.
- Check both the root domain and www, ideally from more than one network.
- If email is affected, test inbound and outbound delivery separately.
- Keep the previous settings until you have verified the change.
TTL describes how long a record may be cached. Lowering it now does not shorten the lifetime of old records that have already been cached. A single result from your own computer is not enough to establish that every user is seeing the new value.
Sources: Cloudflare’s DNS record reference. For domain selection and service connections, explore the DomainQ domain guide.

