How to Add MX Records in Gandi - Step-by-Step Guide

Complete guide to adding MX records in Gandi's DNS settings, including switching from Gandi Mail to Google Workspace, Microsoft 365, or other providers.

Gandi is a privacy-focused domain registrar and hosting provider based in France, popular across Europe and with users who value data sovereignty and transparent business practices. If you manage your domain at Gandi, you'll configure MX records through their DNS management interface.

This guide covers adding MX records in Gandi, handling Gandi's built-in email product (Gandi Mail), and switching to a third-party email provider.

Understanding Gandi's Email Options

Before configuring MX records, it helps to understand what Gandi offers out of the box.

Gandi Mail is Gandi's built-in email service that comes with many of their domain plans. When active, Gandi automatically configures MX records pointing to their own mail servers. This is convenient if you want basic email included with your domain, but it means you'll need to make changes if you want to use a different email provider.

Third-party email (Google Workspace, Microsoft 365, Zoho, etc.) requires you to replace Gandi's default MX records with your provider's records. This is what most businesses do when they need more features, larger storage, or better collaboration tools than Gandi Mail provides.

The important thing to know is that you cannot use Gandi Mail and a third-party email provider simultaneously for the same domain. MX records can only point to one provider at a time.

Accessing DNS Settings in Gandi

Step 1: Log into Gandi at gandi.net and navigate to your dashboard.

Step 2: Select your domain. Click on the domain you want to configure from your domain list.

Step 3: Go to DNS Records. Click on the DNS Records tab (or DNS Zone depending on your interface version). This shows all DNS records currently configured for your domain.

Gandi organizes DNS records in a table format showing the record type, name, TTL, and value. MX records will appear with "MX" in the Type column.

Gandi LiveDNS vs. legacy DNS

Gandi has transitioned most domains to their LiveDNS platform, which offers a modern interface and fast propagation. If your domain is still on legacy DNS, you may see a slightly different interface, but the process for adding MX records is similar. Gandi's support documentation covers both versions.

Switching From Gandi Mail to a Third-Party Provider

If you're currently using Gandi Mail and want to switch to Google Workspace, Microsoft 365, or another provider, follow these steps carefully.

Step 1: Set up your new email provider completely. Create your account, verify your domain (usually through a TXT record), and create all mailboxes before changing MX records. If you switch MX records to a provider that isn't configured to receive email for your domain, messages will bounce.

Step 2: Back up your Gandi Mail if needed. If you have email stored in Gandi Mail that you want to keep, export or migrate it first. Connect your Gandi Mail to an email client via IMAP, or use your new provider's migration tools to import messages. Once you switch MX records, new email won't arrive at Gandi Mail anymore.

Step 3: Remove Gandi's default MX records. In the DNS Records tab, find the existing MX records that point to Gandi's mail servers. Delete each one. Gandi's default MX records typically point to servers like spool.mail.gandi.net or similar Gandi hostnames.

Step 4: Add your new provider's MX records. Follow the instructions in the next section to add the records your new provider requires.

Disable Gandi Mail before switching

In some Gandi configurations, Gandi Mail may attempt to re-add its own MX records if the service is still active. Check your domain's email settings in Gandi and disable or deactivate Gandi Mail before adding third-party MX records. This prevents conflicts.

Adding MX Records in Gandi

Whether you're adding records for the first time or replacing Gandi Mail's records, the process is the same.

Step 1: From the DNS Records tab, click Add Record (or the + button, depending on your interface version).

Step 2: Select MX as the record type.

Step 3: Fill in the fields:

  • Name: Enter @ for your root domain. This means the record applies to yourdomain.com.
  • TTL: Leave at the default (usually 10800 seconds / 3 hours) or set to 3600 (1 hour) for faster propagation during initial setup.
  • Priority: Enter the priority number from your email provider. Lower numbers have higher priority.
  • Value/Hostname: Enter the mail server hostname from your email provider.

Step 4: Click Create or Save to add the record.

Step 5: Repeat for each MX record your provider requires.

Adding Google Workspace MX Records

