DKIM & SPF records are important services for ensuring that your domain is not delivered to the spam folders of your recipients or even outright rejected. HostGator currently enables these by default for all cPanel accounts. Third party DNS providers may require you to manually add these DNS records.
There are three core steps to adding DKIM & SPF records to your third party DNS provider:
- Step 1: Ensure DKIM & SPF are Enabled
- Step 2: Copy Your SPF and Locate Your DKIM-Signature
- Step 3: Add SPF and DKIM Records to Your DNS Zone
Ensure DKIM & SPF are Enabled
The first step is to ensure that both DKIM and SPF are working properly on your cPanel:
- Log into your cPanel
- Click the Email Authentication in the Mail section.
- Locate the DKIM section. If the status is not Enabled, click the Enable button.
Note: If you are already using third party DNS the required DKIM record will be provided here when the service is enabled.
- Return to the Email Authentication page if you enabled DKIM.
- Locate the SPF section. If the status is not Enabled, click the Enable button.
- Return to the Email Authentication page if you enabled SPF.
- When your SPF status is Enabled, your raw SPF record will be displayed here, please copy this for step 3.
If your DNS is already pointed at your third party DNS host, you may copy the DKIM record and raw SPF record provided on this page and skip to step 3.
Find and Copy Your DKIM-Signature
If you are currently using HostGator nameservers, your DKIM record will not be displayed in cPanel. To get your DKIM record you will need to be able to view your full email headers.
To do this, you will need to send mail to yourself at an external email address, such as Gmail, Yahoo, or a domain hosted on another server, then check the email headers. Alternatively, you may use a service such as ISnotSPAM.
Once you have the headers from an outbound email, look for this section:
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=hgunlimited.com; s=default; h=Message-ID:Subject:To:From:Date:
You will need to copy the entire value after DKIM-Signature: for creating your DKIM record. Once you have both the raw SPF record and the DKIM record, you may proceed to the next step.
Note: Copying the signature may add line breaks which must be removed. Paste the signature into a notepad program with wordwrap off and delete any line breaks until there is only one line.
Add SPF and DKIM Records to Your DNS Zone
Once you have the values for your SPF and DKIM records, you will need to create 2 TXT records at your third party DNS provider:
|TXT||yourdomain.com.||14400||Value for Your raw SPF Record|
|TXT||default._domainkey.yourdomain.com.||14400||Value for Your DKIM-Signature|
After you have added your new DNS records they should function correctly within 4 to 8 hours if your nameservers are already set to your DNS host, or 24 to 48 hours after you update your nameservers.