MX Records vs. A Records vs. CNAME

Written by Web Hosting Expert

October 2, 2025
MX Records vs. A Records vs. CNAME

The Domain Name System (DNS) acts like the internet’s phonebook, translating domain names into the information needed to reach websites, email servers, and other services. Within DNS, records like A, CNAME, and MX are fundamental building blocks that ensure web traffic, emails, and connections are routed correctly.

Each serves a distinct purpose, whether pointing a domain to an IP address, linking domain names, or handling email delivery. In this article, we will break down what A Records, CNAME Records, and MX Records are, how they work, and when you should use each to maintain a reliable and well-functioning online presence.

What Are DNS Records?


DNS records are instructions stored in the Domain Name System (DNS) that tell the internet how to handle requests for a domain. They connect domain names to the correct servers or services, ensuring users reach the intended website, email inbox, or application.

Since domains support a range of functions, such as website hosting, email management, and integration with third-party platforms, different types of records exist to manage these tasks efficiently.

Among the most essential are A Records, which map domains to IP addresses; CNAME Records, which point one domain to another; and MX Records, which route email traffic to designated mail servers. Together, these records form the backbone of how the internet delivers content and communication reliably.

20%

💸EXTRA 20% OFF ALL VERPEX CLOUD WEB HOSTING PLANS

with the discount code

AWESOME

Save Now

What is an A Record?


An A Record, short for "Address Record," maps a domain name directly to an IPv4 address, allowing browsers to locate and load websites. It acts as a bridge between a human-friendly domain name and the numeric IP address where the website or service is hosted.

For example, an A Record might connect example.com to 192.0.2.1. When a user types the domain into their browser, the A Record tells the internet which server to contact.

Key use cases for A Records include hosting websites, pointing subdomains (like blog.example.com) to specific servers, and directing traffic to applications or services.

Always use a direct IP address with an A Record for your primary domain to ensure faster resolution and reduce dependency on additional DNS lookups.

What is a CNAME Record?


A CNAME Record, or "Canonical Name Record," points one domain name to another domain name instead of an IP address. It tells DNS resolvers that the domain is an alias of another, making it easier to manage multiple domain names across services.

For example, blog.example.com might have a CNAME Record pointing to example.com. When someone visits blog.example.com, they are seamlessly redirected to the same destination as example.com.

Key use cases for CNAME Records include managing multiple services under one domain, linking subdomains to external services (like Shopify or Squarespace), and simplifying updates by only changing the main target.

You cannot use a CNAME Record at the root level (@) of a domain because the root often needs other record types (like A or MX Records) to function properly.

What is an MX Record?


An MX Record, or "Mail Exchange Record," directs email traffic to the correct mail servers for a domain. It tells email-sending systems where to deliver messages addressed to users at a particular domain.

For example, an MX Record for example.com might point to mail.provider.com with a priority value like 10. When someone sends an email to [email protected], the internet uses the MX Record to find and deliver the message to the correct mail server.

Key use cases for MX Records include setting up business email services like Google Workspace, Microsoft 365, or custom email hosting platforms.

MX Records often have priority values that determine which mail server should be used first. Lower numbers represent higher priority. If the first server is unavailable, the system will try the next one based on priority, ensuring reliable email delivery.

Comparison Table: MX Record vs. A Record vs. CNAME Record


FeatureMX RecordA RecordCNAME Record
Full NameMail Exchange RecordAddress RecordCanonical Name Record
Points ToMail server domain (e.g., mail.provider.com)IP Address (e.g., 192.0.2.1)Another domain name (e.g., example.com)
Primary FunctionRoute email to the correct mail serverDirects traffic to a website or serverCreates an alias to another domain
Common Use CasesBusiness or custom email setupWebsite hosting, subdomainsRedirecting subdomains, third-party services
Works for Root Domain?YesYesNo
Supports Prioritization?Yes (uses priority values)NoNo
Can Be Used Together?Yes (used with A or CNAME for mail server target)Yes (with MX, TXT, etc.)No (should not coexist with A or MX for same name)
Typical Formatexample.com → mail.provider.com (priority 10)example.com → 192.0.2.1blog.example.com → example.com
LimitationsNeeds proper priority and server configIPv4 only (use AAAA for IPv6)Cannot be used on root domain

