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
- Log in to your Google Admin Console: admin.google.com.
- Navigate to Apps > Google Workspace > Gmail.
- Click Authenticate Email under Gmail settings.
Step 2: Generate a DKIM Key
- Select the domain you want to set up DKIM for. (You’ll see a dropdown if you manage multiple domains.)
- 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.
- Google generates the DNS TXT record with the public key.
Step 3: Add the DKIM Key to Your Domain's DNS
- Log in to DNSmadeeazy
- Add a new DNS TXT record:
- Name (Host): Use the selector and domain in this format:
google._domainkey.example.com
-
- Replace
googlewith your selector andexample.comwith your domain. - Type: TXT
- Value (Data): Copy the public key generated in the Google Admin Console.
- Replace
- 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
- After updating the DNS, return to the Gmail settings in the Google Admin Console.
- Click Start Authentication for the domain.
- Google will validate the DKIM setup using the DNS TXT record.
Step 5: Verify DKIM
- Wait for the DNS changes to propagate (this may take a few minutes to 48 hours).
- Send a test email from your domain to an external email address (e.g., Gmail, Outlook).
- Check the email headers in the recipient’s email client:
- Look for
Authentication-Resultsin the headers. - Confirm that
dkim=passis displayed.
- Look for
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.