PoolByte

DNS records: Use A, AAAA, CNAME, MX and TXT correctly

· PoolByte

DNS records: Use A, AAAA, CNAME, MX and TXT correctly

DNS records connect your domain name to services such as websites and email. A significant portion of the problems arise from choosing the wrong record type or changing the correct record in the wrong DNS panel. First determine which service you are editing: Pointing the site to a new server is not the same as moving email to another provider. In this guide, you will find the functions of the five basic record types and the points you need to look for before making changes.

Find the authoritative DNS panel before the change

The company you purchased the domain name from, your hosting account and the service you use to manage DNS may be different. Just because you are editing records in cPanel does not mean that the servers responding on the internet are necessarily cPanel servers. Check the current nameserver information of the domain and make the change in the authorized DNS service.

Create a maintenance note and export existing records or save values securely. Include the email provider, verification services and subdomains running on a separate server in this note. Deleting every old record that appears in the panel as unnecessary may break a working connection. If the nameserver side is unclear, read DNS propagation guide first.

A record: Binds to IPv4 address

The A record maps a name to an IPv4 address. For example, you enter the address given for the web server in the root name of your domain and, if necessary, the relevant subdomain. The example address here is for documentation: example.com A 192.0.2.10. When applying it to your own site, you should use the real server information provided by the provider.

The full web address is not written into the A record. https://, instead of adding a file path or port, only the appropriate IP address is used. Also, pointing to IP does not mean that the server has configured the site for the relevant domain. Even if the DNS is correct, if the server does not recognize the domain name, you may see a default page or incorrect certificate.

AAAA registration: IPv6 requires separate control

The AAAA record matches the IPv6 address. Just because your A record for IPv4 is correct does not prove that the visitor coming via IPv6 will reach the correct server. During hosting migration, if A is updated and AAAA remains on the old server, different results may be seen depending on the connection type.

Do not create random AAAA without confirming that your server and DNS service support IPv6. If you need to remove or modify an existing record, first determine which service it is used for. It is useful to examine IPv4 and IPv6 responses separately in case of symptoms such as errors appearing on some phones and working on the desktop.

CNAME aliases a subdomain to another name; the destination is not an IP address. For example, the format www.example.com CNAME example.com ensures that the www name follows the resolution of the actual name. CNAME is not an HTTP redirect: The web server handles the task of converting the browser address bar to another URL.

In standard CNAME rules, other record types cannot co-exist under the same name. Due to mandatory records in the root domain, not every DNS panel supports the use of classic CNAME for the root name. Do not treat provider attributes such as ALIAS, ANAME, or flattening as the same as standard CNAME; Follow the documentation of the relevant service. Unnecessarily long CNAME chains also make error investigation difficult.

MX record: Determines the destination of incoming email

MX records indicate servers that accept email. A lower priority number indicates the preferred target; registration numbers are not mailbox quotas. Use the server name specified by the email provider as the value. Do not type an IP or website address of your own choosing in the MX field.

When you change the web server's A record, the MX may remain the same, but indirect impact may occur if the MX target depends on the same name that has changed. Therefore, also check the A and AAAA records of the target name during migration. If you are using an external email service, consider all the necessary records of the provider together; The operation of web DNS alone does not verify mail flow.

TXT record: Verification and email policies

TXT carries text-based information. It is used in different jobs such as domain authentication, SPF, DKIM and DMARC. Follow exactly the registration name and value given by a service; Do not guess the punctuation within the value and change it. Do not manage the SPF policy by randomly creating a second SPF record as you add different senders.

If the DNS panel automatically adds the full domain name, it may be necessary to enter only the expected short name. The input format between _dmarc and _dmarc.example.com depends on the behavior of the panel. Checking the real name by querying it externally after the process will allow you to notice a TXT record in the wrong place.

Apply a small change control

Imagine setting up a website for the first time and the email remains with another provider. If your modification scope is a web-only target, edit the web A/AAAA and www relationship; keep mail records intact. Then examine both the root address and the www address, HTTPS, and a real email sending/receiving test.

  1. Confirm that the record is held in the correct DNS service.
  2. Save the old value and rollback step.
  3. Check the record name, type, destination and TTL field separately.
  4. Compare different analyzer results with proxy response.
  5. Test not only DNS, but also the relevant web or mail service.

When reviewing domain management options, also ask where DNS management will be done. Clarify which IP and nameserver information you will use for Web hosting installation. If you are unsure of the role of the current record, contact for support without sharing secret keys.

Frequently asked questions

Does changing the DNS record transfer the domain name?

No. Changing the DNS target is different from changing the domain registrar. Planning hosting, DNS and domain transfer separately reduces the possibility of errors.

Does lowering TTL immediately purge existing stale responses?

Previously cached responses may continue to be used according to their previous expiration date. The new TTL does not immediately send renewal orders to all devices. Plan the change in advance if possible.

If the ping is successful, are the DNS and site completely correct?

A single test is not enough. The web request, HTTPS certificate, www/root address difference and mail flow should also be checked. Ping response may not indicate that your application is working properly.

Resources