How to Access and Modify DNS Records


Managing DNS records is typically done through your domain registrar or hosting provider's control panel. Whether you are updating an A Record to point to a new server or changing MX Records to configure email, knowing where and how to make these changes is essential for maintaining your website and services.

  • Log in to your domain registrar or web hosting account: This could be Verpex Cloudflare, or wherever your domain is registered or managed.

  • Navigate to the DNS Management or Zone Editor section: This is usually found under settings for the specific domain you want to update.

  • Locate existing records: You will see a list of current DNS records, typically including A, CNAME, MX, TXT, and possibly others.

  • Add, edit, or delete records as needed: Use A Records to point to an IP address, CNAME Records to alias one domain to another, and MX Records to route email to the correct mail servers.

  • Set TTL (Time to Live): Adjust TTL if needed to control how quickly changes propagate. A common temporary value is 300 seconds (5 minutes).

  • Save your changes: Do not forget to save or apply the changes; unsaved edits will not take effect.

DNS changes might not reflect immediately due to propagation time. Always verify with a tool like DNSChecker or by using nslookup or dig from the command line.

Importance of DNS Propagation Time


DNS propagation refers to the time it takes for updated DNS records, such as A, CNAME, or MX records, to be recognized across the global network of DNS servers. When a change is made, it must ripple through recursive resolvers, ISP caches, and local devices, all of which may hold onto previous DNS information until their caches expire.

1. Role of TTL in Propagation

The Time to Live (TTL) setting determines how long a DNS record should be cached before refreshing. A high TTL (e.g., 86400 seconds) means the record will persist longer, potentially delaying updates. In contrast, a low TTL (e.g., 300 seconds) prompts faster refreshes, making it ideal when preparing for DNS changes.

2. Why Propagation Varies by Location

DNS servers around the world do not all update at the same time. A user in one region may see the new server settings immediately, while another in a different location continues to be routed to outdated information. This geographical inconsistency is a natural part of propagation and usually resolves within 24–48 hours.

3. When Propagation Time Becomes Critical

DNS propagation becomes especially important during high-impact changes, such as switching web hosts, updating email services, or moving to a new domain. Without accounting for the delay, users may experience broken websites, bounced emails, or downtime. Planning with propagation time in mind is key to avoiding service interruptions.

4. How to Minimize Disruption

To reduce the impact of propagation delays, it is best to lower your TTL setting to a shorter value, typically 300 seconds, at least 24 hours before making any DNS changes. After confirming successful propagation, you can raise the TTL again to balance performance and query load on your DNS servers.

5. Verifying Propagation Progress

After making DNS updates, you can monitor propagation status using tools like DNSChecker.org, which show how changes are being picked up across different regions. Additionally, flushing your local DNS cache ensures that your system retrieves the updated records instead of showing cached results.

Understanding how DNS propagation works helps prevent misdiagnosing issues during DNS changes. Rather than assuming something is broken, you will recognize it may simply be a matter of waiting.

How to Know Which One to Use


  • Use an A Record when hosting a website: If you need to point your domain directly to a server’s IP address, such as for website hosting or a web application, an A Record is the right choice. It connects the domain to the server’s location using a static IPv4 address.

  • Use a CNAME Record when redirecting a subdomain: When you want to create an alias for a subdomain, like pointing blog.example.com to example.com or a third-party service such as Shopify or GitHub Pages, CNAME Records make this easy to manage, especially when the target domain may change.

  • Use an MX Record when setting up email: If you are configuring email services like Google Workspace, Microsoft 365, or a custom mail server, MX Records direct incoming messages to the correct mail servers. They use priority values to manage email failover.

Do not confuse A Records and CNAME Records, A Records point to IPs, while CNAMEs point to domain names. Also, never use a CNAME at the root level (@) of your domain, as it can break other essential DNS functions like email or verification records.

