Skip to main content

How to Configure DKIM and SPF for Newly Created cPanel Accounts

This guide explains how to configure DomainKeys Identified Mail (DKIM) and Sender Policy Framework (SPF) for new cPanel accounts within WHM. These records ensure that your email is authenticated and less likely to be marked as spam by receiving mail...

This guide explains how to configure DomainKeys Identified Mail (DKIM) and Sender Policy Framework (SPF) for new cPanel accounts within WHM. These records ensure that your email is authenticated and less likely to be marked as spam by receiving mail servers.

Before you begin

You will need:

  • Root access to the WHM interface

  • The email addresses for the newly created cPanel accounts

  • The primary domain(s) associated with the new accounts

Configure DKIM and SPF for New Accounts

To ensure consistent email deliverability, you can configure these records during the account creation process or for existing accounts using the WHM interface.

Configuring via the Account Creation Wizard

When creating a new account using the Create a New Account tool:

  1. In WHM, navigate to Create a New Account.

  2. Enter the account details, including the primary domain and email information.

  3. Proceed through the wizard until you reach the Email or DNS configuration section (this may vary depending on your specific WHM version).

  4. Ensure the DKIM and SPF options are enabled for the new account.

  5. Select Create to finalize the account.

Configuring for Existing Accounts

If the account is already created, you can verify or update these records manually:

  1. In WHM, navigate to Email > Mail Delivery Manager or DNS Manager.

  2. Select the specific account or domain.

  3. Verify that a TXT record exists for the SPF_record (typically v=spf1 include:_spf. --all).

  4. Verify that a TXT record exists for the DKIM selector (typically default._domainkey.example.com).

  5. If records are missing, add them using the DNS Manager tool.

Confirm the result

To verify that the records are active and correctly configured:

  • Use a tool like MXToolbox or a similar DNS checker to verify the SPF record for the domain.

  • Use a DKIM check tool to confirm that the DKIM signature is valid for the domain.

  • Send a test email from the new account to an external address and check the headers to ensure both SPF and DKIM pass.

Limitations

  • This procedure does not automatically update the records if the user changes their primary domain in the cPanel interface; the administrator must manually update the DNS records in WHM.

  • DNS propagation may take some time before the records are visible to all mail servers globally.

Did this answer your question?