What Is an MX Record?
An MX (Mail Exchange) record is a type of DNS record that specifies the mail server responsible for receiving email messages on behalf of a domain. It directs incoming emails to the correct server, ensuring that messages are delivered to the right place. MX records are essential for email communication, as they help route emails to their intended recipients.
How MX Records Work
When someone sends an email to your domain, their email server looks up your domain’s MX records to find out where to deliver the message. The MX records provide the hostname of your mail servers and their priority levels. If you have multiple mail servers, the priority values determine the order in which the servers should be used.
Setting Up MX Records for a Gmail Account
To use Gmail to handle your domain's email, you need to set up MX records to direct email to Google's mail servers. Follow these steps:
Sign in to Your Domain Host Account
- Log in to the account where your domain is hosted. This is usually your domain registrar or DNS hosting provider.
Navigate to DNS Management
- Find the section where you can manage DNS settings. This might be labeled as DNS Management, DNS Settings, or similar.
Locate Your MX Records
- Find the MX records section. If you don't see it, look for an option to add a new record.
Delete Existing MX Records
- If there are any existing MX records for your domain, delete them to avoid conflicts.
Add New MX Records
Enter the following MX records provided by Google which look like following:
Priority Mail Server 1 ASPMX.L.GOOGLE.COM 5 ALT1.ASPMX.L.GOOGLE.COM 5 ALT2.ASPMX.L.GOOGLE.COM 10 ALT3.ASPMX.L.GOOGLE.COM 10 ALT4.ASPMX.L.GOOGLE.COM Priority: Indicates the order in which the mail servers should be used. Lower values are higher priority.
Mail Server: The hostname of the Google mail server.
Save the Changes
- Save the new MX records. It may take some time (up to 48 hours) for the changes to propagate across the internet.
Verify the MX Records
- Use an online DNS lookup tool or command-line tools like nslookup or digto verify the MX records are correctly set up. For example:
- On Windows: Open Command Prompt and type nslookup -type=mx yourdomain.com
- On Linux/Mac: Open Terminal and type dig mx yourdomain.com
- Use an online DNS lookup tool or command-line tools like nslookup or digto verify the MX records are correctly set up. For example:
Example
To set up MX records for yourdomain.com to use Gmail:
Log in to your domain host account.
Navigate to DNS Management.
Delete existing MX records.
Add the following MX records:
- Priority: 1, Mail Server: ASPMX.L.GOOGLE.COM
- Priority: 5, Mail Server: ALT1.ASPMX.L.GOOGLE.COM
- Priority: 5, Mail Server: ALT2.ASPMX.L.GOOGLE.COM
- Priority: 10, Mail Server: ALT3.ASPMX.L.GOOGLE.COM
- Priority: 10, Mail Server: ALT4.ASPMX.L.GOOGLE.COM
Save the changes.
Verify the new MX records.
Setting up MX records for Gmail ensures that your domain’s emails are routed to Google’s mail servers, allowing you to use Gmail for your domain’s email. This setup enhances email reliability and leverages Google's powerful email infrastructure.