Common DNS Mistakes and Troubleshooting Tips


1. Avoid using a CNAME record at the root domain: The root domain (e.g., example.com) should never have a CNAME record because it conflicts with other essential DNS records like A, MX, and TXT. Instead, use an A or AAAA record to ensure your core services function correctly without disruption.

2. Never assign both an A and a CNAME record to the same name.: A single subdomain cannot have both record types at once; doing so causes a conflict, leading DNS resolvers to ignore one or fail altogether. Always choose the appropriate record type for the task and stick with it.

3. Do not point a CNAME record to an IP address: CNAME records are designed to point to domain names, not numeric IP addresses. If your destination is an IP, use an A record (for IPv4) or an AAAA record (for IPv6) to avoid resolution issues.

4. Set correct priority values when configuring MX records: MX records must include priority numbers, with lower values indicating higher priority. Failing to configure these properly can cause mail servers to misroute or delay email delivery, especially if redundancy is needed.

5. Ensure MX records do not point to CNAMEs: Mail Exchange records must resolve through A or AAAA records, not CNAMEs. Referencing a CNAME in an MX setup can break mail delivery entirely, making proper structure critical for reliable email routing.

6. Always save changes after modifying DNS records: It is easy to overlook clicking “Save” or “Apply Changes” in your domain or hosting dashboard, but without this final step, your updates will not take effect, and services could remain misconfigured.

7. Update your DNS records promptly after changing providers: When switching hosting or email services, remember to update your A, MX, or other relevant records. Failure to do so can result in website downtime or lost email until the correct values are in place.

8. Be aware of DNS propagation delays: Changes to DNS records do not take effect instantly; they may take minutes or up to 48 hours to spread across global DNS servers. Patience is essential, especially during major updates like server migrations.

9. Adjust TTL values to control propagation speed: The Time to Live (TTL) setting affects how long DNS records are cached. Lower the TTL (e.g., to 300 seconds) before making updates to allow quicker changes, and increase it again afterwards to reduce query load.

10. Flush your local DNS cache after making changes: Your computer may still use outdated DNS data after a change. To see updated results, flush your local cache. On Windows, use ipconfig /flushdns; on macOS, run sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder in the terminal.

90%

💰 90% OFF YOUR FIRST MONTH WITH ALL VERPEX RESELLER HOSTING PLANS

with the discount code

MOVEME

Use Code Now

Conclusion


A Records, CNAME Records, and MX Records each play a vital role in keeping websites, emails, and online services running smoothly. A Records connect domain names to IP addresses for website hosting, CNAME Records create aliases to simplify domain management, and MX Records ensure that emails reach the correct mail servers.

Setting up the right DNS records correctly is crucial for maintaining website uptime, email reliability, and overall domain performance. Even small mistakes can lead to broken websites or lost emails.

Whenever you switch hosting providers, update email services, or make changes to your domain, it is important to review and verify your DNS settings carefully. Regular checks help catch issues early and keep your online presence stable and secure.

Frequently Asked Questions

What is a TXT Record, and why is it important for email services?

A TXT record (also called a text record) is used to store human-readable information in the Domain Name System. It plays a key role in verifying domain ownership and is critical for email security, helping prevent spoofing and improving the trustworthiness of inbound and outbound email. It supports services that send mail from your domain by validating email server identities.

Can I use multiple DNS records for one domain name?

Yes, you can configure multiple records for a single domain name to support various services. For example, you might have an A record pointing to one IP address, an MX record for incoming mail, and a TXT record for email verification, all under the same host name or level domain. This flexibility allows one website to support different functions.

How do NS Records work with a domain registrar?

NS records (Name Server records) tell the internet which DNS server is authoritative for your domain. These are set through your domain registrar and are essential for pointing traffic to the correct host record. If your NS records point to a different host, you must update them to match your DNS provider.

What’s the only difference between MX Records and A Records?

The only difference lies in their function. MX records point to the email server responsible for handling incoming mail, while A Records map a domain to an IP address. Though both are part of the Domain Name System, they serve entirely different purposes.