How to configure SPF and DKIM in cPanel?
What is DomainKeys Identified Mail (DKIM)?
DomainKeys Identified Mail (DKIM) lets an organization take responsibility for a message that is in transit. The organization is a handler of the message, either as its originator or as an intermediary. Their reputation is the basis for evaluating whether to trust the message for further handlings, such as delivery. Technically DKIM provides a method for validating a domain name identity that is associated with a message through cryptographic authentication.
What is Sender Policy Framework (SPF)?
SPF record which stands for Sender Policy Framework can be defined as email verification protocol or is an email-authentication technique by which you prevent spammers from sending emails on behalf of your domain.
Why do we need to set DKIM?
If Emails from your website goes to spam folders in other vendors, such as Gmail, Yahoo Email and other some other email providers, then you have to set the DKIM records in your website control panel setup. Every mail server while receiving checks for authentication of the Email senders using DKIM and SPF records, If those records are verified or added correctly, then the email will be delivered. This option or features are available with all the shared hosting plan of HostingRaja customers.
You'll need to add SPF and DKIM records and verify ownership of your sending domains before you can send email through your account. Unlike SPF, you can maintain many DKIM records for various sending sources. Each DKIM record is identified using a selector. In the case it the selector is "pm" as a way to identify Postmark. By using a different key pair for each provider you can easily revoke or renew DKIM records as needed.
Why do we need to set SPF?
Using SPF you can publish authorized mail servers for your domain and also prevent email spoofing by implementing a mechanism for verifying that incoming mail from the domain which comes from the IP Address allowed by that domain's administrators.
The phishing and email spam use faked "from" addresses and domains so that when publishing and checking of the SPF records will be recognized as reliable and easy to use anti-spam procedure hence the record of authorized sending hosts and IP addresses for a domain, when published in the DNS records of that domain in a uniquely formatted TXT record.
Combined with the DMARC related information, this gives the receiver information on how trustworthy the origin of an email is. SPF gives you the ability to specify which email servers are permitted to send email on behalf of your domain.
What is DKIM and SPF Record?
DKIM (DomainKeys Identified Mail) is another way of e-mail authentication. This method uses information about domain which is published by the domain owner. That information allows receiving server to verify if the e-mail message was sent by the legal owner of that domain name.
SPF record (an acronym for Sender Policy Framework) is an effective and simple method which lets you avoid such issues. If your domain name has correct SPF record then you can be sure nobody is able to send fake e-mails on behalf of your domain name.
Follow the below steps for setting up SPF and DKIM records
Step 1: Login into cPanel your accountStep 2: After login into the cpanel search for authentication >> under Email section >> click on authentication icon
Step 3: After you select authentication >> Click on Enable the DKIM >> and click on Enable SPF record. After that, the SPF and the DKIM records will be added to the DNS zone of all hosted domains automatically.
Step 4: After some time when you refresh the page you will status of the enabled record, you should get the status as in the below figure.
But for the DNS records (here SPF and DKIM records) to propagate globally, it will take 24-48 hours.
After you have enabled SPF & DKIM records, You can add additional IP addresses or mail servers that are authorized to send e-mails to your domain. For example, you may want to do this if you want to use a third-party mail server for sending emails from your domain.
If you are facing any issue or if you have any clarification regarding configuring SPF and DKIM records using your cPanel hosting account, feel free to contact our support team via live chat, email, toll-free or ticket system and our support team is available 24/7.