EmailConfigurationSpanish version

Support article

Set up Google MX records on your domain

Learn how to configure Google Workspace MX records on your domain from DirectAdmin or cPanel and receive email in Gmail without losing messages.

Published: 30/06/2026Updated: 30/06/2026

If you want to use Gmail with your own domain (for example info@yourdomain.com) through Google Workspace, you need to set up Google MX records on your domain. MX records tell the internet where the email for your domain should be delivered.

In this guide you’ll learn what Google MX records are, where to configure them in your miHosting account, and how to do it step by step from DirectAdmin or cPanel without losing messages.

What Google MX records are

MX (Mail Exchange) records are a type of DNS record that indicates which server is in charge of receiving email for a domain.

When someone sends a message to info@yourdomain.com, their server checks the MX records of yourdomain.com to find out which server should receive it.

If you use Google Workspace, your domain’s email is managed from Google’s servers. That’s why your domain’s MX records must point to Google instead of your hosting’s mail server.

Important: setting up Google MX records is only needed if you’re going to use Gmail with your own domain through Google Workspace. It’s not the same as reading your hosting email in Gmail over POP3/IMAP; in that case the MX records stay with miHosting.

Before you start

Before changing anything, review these points:

  1. Have Google Workspace active. You need a Google Workspace account with your domain verified. If you don’t have one yet, the signup and domain verification are done from Google.

  2. Don’t set Google MX records if you’ll keep using your hosting email. If you switch the MX records to Google, your domain’s email will be managed by Google and will no longer arrive in your DirectAdmin or cPanel mailboxes.

  3. Know where your domain is hosted. DNS records (including MX) are edited wherever your domain’s DNS zone is located. If the domain is hosted with miHosting, you can edit them from DirectAdmin or cPanel.

  4. Note your current MX records. In case you need to roll back, copy your current MX records before changing them.

Google MX records

The Google Workspace MX records are as follows. These are Google’s official public values:

TypeName / HostPriorityValue / Destination
MX@ or empty1aspmx.l.google.com
MX@ or empty5alt1.aspmx.l.google.com
MX@ or empty5alt2.aspmx.l.google.com
MX@ or empty10alt3.aspmx.l.google.com
MX@ or empty10alt4.aspmx.l.google.com

Notes on this table:

  • Name / Host: usually @ or the empty field, depending on the panel. It represents the root domain (yourdomain.com).
  • Priority: the number indicates the preference order. The lower, the higher priority.
  • Value / Destination: the Google server address.
  • TTL: you can leave the panel’s default value or use a low one (for example 3600) if you want the change to propagate faster.

How to set up Google MX records in DirectAdmin

If your domain is hosted on a plan with DirectAdmin, follow these steps:

  1. Sign in to DirectAdmin. Log in to your hosting control panel with your username and password.

  2. Select the domain. In the top-right corner, choose the domain where you’ll set up the Google MX records.

  3. Open DNS management. Look for the Advanced Features or Advanced Options section and open the DNS Zone Editor or DNS Management.

  4. Find the current MX records. You’ll see a list of DNS records. Find the ones of type MX.

  5. Delete the existing MX records. Remove every MX record that points to the miHosting mail server. Leaving them can conflict with Google’s.

  6. Add the first Google MX record. Create a new MX record with these details:

    • Name: @ or empty depending on the panel.
    • Priority: 1.
    • Value: aspmx.l.google.com.
  7. Add the rest of the MX records. Repeat the process for the other Google servers (alt1, alt2, alt3, alt4) with their priorities.

  8. Save the changes. Make sure only Google’s MX records remain and save the DNS zone.

[Suggested image: screenshot of the DirectAdmin DNS Zone Editor showing the Google MX records]

How to set up Google MX records in cPanel

If your hosting uses cPanel, the process is very similar:

  1. Sign in to cPanel. Log in with your username and password.

  2. Open the DNS Zone Editor. In the Domains section, click Zone Editor or DNS Zone Editor.

  3. Find your domain. Locate the domain where you’ll set up the MX records and click Manage.

  4. Delete the current MX records. Select and remove the existing MX records that point to your hosting mail server.

  5. Add one MX record per Google server. Click + Add Record and create one of type MX for each server:

    • Name: yourdomain.com. (with a trailing dot, if the panel requires it).
    • TTL: 3600 or the default value.
    • Priority: according to the Google MX records table.
    • Destination: the corresponding Google server address.
  6. Save the changes. Save the zone and verify that the only MX records are Google’s.

