DNS Records Explained: A Practical Guide to A, CNAME, MX, TXT, and SPF Settings
DNS connects your domain name to websites, email services, verification tools, and security systems. This practical checklist explains the records you are most likely to edit, shows what to enter in common scenarios, and gives you a safe way to track changes and troubleshoot problems.
Overview
The Domain Name System, or DNS, acts like a directory for your domain. When someone visits example.com, sends email to an address at that domain, or a service checks whether you control the domain, DNS records provide the instructions that service needs.
DNS is usually managed at the company hosting your domain’s authoritative nameservers. That may be your domain registrar, web host, DNS provider, or a separate platform. Before changing anything, confirm where DNS is managed. Editing records in the wrong dashboard will not affect the live domain.
DNS records generally include a name or host, a record type, a value or destination, and sometimes a time to live (TTL). The interface may also ask for a priority, especially for email records. A host field containing @ usually means the root domain, such as example.com; a host field containing www refers to www.example.com. Interfaces vary, so follow the provider’s field labels when they differ.
For broader context on registration, privacy, SSL, and email, see the Domain Name Setup Guide. DNS is one part of domain management; it does not replace web hosting, an SSL certificate, or an email mailbox.
Core record types
- A record: Sends a hostname to an IPv4 address. A common example is the root domain pointing to a web server’s IPv4 address.
- AAAA record: Sends a hostname to an IPv6 address. Add it only when your hosting or network provider gives you an IPv6 destination.
- CNAME record: Points one hostname to another hostname, such as
wwwpointing to a hosting platform’s assigned hostname. It is not normally entered as an IP address. - MX record: Identifies the mail servers responsible for receiving email for a domain. MX records use a destination hostname and a priority value.
- TXT record: Stores text used for domain verification, email authentication, and other service instructions.
- SPF: SPF is published as a TXT record. It identifies which systems are permitted to send email for your domain. The SPF policy must be supplied by your email provider.
Checklist by scenario
Connecting a website
- Read the hosting provider’s setup instructions and identify whether it requires an A record, AAAA record, CNAME, or a combination.
- For a root domain, enter the supplied IPv4 address in an A record with the host set to
@, if that is what the provider requests. - For
www, use the provider’s requested CNAME or A record. A typical CNAME destination is a provider hostname, not a URL withhttps://. - Check for old, conflicting records. Two A records may be intentional in some setups, but an outdated address can send visitors to the wrong server.
- Complete the hosting provider’s domain verification and SSL steps after the DNS change. DNS routing and HTTPS activation are related but separate tasks.
If you are choosing a host before configuring DNS, the comparison checklist in How to Choose the Best Web Hosting can help you record the technical requirements first.
Setting up business email
- Copy every MX record supplied by your email provider, including each destination and priority.
- Remove old MX records only when you are certain the domain has moved to the new mail service. Leaving unrelated MX records in place can produce inconsistent delivery.
- Add the provider’s SPF instruction as a TXT record at the root domain, commonly represented by
@. - Do not create multiple separate SPF TXT policies for the same domain. Combine authorized sending mechanisms according to the email provider’s instructions.
- Add any additional TXT records requested for verification or email authentication. Keep each value exactly as provided, including punctuation and quotation handling required by the DNS interface.
- Test both sending and receiving with more than one mailbox, and confirm that existing addresses still work.
Business email deserves a change plan because a DNS mistake can affect delivery even when the website remains online. Record the old MX and TXT values before editing them.
Verifying domain ownership
- Choose the verification method offered by the service, such as a TXT record, CNAME, or HTML file.
- Enter the exact host and value. A verification token is not interchangeable with an A record or a web address.
- Do not delete the verification record until you understand whether the service checks it only once or periodically.
- After the service confirms ownership, document the record and its purpose so it is not removed during a later cleanup.
Moving a domain or website
- Export or copy the current DNS zone before changing nameservers, hosting, or registrar settings.
- Recreate essential website, email, verification, and security records at the new DNS provider.
- Lowering TTL ahead of a planned migration may help caches refresh sooner, but it does not guarantee immediate worldwide change.
- Keep the old service available while testing the new configuration when practical.
- Check the root domain,
www, email receipt, email sending, redirects, and third-party integrations before closing the old account.
Simple change-tracking template
Keep a copy of this information in your site documentation:
- Date and time of change, including time zone
- DNS provider and domain affected
- Record host, type, old value, and new value
- Reason for the change and the requesting service
- TTL, priority, or other settings
- Tests performed and the result
- Rollback value and the person responsible for follow-up
What to double-check
Confirm the authoritative provider. Your registrar may not host your DNS. Look for the domain’s nameserver settings or ask the organization that manages the domain.
Separate hostnames from values. In a CNAME, the host might be www and the value might be sites.example-host.com. Do not paste the complete web address unless the provider specifically requests it.
Check root-domain limitations. Standard CNAME records generally cannot coexist with other records at the same name. Some DNS providers offer a provider-specific alternative for pointing the root domain to a hostname. Use the provider’s documented option rather than guessing.
Review MX priorities. A lower numerical priority commonly indicates preference over a higher one, but follow the email provider’s instructions exactly. MX destinations should be hostnames, not ordinary web URLs.
Review SPF as a complete policy. SPF is not a button or a separate DNS type in most dashboards; it is text published in a TXT record. If several tools send mail for the domain, the authorized mechanisms need to be represented in the provider’s recommended policy.
Allow for caching. DNS changes may appear at different times because resolvers cache records according to TTL and local behavior. Test from more than one network or use a DNS lookup tool, but do not keep changing records simply because one location has not updated yet.
Common mistakes
- Editing the wrong DNS dashboard: Verify the active nameservers before making changes.
- Adding a second SPF policy: Consolidate the policy instead of creating multiple competing SPF TXT records.
- Deleting records without a backup: Save the existing zone and document records you do not immediately recognize.
- Using a URL where a hostname is required: A record values are IP addresses; CNAME and MX destinations are hostnames.
- Forgetting the root and
wwwseparately: Test both versions because they may use different records. - Assuming DNS controls everything: A correct record does not by itself configure your web server, WordPress site, redirects, mailbox, or SSL certificate.
- Changing several systems at once: Make related changes in a planned sequence so you can identify which change caused a problem.
For a complete launch sequence, combine this checklist with the Website Launch and Maintenance Checklist. If the issue is slow loading rather than incorrect routing, review the separate guidance on speeding up a WordPress site.
When to revisit
Review your DNS documentation before a seasonal planning cycle, a website redesign, an email-provider change, a hosting migration, or the launch of a new marketing and analytics tool. Revisit it whenever your workflows or tools change, especially when a vendor asks you to add verification, sending, tracking, or security records.
As a practical final checklist, schedule a short DNS review and confirm:
- You know which provider controls the authoritative DNS.
- The root domain and
wwwresolve to the intended website. - MX records point to the current email service.
- SPF and other TXT records match the services that actually use the domain.
- Old hosting, email, and verification records have been removed only after testing.
- The current records, owners, dates, and rollback notes are stored somewhere accessible.
Keep this record with your domain and hosting documentation. A small update before each migration or tool change can prevent a much larger outage later. For related decisions about registration, transfers, and renewal planning, see Best Domain Registrars.