Domains

DNS Records Explained: A, CNAME, MX, and TXT Records

By ReadyWebs Published

DNS Records Explained: A, CNAME, MX, and TXT Records

DNS records are instructions stored in your domain’s DNS zone file that tell the internet how to handle requests for your domain. Different record types serve different purposes: directing web traffic to your server, routing email to your mail provider, verifying domain ownership, and more. Understanding the common record types helps you manage your domain and troubleshoot issues.

A Records

An A record (Address record) maps your domain name to an IPv4 address. When someone types your domain into a browser, the A record tells their computer which server to connect to.

You need an A record pointing your domain (example.com) to your web hosting server’s IP address. If your hosting provider gives you an IP address like 192.168.1.1, you create an A record for your domain pointing to that address.

A records point to IP addresses only, not to other domain names. If your hosting provider gives you a hostname instead of an IP address, you need a CNAME record instead.

CNAME Records

A CNAME record (Canonical Name record) maps one domain name to another domain name. It creates an alias. When DNS resolves the CNAME, it follows the alias to find the actual IP address.

Common CNAME uses include pointing www.example.com to example.com (so both work), pointing subdomains to external services (blog.example.com to your-blog.hosting-service.com), and connecting your domain to platforms like Shopify, Squarespace, or GitHub Pages that provide a hostname rather than an IP.

You cannot create a CNAME record for your root domain (example.com) at most DNS providers because it conflicts with other record types. Root domains must use A records. Some DNS providers (like Cloudflare) offer CNAME flattening that works around this limitation.

How to Point Your Domain to Your Web Host

MX Records

MX records (Mail Exchange records) direct email to your mail servers. When someone sends an email to [email protected], their email server looks up your MX records to find where to deliver the message.

MX records include a priority value. Lower numbers mean higher priority. If you have multiple MX records, email is delivered to the highest-priority server first, with lower-priority servers acting as backups.

If you use Google Workspace for email, you set MX records pointing to Google’s mail servers. If you use Microsoft 365, you point to Microsoft’s servers. Your hosting provider’s email service has its own MX records.

TXT Records

TXT records store text information associated with your domain. They serve multiple purposes including domain ownership verification, email authentication, and security policies.

SPF (Sender Policy Framework) TXT records specify which servers are authorized to send email on behalf of your domain. This prevents spammers from forging your email address.

DKIM (DomainKeys Identified Mail) TXT records provide cryptographic email authentication, verifying that emails have not been altered in transit.

DMARC TXT records tell receiving email servers what to do with messages that fail SPF and DKIM checks.

Domain verification TXT records prove you own a domain to services like Google Search Console, Google Workspace, and various website platforms.

Setting Up Professional Email on Your Custom Domain

Managing DNS Records

Access your DNS records through your domain registrar’s dashboard or through your DNS hosting provider (which may be different from your registrar).

Changes to DNS records take time to propagate across the global DNS system, typically a few minutes to 48 hours. During propagation, some visitors may see old records while others see updated ones.

Always document your existing DNS records before making changes. A screenshot or spreadsheet of current records lets you revert quickly if something breaks.

Key Takeaways

  • A records point your domain to a server IP address for web hosting
  • CNAME records create aliases from one domain name to another
  • MX records direct email to your mail servers with priority-based routing
  • TXT records handle email authentication (SPF, DKIM, DMARC) and domain verification
  • DNS changes take minutes to 48 hours to propagate globally
  • Document existing records before making changes for easy rollback

This content is for informational purposes only and reflects independently researched guidance. Platform features and pricing change frequently — verify current details with providers.