[Suggested image: screenshot of the cPanel Zone Editor with the Google MX records]

Add the Google SPF record too

In addition to the MX records, Google recommends setting up an SPF (TXT) record so your emails aren’t marked as spam. SPF authorizes Google’s servers to send email 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:

  1. Create a TXT record in your domain’s DNS zone.
  2. In Name / Host put @ or the empty field.
  3. In Value paste v=spf1 include:_spf.google.com ~all.
  4. Save the changes.

If you already have an SPF record for your hosting email, don’t create a second SPF record. Combine the values into a single one, because having multiple SPF records can cause delivery problems.

It’s also recommended to add a DMARC record to strengthen your email authentication.

How long the change takes to propagate

DNS changes aren’t instant. The MX switch needs to propagate across the network of DNS servers.

  • Propagation usually takes between 1 and 48 hours.
  • If you set a low TTL, changes tend to be noticed sooner.
  • While propagating, some messages may still arrive at the old server.

Don’t change the MX records again without reason during this period, because you reset the propagation counter.

How to check the MX records are correct

After propagation, verify that your domain’s MX records point to Google:

  1. Use a tool like dig or an online MX checker.
  2. Look up the MX records for yourdomain.com.
  3. Confirm that aspmx.l.google.com and the alt servers appear.

You can also check it from the Google Workspace panel, which usually indicates whether the records are already detected.

Common issues and how to fix them

Email doesn’t arrive after changing the MX records

  • Check that you removed the old MX records from the hosting server.
  • Make sure you added all five Google MX records.
  • Wait for propagation to finish (up to 48 hours).

Google doesn’t detect the records

  • Verify that the selected domain in the panel is correct.
  • Confirm the values are exact, with no spaces or typos.
  • Check that there aren’t two SPF records.

My messages land in the spam folder

  • Add or fix the Google SPF record.
  • Set up DMARC if you don’t have it.
  • If the domain is new, reputation will improve with normal use.

Useful tips

  • Take a snapshot of your current MX records before changing them. If something fails, you can restore them quickly.
  • Don’t mix hosting email with Google MX records. If the MX records point to Google, the DirectAdmin or cPanel mailboxes won’t receive email for that domain.
  • Set up SPF and DMARC. They improve delivery and reduce spam and spoofing.
  • Use a low TTL the first time. That way you can fix errors faster.
  • If you don’t use Google Workspace, don’t change the MX records. To read hosting email in Gmail over IMAP or POP3 you don’t need to touch the MX records.

Frequently asked questions

Can I use Google MX records with any miHosting plan?

Yes, as long as you can edit your domain’s DNS zone. On hosting plans with DirectAdmin or cPanel you can manage MX records from the panel.

Will I lose old emails when I change the MX records?

Changing MX records doesn’t delete the emails already stored in the previous server’s mailboxes, but after the change new messages will be delivered to Google. If you need to keep old emails, run a migration from Google Workspace.

Do I also need to set up SPF and DMARC?

It’s not mandatory for email to work, but it’s highly recommended. Without SPF and DMARC, emails sent from Google may be marked as spam and your domain is less protected against spoofing.

Can I set up the Google MX records myself or do I need support?

If you have access to DirectAdmin or cPanel you can do it by following this guide. If the issue continues after checking everything, you can contact miHosting support to review your domain’s DNS zone.

Are the Google MX records paid?

The MX records are free to set up, but Google Workspace is a Google service with its own subscription and pricing, independent from miHosting.

What to do next

Setting up the Google MX records is the key step to using Gmail with your own domain. Once the changes are made and propagated, your domain’s email will be managed from Google.

If after checking the configuration the problem continues, review your domain’s DNS zone, confirm SPF and DMARC, and if you need help you can contact miHosting support to review the status of the service and your domain’s DNS records.