Save 15% on Instant Deploy Bare-Metal Servers in 26 Global Markets with Coupon Code: EdgeSave

How to Configure an MX Record

What is an MX Record?

MX records, or mail exchange records, are special server settings that help control the way your email is routed. In terms of DNS, an MX record tells incoming mail which server can receive it, and then directs it to that server. In other words, if your MX records are pointing to the wrong location, you won’t be able to receive emails.

Most web hosts create DNS records for their clients that default to the host’s server. If you’d like to use a different mail provider separate from your hosting account, you need to create an MX record.

*Note: changing your MX records only points newly incoming mail to your updated email server. This means that any emails already on your existing mail server will not be transferred over.

 

Understanding the Structure of an MX Record

MX records use two important pieces of information when directing traffic: a priority number and the domain name where the server is hosted.

The priority number determines which order a server will receive mail in and starts with the lowest available priority, starting with “0”. If two servers with the same priority level are both available, one will be chosen at random.

The second part, the domain name, is the name of the specific mail server the mail is being sent to. They typically look something like “mail.DOMAIN.com“. Some hosting providers have special instructions for setting up MX records and may also require a “.” placed at the end of the server name, such as “mail.DOMAIN.com.“. 

 

Configuring MX Records for Gmail

As Gmail is one of the most popular email providers, for the sake of this tutorial, we’ll focus on how to create MX records using Google’s default mail servers.

Google provides users with five different mail servers, assigning each a default priority level. They are:

  • ASPMX.L.GOOGLE.COM -> Priority 1
  • ALT1.ASPMX.L.GOOGLE.COM -> Priority 5
  • ALT2.ASPMX.L.GOOGLE.COM -> Priority 5
  • ALT3.ASPMX.L.GOOGLE.COM -> Priority 10
  • ALT4.ASPMX.L.GOOGLE.COM -> Priority 10

Using the default priority settings, your mail will be routed to the first available server with the lowest priority level. In most instances, this will be ASPMX.L.GOOGLE.COM, since it has a priority level of 1. 

If however, the first server is unavailable for some reason, then mail will be routed to the next available server. Since both ALT1 and ALT2 carry the same priority level, it will be sent to one of them at random.

More information on Google’s mail server’s can be found on their official support page.

Now that you know what the names for Google’s servers, you can set up the MX records for them using your favorite control panel.

 

Changing an MX Record Using cPanel

To setup or make changes to your MX records using cPanel, follow these steps:

  1. First, you’ll need to log in to your cPanel account using your username and password. You can access your control panel by using https://www.YOURDOMAIN.com:2082.
     
  2. Next, in the Mail section of your dashboard, click on the icon for Modify Mail Exchanger (MX Entry).
     
  3. Click the option to Change an MX Entry.
     
  4. Select the domain from the drop-down menu.
     
  5. If you’re using Gmail, then in the section labelled Add New Record, enter the server information listed above.
     
  6. Set the priority number for each record, remembering that lower numbers have higher priority.
     
  7. In the Destination box, enter the name/domain of the new mail server. If using Gmail, start with:
     
    ASPMX.L.GOOGLE.COM
     
    repeat for the other servers on the list.
     
  8. When you’ve finished making changes to the MX record, you can click Add New Record to save your changes.

*Note: it may take upwards of 48 hours for the DNS propagation to take effect.

If should ever want to delete an MX entry using cPanel, you can do so simply by clicking the Delete button next to the applicable MX record and confirming your selection.

 

Changing an MX Record Using WHM (Web Host Manager)

To setup or make changes to MX records using WHM, follow these steps:

  1. First, log in to your WHM account using your username and password.
     
  2. On the left-hand side, locate and click on the option for DNS Functions.
     
  3. Click on Edit DNS Zone.
     
  4. From the drop-down window, select your domain and click Edit.
     
  5. If there is already an existing MX record entered, you should delete it.
     
  6. Enter your domain name and leave the second box as is.
     
  7. From the drop-down menu, select the option for MX.
     
  8. If you’re using Gmail, then enter the information for Google’s mail servers as listed above, including the trailing period. For example:
     
    ASPMX.L.GOOGLE.COM. 
     
  9. When you’re finished editing the records, click Save.

Keep in mind, it may take a day or so for your DNS changes to be updated.

 

Changing an MX Record Using Plesk

To setup or change an MX record using the Plesk control panel, follow these steps:

  1. First, you’ll need to log in to Plesk using your username and password.
     
  2. Under the Websites & Domains tab, select DNS Settings.
     
  3. Locate the domain you are making changes to and click the option to Manage.
     
  4. Select the option to Add a Record.
     
  5. Using the drop-down menu, change Record type to MX.
     
  6. Leave the option for Mail domain blank.
     
  7. In the form field labelled Mail exchange server, enter the name of the mail server you are sending your incoming mail to. If you are using Gmail, start with the first mail server:
     
    ASPMX.L.GOOGLE.COM
     
  8. Using the drop-down menu labelled Specify the priority of the mail exchange server, enter the priority number for the server as listed above. If you do not have a specific priority number for the mail server you’re using, leave it set on “0“.
     
  9. Click on Apply to save your changes and repeat for any additional MX records you need to create.

Remember that changes to DNS won’t take effect immediately.

And there you have it! You should now be able to modify an MX record for Gmail using any one of the above control panels.

 

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account -> Support and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.

 

Additional Links:

Looking for more information on DNS? Search our Knowledge Base!  

In need of more great content? Interested in cPanel, Private Cloud, or Colocation? Check out our recent posts for more news, guides, and industry insights!

Share on Twitter
Share on Facebook