How to mx records for a domain
Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.
Last updated: April 4, 2026
Key Facts
- MX records are crucial for email delivery to your domain.
- They consist of a priority number and a mail server hostname.
- Lower priority numbers indicate higher preference for mail servers.
- DNS propagation can take up to 48 hours after changes are made.
- Incorrect MX records will prevent emails from being received.
What are MX Records?
MX records, short for Mail Exchanger records, are a type of DNS (Domain Name System) record that specifies the mail servers responsible for receiving email on behalf of a domain name. When someone sends an email to an address at your domain (e.g., [email protected]), their email server queries the DNS for your domain's MX records to find out where to deliver the message.
Why are MX Records Important?
Without correctly configured MX records, email servers won't know where to send emails addressed to your domain. This means that any emails sent to your domain will either bounce back to the sender with an error or simply get lost. They are fundamental to the functioning of any email service associated with a custom domain.
How Do MX Records Work?
MX records contain two main pieces of information:
- Priority: A number assigned to the mail server. Lower numbers indicate higher priority. Email servers will attempt to deliver mail to the server with the lowest priority number first. If that server is unavailable, they will try the next lowest priority server.
- Hostname: The fully qualified domain name (FQDN) of the mail server that handles email for your domain.
For example, a typical set of MX records might look like this:
- 10 mail.yourdomain.com
- 20 backupmail.yourdomain.com
In this example, mail.yourdomain.com is the primary mail server (priority 10), and backupmail.yourdomain.com is a secondary server (priority 20) that will only be used if the primary server is down.
How to Set Up or Change MX Records
The process for setting up or changing MX records typically involves logging into the control panel provided by your domain registrar (where you purchased your domain name) or your DNS hosting provider (if you manage your DNS separately). The exact steps can vary depending on the provider, but the general process is as follows:
1. Access Your DNS Management Interface
Log in to your account with your domain registrar or DNS host. Look for a section labeled 'DNS Management,' 'Zone Editor,' 'Advanced DNS Settings,' or something similar.
2. Locate MX Records
Within the DNS management interface, find the section for managing DNS records. You'll need to add or edit MX records.
3. Enter the MX Record Details
You will typically need to provide the following information for each MX record:
- Type: Select 'MX'.
- Host/Name: This is usually left blank or set to '@' to indicate the root domain (e.g., yourdomain.com). Some providers might require you to enter the domain name itself.
- Priority: Enter the priority number (e.g., 10, 20).
- Value/Points To/Mail Server: Enter the hostname of the mail server provided by your email service (e.g., 'smtp.mailserver.com' or 'aspmx.l.google.com').
- TTL (Time To Live): This determines how long DNS resolvers cache the record. You can usually leave this at the default setting (often 1 hour or 3600 seconds).
You will likely need to add multiple MX records if your email provider offers backup mail servers.
4. Save Your Changes
Once you have entered all the necessary MX records, save the changes. Your DNS provider will then update the DNS records for your domain.
5. Wait for DNS Propagation
DNS changes are not instantaneous. It can take anywhere from a few minutes to 48 hours for the changes to propagate across the global DNS network. During this time, some email might still be routed according to the old records, while other email might be routed according to the new ones.
Where to Find MX Record Information
The specific MX record values (priority and hostnames) are provided by your email service provider. Common examples include:
- Google Workspace (formerly G Suite): Google provides a comprehensive set of MX records for its email service. You can find these on the Google Workspace admin help pages.
- Microsoft 365 (formerly Office 365): Microsoft also provides specific MX record configurations for its email service, detailed in their support documentation.
- Other Email Providers: Most web hosting companies and dedicated email providers will have instructions on their support websites detailing the correct MX records to use.
Troubleshooting Common Issues
- Typos: Double-check all hostnames and priority numbers for any spelling errors.
- Propagation Delay: Be patient; allow up to 48 hours for changes to take effect.
- Conflicting Records: Ensure you don't have old or incorrect MX records still listed. Remove any outdated entries.
- Incorrect Hostname Format: Make sure the hostname ends with a period if required by your provider (e.g., 'mail.example.com.').
Correctly configured MX records are essential for reliable email communication for your domain.
More How To in Technology
- How To Learn Programming
- How do I deal with wasting my degree
- How to code any project before AI
- How to make my website secure
- How to build a standout portfolio as a new CS grad for remote freelance work
- How do i learn programming coding
- How to fetch ecommerce data
- How to start a UI/UX career
- How to create a test map for a Bomberman game in C++ with ncurses
- How to train your dragon about
Also in Technology
More "How To" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
Missing an answer?
Suggest a question and we'll generate an answer for it.