Skip to content

DKIM setup for gmail

Setting up DKIM (DomainKeys Identified Mail) for Gmail involves configuring it in Google Workspace (formerly G Suite) and your domain's DNS settings. Here’s a step-by-step guide to set up DKIM for Gmail:


Step 1: Access Google Admin Console

  1. Log in to your Google Admin Console: admin.google.com.
  2. Navigate to Apps > Google Workspace > Gmail.
  3. Click Authenticate Email under Gmail settings.

Step 2: Generate a DKIM Key

  1. Select the domain you want to set up DKIM for. (You’ll see a dropdown if you manage multiple domains.)
  2. Click Generate New Record.
    • Key Length: Choose the recommended 2048-bit for stronger security. (Alternatively, select 1024-bit if your DNS provider doesn’t support longer keys.)
    • Selector: Enter a selector name (e.g., google, default, or any unique name). This helps identify the DKIM key when multiple keys are used.
  3. Google generates the DNS TXT record with the public key.

Step 3: Add the DKIM Key to Your Domain's DNS

  1. Log in to DNSmadeeazy
  2. Add a new DNS TXT record:
    • Name (Host): Use the selector and domain in this format:
  google._domainkey.example.com
    • Replace google with your selector and example.com with your domain.
    • Type: TXT
    • Value (Data): Copy the public key generated in the Google Admin Console.
  • Save the DNS record. Example DNS Record:
Name/Host: google._domainkey.example.com
Type: TXT
Value: v=DKIM1; k=rsa; p=MIGfMA... (long public key)

Step 4: Activate DKIM in Google Admin Console

  1. After updating the DNS, return to the Gmail settings in the Google Admin Console.
  2. Click Start Authentication for the domain.
  3. Google will validate the DKIM setup using the DNS TXT record.

Step 5: Verify DKIM

  1. Wait for the DNS changes to propagate (this may take a few minutes to 48 hours).
  2. Send a test email from your domain to an external email address (e.g., Gmail, Outlook).
  3. Check the email headers in the recipient’s email client:
    • Look for Authentication-Results in the headers.
    • Confirm that dkim=pass is displayed.

Tips for a Successful Setup

  • Propagate DNS Records: Ensure the DNS TXT record is correctly propagated across DNS servers.
  • Monitor DKIM Authentication: Use tools like DMARC to monitor DKIM and SPF authentication results for your emails.
  • Work with Multiple Domains: If you have multiple domains, repeat the process for each. By setting up DKIM, your Gmail messages will have a verified signature, improving email security and trustworthiness.