For Google Workspace, add five MX records:

NamePriorityMail Server
@1aspmx.l.google.com
@5alt1.aspmx.l.google.com
@5alt2.aspmx.l.google.com
@10alt3.aspmx.l.google.com
@10alt4.aspmx.l.google.com

Add each record individually. After saving all five, verify them using mxrecordchecker.com.

Adding Microsoft 365 MX Records

Microsoft 365 needs one MX record:

NamePriorityMail Server
@0yourdomain-com.mail.protection.outlook.com

Replace yourdomain-com with your actual domain using hyphens instead of dots. The exact value is available in your Microsoft 365 admin center.

Adding Other Provider MX Records

Common configurations for popular email providers:

Zoho Mail:

@ → mx.zoho.eu (priority 10)
@ → mx2.zoho.eu (priority 20)
@ → mx3.zoho.eu (priority 50)

Note: Zoho uses .eu endpoints for European users and .com for others. Check your Zoho setup page for the correct regional servers.

ProtonMail:

@ → mail.protonmail.ch (priority 10)
@ → mailsec.protonmail.ch (priority 20)

Fastmail:

@ → in1-smtp.messagingengine.com (priority 10)
@ → in2-smtp.messagingengine.com (priority 20)

Always verify current values in your provider's documentation, as these can change.

Verifying Your MX Records

After adding records and saving, verify the configuration.

Check with the free MX lookup tool at mxrecordchecker.com. Enter your domain and confirm that the correct mail servers appear with the right priority values. If you still see Gandi's old mail servers, either the old records haven't been fully removed or DNS propagation is still in progress.

Send a test email from an external account to an address at your domain. If the message arrives at your new email provider, the MX records are working correctly.

Check your email provider's verification tool. Google Workspace, Microsoft 365, and most providers include a setup checker that confirms your MX records are properly configured.

Gandi's LiveDNS platform typically propagates changes within minutes to a few hours. If records aren't appearing after several hours, double-check the values in Gandi's DNS interface.

Troubleshooting Gandi MX Issues

Gandi's MX records keep reappearing. If Gandi Mail is still active for your domain, it may override or conflict with custom MX records. Disable Gandi Mail in your domain's email settings before adding third-party records.

Email not arriving after adding records. Verify the MX records are live using mxrecordchecker.com. If they show correctly, confirm that your email provider has your domain set up and verified, and that the destination mailbox exists.

Trailing dot on hostnames. Gandi's LiveDNS handles trailing dots automatically in most cases. If you see errors when saving a record, try the hostname both with and without a trailing dot.

TTL causing slow propagation. If you're in a hurry, edit the TTL on your MX records to a lower value (300 or 3600 seconds). Remember to raise it again once email is confirmed working.

DNS zone file conflicts. If you've ever edited Gandi's DNS zone file directly (rather than through the web interface), there may be formatting issues. Use the web interface for MX records to avoid syntax problems.

Email Authentication Records

After MX records are working, add these authentication records to improve deliverability and protect your domain:

SPF record: a TXT record that authorizes your email provider's servers to send email from your domain. Check your current SPF at spfrecordcheck.com.

DKIM record: a TXT or CNAME record for cryptographic email signing. Your email provider generates the values. Verify at dkimtest.com.

DMARC record: a TXT record that specifies how to handle email failing authentication. Check at dmarcrecordchecker.com.

These records are added in Gandi the same way as MX records: go to DNS Records, click Add Record, select TXT (or CNAME), and enter the values from your email provider.

Gandi for European Businesses

Gandi's European roots and privacy focus make it a natural choice for businesses that need to comply with GDPR or prefer their data handled under European privacy laws. When choosing an email provider to pair with your Gandi domain, consider providers like ProtonMail (Switzerland), Migadu (Switzerland), or Infomaniak (Switzerland) if data sovereignty is a priority. These providers can be set up using the same MX record process described above.

Regardless of which email provider you choose, the free MX record checker at mxrecordchecker.com lets you confirm your DNS is configured correctly before and after any changes.