How to Install Google MX Records on Your Domain
Learn how to set up Google Workspace MX records on your domain from DirectAdmin or cPanel and receive mail in Gmail without losing messages.
In this article
If you want to use Gmail with your own domain (for example info@tudominio.com) through Google Workspace, you need to install Google MX records on your domain. MX records tell the internet where emails from your domain should be delivered.
In this guide you will see what Google’s MX records are, where they are configured on your miHosting hosting and how to do it step by step from DirectAdmin or cPanel without losing messages.
What are Google MX records
MX (Mail Exchange) records are a type of DNS record that indicates which server is in charge of receiving mail from a domain.
When someone sends an email to info@tudominio.com, its server consults the MX records of tudominio.com to know which server to deliver that message to.
If you use Google Workspace, your domain emails are managed from Google servers. That’s why your domain’s MX records should point to Google and not your hosting’s mail server.
Important: installing Google MX is only necessary if you are going to use Gmail with your own domain through Google Workspace. It is not the same as reading your hosting email in Gmail through POP3/IMAP; In that case the MX stay in miHosting.
Before you start
Before touching anything, check these points:
-
Have Google Workspace active. You need a Google Workspace account with your domain verified. If you don’t have it yet, the registration and verification of the domain are done from Google.
-
Do not configure Google MX if you continue using your hosting email. If you change the MX to Google, your domain’s email will be managed by Google and will no longer reach your DirectAdmin or cPanel mailboxes.
-
Know where your domain is hosted. DNS records (including MX records) are edited wherever your domain’s DNS zone is. If the domain is hosted on miHosting, you can edit them from DirectAdmin or cPanel.
-
Write down the current MX records. In case you need to go back, copy your current MXs before changing them.
Google MX Records
The Google Workspace MX records are as follows. These values are public and official Google values:
| Type | Name/Host | Priority | Value / Destiny |
|---|---|---|---|
| MX | @ or empty | 1 | aspmx.l.google.com |
| MX | @ or empty | 5 | alt1.aspmx.l.google.com |
| MX | @ or empty | 5 | alt2.aspmx.l.google.com |
| MX | @ or empty | 10 | alt3.aspmx.l.google.com |
| MX | @ or empty | 10 | alt4.aspmx.l.google.com |
Notes on this table:
- Name / Host: normally
@or the empty field, depending on the panel. Represents the root domain (tudominio.com). - Priority: the number indicates the order of preference. The lower, the more priority.
- Value / Destination: the address of the Google server.
- TTL: you can leave the panel’s default value or use a low one (for example 3600) if you want the change to propagate sooner.
How to install Google MX in DirectAdmin
If your domain is hosted on hosting with DirectAdmin, follow these steps:
-
Login to DirectAdmin. Enter your hosting control panel with your username and password.
-
Select the domain. In the upper right corner, choose the domain on which you are going to install Google MX.
-
Open DNS management. Look for the Advanced Features or Advanced Options section and enter DNS Zone Editor or DNS Management.
-
Locate the current MX records. You will see a list of DNS records. Look for the ones with type
MX. -
Delete existing MXs. Delete all MXs that point to miHosting’s mail server. If you leave them, they can create conflict with Google.
-
Add the first Google MX record. Create a new record of type
MXwith this data:- Name:
@or empty depending on the panel. - Priority:
1. - Value:
aspmx.l.google.com.
- Name:
-
Add the rest of the MX records. Repeat the process for the other Google servers (
alt1,alt2,alt3, CODE2) with their priorities. -
Save changes. Check that only the Google MXs remain and save the DNS zone.
[Suggested image: Screenshot of DirectAdmin DNS Zone Editor showing Google MX records]
How to install Google MX in cPanel
If your hosting uses cPanel, the process is very similar:
-
Login to cPanel. Enter with your username and password.
-
Open the DNS Zone Editor. In the Domains section, click Zone Editor or DNS Zone Editor.
-
Locate your domain. Find the domain where you are going to install the MX and press Manage or Manage.
-
Deletes current MXs. Select and delete existing
MXrecords that point to your hosting’s mail server. -
Add one MX record per Google server. Press + Add Record or + Add Record and create one of type
MXfor each server:- Name:
tudominio.com.(with full stop, if the panel requests it). - TTL:
3600or the default value. - Priority: according to Google’s MX record table.
- Destination: the address of the corresponding Google server.
- Name:
-
Save changes. Save the area and verify that the only MX are those of Google.
[Suggested image: Screenshot of cPanel’s Zone Editor with Google MX records]
Also add the Google SPF record
In addition to MX, Google recommends setting up an SPF (TXT) record so that your emails are not marked as spam. SPF authorizes Google servers to send mail on behalf of your domain.
A typical Google Workspace SPF record looks like this:
v=spf1 include:_spf.google.com ~all
How to add it:
- Create a record of type
TXTin the DNS zone of your domain. - In Name / Host put
@or the empty field. - In Value paste
v=spf1 include:_spf.google.com ~all. - Save the changes.
If you already have an SPF created for your hosting email, do not create a second SPF record. Combine the values into one, because having several SPFs can cause delivery problems.
It is also advisable to add a DMARC record to strengthen the authentication of your email.
How long does it take for the change to propagate?
DNS changes are not instantaneous. The MX change needs to propagate throughout the entire network of DNS servers.
- Propagation usually takes between 1 and 48 hours.
- If you set a low TTL, the changes are usually noticeable sooner.
- While propagating, some messages may continue to reach the old server.
Don’t change MXs again for no reason during this period, because you reset the propagation counter.
How to check that the MXs are fine
After propagation, verify that your domain’s MX points to Google:
- Use a tool like dig or an online MX checker.
- Query the MX records of
tudominio.com. - Confirm that
aspmx.l.google.comandaltservers appear.
You can also check it from the Google Workspace panel, which usually indicates if the records are already detected.
Common errors and how to solve them
The email does not arrive after changing the MX
- Check that you have deleted the old MXs from the hosting server.
- Check that you have added all five Google MX records.
- Wait for the propagation to finish (up to 48 hours).
Google does not detect the records
- Verify that the domain selected in the panel is the correct one.
- Confirm that the values are exact, without spaces or typographical errors.
- Check that there are not two SPF records.
I received the message in my spam folder
- Add or correct Google SPF record.
- Configure DMARC if you don’t have it.
- If the domain is new, the reputation will improve with normal use.
Useful tips
- Take a photo of your current MX before changing them. If something fails, you can restore them quickly.
- Do not mix hosting mail with Google MX. If the MX go to Google, DirectAdmin or cPanel mailboxes will not receive mail from that domain.
- Configure SPF and DMARC. Improve delivery and reduce spam and spoofing.
- Use a low TTL the first time. This way you can correct errors faster.
- If you do not use Google Workspace, do not change the MX. To read email from your hosting in Gmail via IMAP or POP3 you do not need to touch the MX.
Frequently asked questions
Can I use Google MX with any miHosting hosting?
Yes, as long as you can edit the DNS zone of your domain. In hosting with DirectAdmin or cPanel you can manage MX records from the panel.
Will I lose old emails when changing MX?
Changing the MX does not delete the emails that were already in the mailboxes of the previous server, but after the change the new messages will be delivered to Google. If you need to keep old emails, migrate from Google Workspace.
Do I also have to configure SPF and DMARC?
It is not required for the email to work, but it is highly recommended. Without SPF and DMARC your submissions from Google may arrive marked as spam and your domain is less protected against spoofing.
Can I configure Google MXs on my own or do I need support?
If you have access to DirectAdmin or cPanel you can do it by following this guide. If after reviewing everything the problem continues, you can contact miHosting support to check the DNS zone of your domain.
Are Google MX paid?
Google MX records are free to configure, but Google Workspace is a Google service with its own subscription and prices, unrelated to miHosting.
What to do now
Installing Google MX records is the key step to using Gmail with your own domain. Once the changes are made and propagated, your domain email will be managed from Google.
If after reviewing the configuration the problem continues, check the DNS zone of your domain, confirm SPF and DMARC, and if you need help you can contact miHosting support to review the status of the service and the DNS records of your domain.