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.
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.
Here are the topics we will discuss in this article.
- How to set up the MX record remotely ⤵
- How to set up your mail's A records ⤵
- How to set up your email routing ⤵
How to set up the MX record remotely
- Log in to cPanel.
- Look for the Domains section, then click on the Zone Editor icon.
- Locate your emails' domain, then click its Manage button.
- In the domain's list of DNS records, look for MX under the Type column, then click Edit.
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:
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:
- Navigate back to cPanel's Domains section.
- Click on the Zone Editor.
- Locate your email's domain, then click on its + A Record button.
- In the pop-up window, enter "mail.thedomainname.com" (or whatever you used for the MX Destination) in the Name field.
- In the Address field, enter your email host's IP address.
- 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:
- Log in to your cPanel.
- Look for the Email section, then click on Email Routing.
- Select your email's domain from the dropdown.
Choose Remote Mail Exchanger from the list of options. Please check the Email Routing Configuration article to know more.
- Click Change.