Google Workspace (formerly G Suite) lets you use Gmail with your own domain name like info@yourcompany.com. In this article, we explain how to connect Google Workspace to your domain by setting up the correct DNS records.

What is Google Workspace?

Google Workspace is the business version of Gmail and other Google services. With Google Workspace you get:

  • Professional email address with your own domain
  • 30 GB to unlimited storage (depending on package)
  • Google Drive, Docs, Sheets, Meet and more
  • Advanced security options
  • Admin control over all users

Before you begin

Make sure you have:

  • An active Google Workspace account (admin.google.com)
  • Access to DNS management for your domain (DirectAdmin or other provider)
  • Your domain is not yet connected to another email service

Step 1: Add domain in Google Workspace

  1. Log in to admin.google.com
  2. Go to Account > Domains > Manage domains
  3. Click "Add a domain
  4. Enter your domain name (without www)
  5. Choose "Primary domain or "Domain alias

Step 2: Verify domain

Google needs to verify that you own the domain. You do this with a TXT record.

Add verification TXT record

  1. Google shows you a verification code like:

    google-site-verification=abc123xyz...
    
  2. In DirectAdmin:

    • Go to DNS Management
    • Add a new TXT record:
      • Name: @ or leave empty
      • Type: TXT
      • Value: The Google verification code
      • TTL: 3600
  3. Wait 5-60 minutes for DNS propagation

  4. Click "Verify in Google Admin

Step 3: Set up MX records

MX records tell where email for your domain should go. For Google Workspace you need specific MX records.

Google Workspace MX records

First remove all existing MX records, then add these:

Priority Mail server
1 ASPMX.L.GOOGLE.COM
5 ALT1.ASPMX.L.GOOGLE.COM
5 ALT2.ASPMX.L.GOOGLE.COM
10 ALT3.ASPMX.L.GOOGLE.COM
10 ALT4.ASPMX.L.GOOGLE.COM

Add MX records in DirectAdmin

  1. Go to DNS Management

  2. Remove all existing MX records

  3. Add a new MX record for each line:

    • Name: @ or leave empty
    • Type: MX
    • Priority: As indicated above
    • Value: The mail server (e.g. ASPMX.L.GOOGLE.COM)
    • TTL: 3600
  4. Save all records

Step 4: Set up SPF record

To prevent spam and improve deliverability, set up an SPF record.

Google Workspace SPF record

v=spf1 include:_spf.google.com ~all

If you also use other services that send email:

v=spf1 include:_spf.google.com include:_spf.theory7.net ~all

Step 5: Set up DKIM

DKIM adds a digital signature to your emails for extra verification.

Get DKIM key

  1. In Google Admin, go to Apps > Google Workspace > Gmail
  2. Click "Authenticate email
  3. Click "GENERATE NEW RECORD
  4. Choose 2048 bits for maximum security
  5. Copy the generated DKIM key

Add DKIM record

  1. In DirectAdmin, go to DNS Management

  2. Add a new TXT record:

    • Name: google._domainkey (or what Google indicates)
    • Type: TXT
    • Value: The long DKIM key from Google
  3. Wait 48 hours (DKIM can take longer)

  4. Go back to Google Admin and click "Start authentication

DMARC combines SPF and DKIM for maximum protection.

Basic DMARC record

v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com

Check if everything works

Test MX records

  1. Go to mxtoolbox.com
  2. Enter your domain
  3. You should see the Google MX servers

Test SPF

  1. Go to mxtoolbox.com/spf.aspx
  2. Enter your domain
  3. Check for green checkmarks

Send test email

  1. Send an email from your Google Workspace account to a Gmail address
  2. Open the email and view "Show original
  3. Look for: spf=pass, dkim=pass

Common problems

"MX records not found"

  • Wait longer - DNS propagation can take up to 48 hours
  • Check for typos in server names
  • Make sure old MX records are removed

"Emails not arriving"

  • Check if MX records are correctly set up
  • Check the recipient's spam folder
  • Test with mxtoolbox.com if your MX records are correct

"DKIM verification failed"

  • DKIM can take 48-72 hours to propagate
  • Check if the selector (google._domainkey) is exactly correct
  • The DKIM key must not contain line breaks

Need help?

We're here for you! Running into issues or have questions? Our support team is happy to help you personally. Drop us a message through the ticket system - we usually respond within a few hours and love helping you find the best solution.