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 emails. Changing your MX record is done to redirect emails to a remote server; that is, if you want to use your old email service after migrating your website or if you want to use a 3rd-party email service, such as Google Workspace, etc. In this case, you will use the remote settings for your emails.

This article discusses how to set up your MX records to use the remote settings in your cPanel.

Do you wish HostGator to host your emails? If yes, please visit our support guide, How to Set Up Your MX (Mail Exchange) Record, for more details.

In using the remote settings for your emails, you need to indicate the following:

  • MX record - Your preferred email host will provide this.
  • Mail's A record - This is the IP address connecting to your preferred email host.
  • Email routing - This is your email delivery method.
Please note that your domain must use HostGator name servers so you can manage your DNS records in cPanel.

Here are the topics we will discuss in this article.


How to set up the MX record remotely

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

    cPanel Zone Editor

  3. Locate your emails' domain, then click its Manage button. 

    cPanel Manage DNS

  4. In the domain's list of DNS records, look for MX under the Type column, then click Edit.

    cPanel MX record

  5. Enter your email host's MX record in the Destination field. Some email hosts use a different value for the Priority field; some typically use 0 (zero).

    In the sample images below, the current MX record, 'mail.example.com,' is replaced by the new MX record value, '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 mail's A records:

  1. Navigate back to cPanel's Domains section.
  2. Click on the Zone Editor.

    cPanel Zone Editor

  3. Locate your email's domain, then click on its + A Record button.

    cPanel Add A record button

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

    Add An A record values

  5. In the Address field, enter your email host's IP address.
  6. Click the Add An A Record button to save.

How to set up your email routing

Email routing determines how you want your emails to be delivered. Since you will be using another email host, you need to set your email routing to Remote.

To set up remote email routing:

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

    cPanel Email Routing

  3. Select your email's domain from the dropdown.
  4. Choose Remote Mail Exchanger from the list of options. Please check the Email Routing Configuration article to know more.

    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!