Skip to content
RIPE NCC member · Local Internet RegistryCall us on 020 3318 3449sales@hosting-telecom.uk

MX record: how to set up email for a domain

Domains and DNS2 min read

What an MX record and its priority are, how to check it, which MX you need for email on our hosting, where to change it and the most common mistakes.

Contents

An MX record says which server mail for a domain should be delivered to. When someone writes to jane@example.co.uk, the sender’s server asks DNS for the MX record of example.co.uk and delivers the message there.

How to check

dig +short MX example.co.uk

On Windows, use nslookup -type=mx example.co.uk. The answer looks like 0 example.co.uk.: the number is the priority and the name is the mail server.

Priority

The lower the number, the more important the server. There can be several records: if the main server does not respond, mail is delivered to the next one. If the numbers are equal, messages are shared between the servers.

Which MX to use

For email on our hosting, the MX is the domain itself, for example example.co.uk, with priority 0. If the domain uses our DNS servers, the record is added automatically and you do not need to do anything.

If your email is handled somewhere else, take the MX value and priority from that provider’s help pages and delete the old MX records. As well as MX, you need SPF, DKIM and DMARC records — without them your messages will end up in spam: Email going to spam.

Where to change it

  • Domain on our hosting — in cPanel, in the zone editor: DNS records in cPanel.
  • Domain with us but without hosting — in your control panel: open the domain’s DNS settings and add the record.
  • DNS with another company — in that company’s control panel. A WHOIS lookup will show which DNS servers the domain uses.
Important If your website is on our hosting but your email is with another provider, open Email Routing in cPanel and choose Remote Mail Exchanger. Otherwise messages from the website to addresses on your own domain — enquiries and notifications — will stay on your hosting and never reach the real mailboxes.

Common mistakes

  • An IP address has been entered as the MX. This is not allowed — it must be a name, and that name has an A record with the address.
  • The MX points to a name that has a CNAME. The standard does not allow this, and some servers will not deliver mail to such a record.
  • The old MX records are still there next to the new ones — some messages go to the old server.
  • You have changed the MX but mail still goes the old way — wait a few hours for the servers’ DNS cache to expire.

Didn’t find the answer? Ask our support team — we’ll help.

Choose which cookies we may use. You can change your mind at any time with the “Cookie settings” link at the bottom of every page.

Necessary

Always active

They keep the site secure and remember your cookie choice. They don’t identify you.

Google Analytics counts visits and shows which pages people find useful, so we can improve the site. Which cookies