Google mail with your own domain

Setting up Google Mail (Gmail) with your own domain is a process called "Domain Keys Identified Mail" (DKIM) and "Sender Policy Framework" (SPF). This allows you to use your own domain name (e.g. [yourname]@yourdomain.com) instead of a Gmail address (e.g. [yourname]@gmail.com). Here's a step-by-step guide to set it up:

Prerequisites:

  1. You have a domain name registered with a registrar (e.g. GoDaddy, Namecheap, etc.).
  2. You have a Google Workspace (formerly G Suite) account.
  3. You have a domain name server (DNS) provider (e.g. Google Cloud DNS, Cloudflare, etc.).

Step 1: Create a TXT record

  1. Log in to your DNS provider's dashboard.
  2. Create a new TXT record with the following settings:
    • Host: _domainkey (or _dmarc if your provider requires it)
    • Value: k=rsa; p=<your_public_key> (you'll generate this in the next step)
    • TTL: 3600 (or your provider's recommended value)
  3. Save the changes.

Step 2: Generate a public key

  1. Log in to your Google Workspace account.
  2. Go to the "Settings" icon (gear icon) > "See all settings" > "Advanced" > "Security" > "DKIM".
  3. Click on "Generate a new key" and follow the instructions.
  4. Copy the public key.

Step 3: Create a CNAME record

  1. Log in to your DNS provider's dashboard.
  2. Create a new CNAME record with the following settings:
    • Host: smtp.google.com
    • Value: ghs.google.com (or smtp-relay.gmail.com for Gmail)
    • TTL: 3600 (or your provider's recommended value)
  3. Save the changes.

Step 4: Verify your domain

  1. Log in to your Google Workspace account.
  2. Go to the "Settings" icon (gear icon) > "See all settings" > "Accounts" > "Domain".
  3. Click on "Verify" next to your domain name.
  4. Follow the instructions to verify your domain ownership.

Step 5: Set up SPF

  1. Log in to your DNS provider's dashboard.
  2. Create a new TXT record with the following settings:
    • Host: @ (or yourdomain.com)
    • Value: v=spf1 include:_spf.google.com ~all (or your provider's recommended value)
    • TTL: 3600 (or your provider's recommended value)
  3. Save the changes.

Step 6: Test your setup

  1. Send an email from your new domain (e.g. [yourname]@yourdomain.com) to a test email address.
  2. Check the email headers for the following:
    • Authentication-Results header with a dkim and spf result.
    • Received-SPF header with a pass result.
  3. If everything looks good, your setup is complete!

Note: It may take some time for the changes to propagate globally, so be patient and try sending another test email after a few hours.