MX record in cPanel: how to add, change or delete it

Print
  • 0

In short: MX records tell other mail servers where to deliver mail for your domain. If your mailboxes are on TopHost hosting, cPanel has already created the right MX record and you should leave it as it is. You only change MX records when you move your mail to another service, such as Google Workspace or Microsoft 365, or when you bring it back.

The MX records in cPanel work only when the domain uses the TopHost nameservers ns4.tophost.md and ns5.tophost.md. With DNS at Cloudflare or at another provider, edit the MX records there.

What an MX record contains

  • Priority: a number. Senders try the record with the lowest number first and fall back to higher numbers if that server does not answer.
  • Destination: the host name of the mail server, for example example.md or smtp.google.com. It must be a name, never an IP address.

For mail hosted with TopHost, the usual record is priority 0 with your own domain as the destination.

Where to see your MX records

  1. Log in to cPanel and open Domains, then Zone Editor.
  2. Click Manage next to the domain and select the MX filter.
  3. Each record has an Edit button, to change it and confirm with Save Record, and a Delete button, to remove it.

Moving your mail to another service

  1. Create the mailboxes at the new service first and note the MX values it gives you.
  2. In Zone Editor, click + MX Record next to the domain, fill in Priority and Destination as the service says and save. Repeat for each record it lists.
  3. Delete the old MX record that points to your own domain. If it stays, part of your mail will still arrive at the old mailboxes.
  4. Open Email, then Email Routing, and choose Remote Mail Exchanger for the domain. Without this, messages sent from your website or from other accounts on the same server would still be delivered locally on TopHost.
  5. Update the SPF record so it allows the new service, and set up its DKIM key. See SPF and DMARC for your domain and DKIM in cPanel.

Copy any mail you want to keep from the old mailboxes before you delete them.

Bringing your mail back to TopHost

  1. Delete the MX records of the other service.
  2. Add one MX record with priority 0 and your domain, for example example.md, as the destination.
  3. In Email Routing, choose Local Mail Exchanger (or the automatic option).
  4. Create the mailboxes in cPanel, as shown in How to create and set up email accounts in cPanel.

How long it takes, and how to check

New MX records are usually picked up within a few hours, at most within 24 to 48 hours. During that time some messages may still reach the old server, so do not close the old mailboxes on the same day. To see the current records, run nslookup -type=MX example.md in a terminal or the Windows command prompt.

Common mistakes

  • An IP address typed as the destination. MX records accept only host names.
  • Records of two different services left side by side, so mail is split between them.
  • Email Routing left on local while the mail is now elsewhere.
  • The website's A record changed to another server without thinking of the MX record, which in cPanel points to the domain itself, so mail followed the website. See A record in cPanel.

Mail still not arriving after 48 hours? Open a ticket with the domain and the service your mail should go to.

Related articles

Was this answer helpful?