1. Knowledge Base
  2. >
  3. Results
  4. >
  5. How Do I Change My Website's MX Record?

How Do I Change My Website's MX Record?

A mail server uses an MX Record to route incoming email. Changing your MX record is usually done to redirect email to a remote server. It can also be used as a temporary backup in case the local mail server goes down. 

In setting up your emails, you need to indicate:

  • MX record - Your preferred email host will provide this
  • Mail's A record - This is the IP Address pointing to your preferred email host.
  • Email routing - This is your email delivery method

How To Set Up Your MX Record Remotely

  1. Log in to your cPanel.
  2. Navigate to the Domains section, then click on the Zone Editor icon.

    cPanel Zone Editor

  3. Click on the Manage button of the domain name you wish to modify. 

    cPanel Manage DNS

  4. Find the MX record, then click edit.

    cPanel MX record

  5. Enter the new MX record "mail.thedomainname.com" (or whatever the host provided you) for the Destination value. Priority will usually stay equal to 0 [zero].

    In the images below, the current MX record, mail.example.com, is replaced by mail.example1.net.

    Current MX record value:

    Current MX Record Value

     New MX record value:

    New MX record valUE

Tip: Setting the value back is just as easy. Just save the Destination value as the domain name you select from the dropdown (no HTTP or www).

How To Set Up Your Mail's A Records

The next step is to point the mail's A records to the domain's DNS.

To set up your email's A records:

  1. Navigate to cPanel's Domain's section (click on the cPanel Logo on the top-left of the page.)
  2. Click on the Zone Editor
  3. Click on the + A Record button of the domain name you wish to modify. 

    cPanel Add A record button

  4. In the pop-up window, enter "mail.thedomainname.com" (or whatever you need to put for the MX Destination) in the Name field.

    Add An A record values

  5. In the Address field, enter the other server's IP address.
    Note: If you are pointing your domain to HostGator, you will use the server's IP address where you wish to receive your email, which is available in your Welcome email for that server.
  6. Click the Add An A Record button.

How To Set Up Your Email Routing

  1. Log in to your cPanel.
  2. Navigate to the Email section, then click on Email Routing.

    cPanel Email Routing

  3. Select the problematic domain name from the dropdown list.
  4. Set the email routing Remote. Please check this article to know more about the Email Routing Configuration.

    If you are not sure, choose Automatically Detect Configuration and hit the Change button.

    Email routing settings page

  5. Click Change.
Need additional assistance? HostGator's Support is here to help. Please contact us via phone or Live Chat so we can assist!