5.2.1 How to set up mail on external mailers
MX-records (Mail Exchanger records) are a special type of DNS records that serve as a kind of “road sign” for e-mail. They specify which servers should handle incoming messages for a particular domain.
Changing MX records can be caused by various factors, including the need for a more functional mail service or simply the desire to use a different provider instead of the one provided by the hosting company by default.
Remember: regardless of the chosen mail service, the setup procedure usually includes the following steps.
- Creating an account on the chosen mail service.
- Adding Your domain in the mail service panel.
- Configuring MX records for the domain.
- Confirming ownership of the domain, usually by adding a TXT record.
- Creating mailboxes in the control panel of the chosen mail service.
Changing MX records in the control panel
If You want to use third-party mail services for Your domain mail, such as Gmail and others, You need to go to Your hosting control panel. In the Domain Names section, select the desired domain with the mouse and click the Edit button. In the MX records field, choose the settings You need.
MX records for various mail services
Important to understand: when manually configuring MX records or generalizing DNS records, it’s important to understand the difference between absolute and relative records.
-
Absolute records:
- End with a period (.);
- Indicate the full domain name;
- Example:
mail.example.com.
; - This record points exactly to the domain
mail.example.com.
and will not change.
-
Relative records:
- Do not have a period at the end;
- Are supplemented by the current domain;
- Example:
mail
; - If Your domain is
example.com
, this record will automatically becomemail.example.com.
.
When configuring MX records, absolute records are usually used. For example:
| Name | Type | Priority | Address |
|--------------|------|----------|-----------------------|
| example.com. | MX | 10 | ASPMX.L.GOOGLE.COM. |
Make sure You correctly specify the records according to the requirements of Your DNS provider and mail service.
Gmail (Google Workspace)
More details: to direct mail to Google Workspace, You need to create the following records.
MX records:
Name | Type | Priority | Value |
---|---|---|---|
@ | MX | 1 | ASPMX.L.GOOGLE.COM. |
@ | MX | 5 | ALT1.ASPMX.L.GOOGLE.COM. |
@ | MX | 5 | ALT2.ASPMX.L.GOOGLE.COM. |
@ | MX | 10 | ALT3.ASPMX.L.GOOGLE.COM. |
@ | MX | 10 | ALT4.ASPMX.L.GOOGLE.COM. |
SPF record:
Name | Type | Value |
---|---|---|
@ | TXT | v=spf1 include:_spf.google.com ~all |
DKIM:
For DKIM, You will need to generate keys in the Google Workspace admin panel and add the corresponding TXT record.
Important: a record with the name @
is equivalent to a record for the domain itself. For example, if Your domain is example.com.
, the @
record will directly refer to example.com
. This is a convenient way to specify a record for the root domain without explicitly writing out the full domain name.
Zoho Mail
More details: to direct mail to Zoho, set the following records.
MX records:
Name | Type | Priority | Value |
---|---|---|---|
@ | MX | 10 | mx.zoho.com. |
@ | MX | 20 | mx2.zoho.com. |
@ | MX | 50 | mx3.zoho.com. |
SPF record:
Name | Type | Value |
---|---|---|
@ | TXT | v=spf1 include:zoho.com ~all |
DKIM:
For DKIM, You will need to generate keys in the Zoho Mail admin panel and add the corresponding TXT record.
Microsoft 365
More details: to direct mail to Microsoft, set the following records.
MX records:
Name | Type | Priority | Value |
---|---|---|---|
@ | MX | 0 | yourdomain-com.mail.protection.outlook.com. |
Replace yourdomain-com with Your actual record provided by Microsoft 365.
SPF record:
Name | Type | Value |
---|---|---|
@ | TXT | v=spf1 include:spf.protection.outlook.com -all |
DKIM:
For DKIM, You will need to generate keys in the Microsoft 365 admin panel and add the corresponding TXT record.
Yandex.Mail or Yandex.360 for business
More details: to direct mail to Yandex.Mail, You need to create the following records.
MX records:
Name | Type | Priority | Value |
---|---|---|---|
@ | MX | 10 | mx.yandex.net. |
SPF record:
Name | Type | Value |
---|---|---|
@ | TXT | v=spf1 include:_spf.yandex.net ~all |
DKIM:
For DKIM, You will need to generate keys in the Yandex.Mail admin panel and add the corresponding TXT record.
Standard hosting MX records (default)
More details: to restore default settings and make mail work again from our hosting, set the following records.
A record:
Name | Type | Address |
---|---|---|
A | hosting_ip |
MX record:
Name | Type | Address | Priority |
---|---|---|---|
@ | MX | mail.your-domain.com. | 10 |
SPF record:
Name | Type | Value |
---|---|---|
@ | TXT | v=spf1 ip4:host_ip ~all |
Replace your-domain with Your mail domain, and hosting_ip or host_ip with Your hosting IP address.
Important notes
- All changes will work only if our NS servers are set at the domain registrar.
- Changes in domain records will take effect approximately 6-12 hours after updating the domain’s DNS.
- To make additional DNS settings, use the instructions.
- Mailboxes created in our control panel will stop working after changing MX records to third-party services.
- After configuring MX records, it is also recommended to configure SPF and DKIM records to improve email security and delivery. These records should be obtained from Your mail service.