SPF Records and Domain Keys (DKIM): Combating Spam

cPanel allows users to create their own SPF and Domain Keys (DKIM) records. SPF and DKIM are tools used by many mail servers in an effort to combat spam, so if you’re having an issue with your email being bounced back or arriving in the junk/spam folders of your recipients, it is suggested to enable these settings. Please keep in mind that as these are DNS settings, they may take up to 24 hours before they begin to take effect.

About Domain Keys and SPF Records

Domain Keys
Domain Keys is an e-mail authentication system that allows for incoming mail to be checked against the server it was sent from to verify that the mail has not been modified. This ensures that messages are actually coming from the listed sender and allows abusive messages to be tracked with more ease.

SPF will specify which machines are authorized to send email from your domain(s). This means that only mail sent through this server will appear as valid mail from your domain(s) when the SPF records are checked.

Additional Info
Yahoo – Domain Keys
Google – SPF
AOL – Domain Keys

How to Implement Domain Keys and SPF Records

SPF Records and Domain Keys can be set within the “Authentication” section of your cPanel. The specific instructions are in the cPanel, and you can also review cPanel’s documentation for more details. If you need further assistance, or, if you do not have the “Authentication” icon in your cPanel, please contact Support for further assistance.

If you missed our previous article, please see the Combating Spam: Using SpamAssassin tutorial. For more information on this course please visit Preventing Spam. Please see the next article on how to Permanently stop spam with SpamCop.

Thoughts on “SPF Records and Domain Keys (DKIM): Combating Spam

  • SPF and DKIM settings have moved from Authentication to Email Deliverability – there doesn’t seem to be an Authentcation item any more

  • On mail that my Gmail accounts receive, there is an Authentication header that indicates if the email passes SPF and DKIM checks.

    I don’t see anything like that on mail incoming to accounts my VPS server. I know my DKIM and SPF settings are all correct, and in some instances, I even use the G Suite SMTP relay service for outbound SMTP and have SPF and DKIM setup for that use, as well (and when I send to a Google-based email account, the Authentication header correction shows SPF/DKIM passes). I have no problems with my SPF/DKIM settings.

    Using this relay, one of my VPS websites will send email to the Gmail SMTP relay, send on behalf of my domain and authenticate with DKIM. The Gmail server is included in SPF, and it’s sent back to my IMAP account on my VPS. I’ve found this bypasses a lot of spam filters because Gmail servers are well known and more trusted than smaller, less-known VPS servers.

    But, is this type of SPF/DKIM email header checking available on inbound mail on VPS-based email accounts?

    • Hello,

      You can enable the DKIM under your email authentication settings in your cPanel, To check for SPF all you have to do is enable SpamAssassin in your cPanel and it will check the SPF records.

      Best Regards,
      Kyle M

  • My mailchimp emails go through ok, but quite regulary my personal replies to customers end up in spam, even with prior communication that had gone through fine. I can’t seem to find any pattern or specific providers though. Not sure what to do next? Can the email software im using impact it? (outlook 2013)

    • Hello Caren,

      I would suggest it just to be safe as some servers may block the email as it would look like spoofing to them.

      Best Regards,
      TJ Edens

  • I am also experiencing similar problems.


    I have a website, which takes in external registration and confirmation of these registrants will be sent to the user’s email. upon clicking on this link in the email, the user will be registered and can he can use this website.


    The email containing the confirmation link is sent to spam email box. So really dont know how to overcome this issue. spf records are already been added in the dns settings. what else should i do. can someone shedlight on it


    Thanks in advance

    • Hello rathankar,

      You may want to contact the server that is hosting the email and have them take a look at a copy of the email so they can see why their server may think it is spam.

      Kindest Regards,
      Scott M

  • Hello! ALL of our company emails from yarngirls@*******.com get sent to the SPAM folder if the recipient is a GMAIL user – every single time! This has been happening for years… I’ve just taken over as webmaster and I’d love to see if I can do something about it. We’re on a low-end server… I know we could upgrade and try that… but that’s a larger task and I’d like to exhaust all other options first. Does anybody have any insight for me? It would be greatly appreciated!

  • allways gmail and other domains  think my domain is send spam and block our domain .the question hot to resolve this problems.

    example :MDaemon Delivery Status Notification – https://www.altn.com/dsn/

    The attached message had PERMANENT fatal delivery errors.

    After one or more unsuccessful delivery attempts the attached message has
    been removed from the MDaemon mail queue on this server. The number and
    frequency of delivery attempts are determined by local configuration.


    Failed address: aeed2000@gmail.com

    — Session Transcript —
    Sun 2015-01-25 11:34:46: Session 216355; child 0001
    Sun 2015-01-25 11:34:46: Parsing message <xxxxxxxxxxxxxxxxxxxxxxxx\pd35000076253.msg>
    Sun 2015-01-25 11:34:46: * From: eid@krcsd.com
    Sun 2015-01-25 11:34:46: * To: aeed2000@gmail.com
    Sun 2015-01-25 11:34:46: * Subject: test
    Sun 2015-01-25 11:34:46: * Size (bytes): 2172
    Sun 2015-01-25 11:34:46: * Message-ID: <WC20150125083443.950125@krcsd.com>
    Sun 2015-01-25 11:34:46: Attempting SMTP connection to [gmail.com]
    Sun 2015-01-25 11:34:46: Resolving MX records for [gmail.com] (DNS Server:…
    Sun 2015-01-25 11:34:46: * P=005 S=000 D=gmail.com TTL=(24) MX=[gmail-smtp-in.l.google.com]
    Sun 2015-01-25 11:34:46: * P=010 S=001 D=gmail.com TTL=(24) MX=[alt1.gmail-smtp-in.l.google.com]
    Sun 2015-01-25 11:34:46: * P=020 S=002 D=gmail.com TTL=(24) MX=[alt2.gmail-smtp-in.l.google.com]
    Sun 2015-01-25 11:34:46: * P=030 S=003 D=gmail.com TTL=(24) MX=[alt3.gmail-smtp-in.l.google.com]
    Sun 2015-01-25 11:34:46: * P=040 S=004 D=gmail.com TTL=(24) MX=[alt4.gmail-smtp-in.l.google.com]
    Sun 2015-01-25 11:34:46: Attempting SMTP connection to [gmail-smtp-in.l.google.com:25]
    Sun 2015-01-25 11:34:46: Resolving A record for [gmail-smtp-in.l.google.com] (DNS Server:…
    Sun 2015-01-25 11:34:46: * D=gmail-smtp-in.l.google.com TTL=(4) A=[]
    Sun 2015-01-25 11:34:46: Attempting SMTP connection to []
    Sun 2015-01-25 11:34:46: Waiting for socket connection…
    Sun 2015-01-25 11:34:46: * Connection established ( ->
    Sun 2015-01-25 11:34:46: Waiting for protocol to start…
    Sun 2015-01-25 11:34:46: <– 220 mx.google.com ESMTP w8si13460231wjw.51 – gsmtp
    Sun 2015-01-25 11:34:46: –> EHLO mail.krcsd.com
    Sun 2015-01-25 11:34:46: <– 250-mx.google.com at your service, []
    Sun 2015-01-25 11:34:46: <– 250-SIZE 35882577
    Sun 2015-01-25 11:34:46: <– 250 SMTPUTF8
    Sun 2015-01-25 11:34:46: –> MAIL From:<eid@krcsd.com> SIZE=2172
    Sun 2015-01-25 11:34:46: <– 250 2.1.0 OK w8si13460231wjw.51 – gsmtp
    Sun 2015-01-25 11:34:46: –> RCPT To:<aeed2000@gmail.com>
    Sun 2015-01-25 11:34:47: <– 250 2.1.5 OK w8si13460231wjw.51 – gsmtp
    Sun 2015-01-25 11:34:47: –> DATA
    Sun 2015-01-25 11:34:47: <– 354 End data with a single dot on a line
    Sun 2015-01-25 11:34:47: Sending <xxxxxxxxxxxxxxxxxxxxxxxx\pd35000076253.msg> to []
    Sun 2015-01-25 11:34:47: Transfer Complete
    Sun 2015-01-25 11:34:58: <– 550-5.7.1 [ 12] Our system has detected that this message is
    Sun 2015-01-25 11:34:59: <– 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail,
    Sun 2015-01-25 11:34:59: <– 550-5.7.1 this message has been blocked. Please visit
    Sun 2015-01-25 11:34:59: <– 550-5.7.1 https://support.google.com/mail/bin/answer.py?hl=en&answer=188131 for
    Sun 2015-01-25 11:34:59: <– 550 5.7.1 more information. w8si13460231wjw.51 – gsmtp
    Sun 2015-01-25 11:34:59: –> QUIT
    — End Transcript —

    • It appears that Gmail may have blocked the server IP due to suspected spam. If your account is hosted with us, you may submit a ticket with live support in which they will be happy to assist you. If you are sending this email from outside of our server, you will need to request delisting from Google.

  • my e-mailing of invoices and purchase orders  from quickbooks pro are suddenly going into spam files to those i’m sending to. I’m using exede as an internet provider,outlook as my e-mail,the invoices are sent pdf format.my e-mail is yahoo. all parties are clueless,as am i. there is no notification on my end anything is wrong. just in much digging with my customers,could i fing this out. any miracle would be appreciated. my livlihood depends on this getting straightened out.


    • Hello Bobby,

      The receiving server is typically the one that determines whether to place the email in the Spam folder or not. If you can log into the yahoo mail server to see if it is the same there. That will confirm the server is the one that placed it in the spam folder. As to why, I can only guess that something in the spam algorithm has changed where it is flagging those specific email. Is there a way to whitelist the email address it comes from?

      Kindest Regards,
      Scott M

  • Hello there,
    I’m trying to figure out WHY most of the e-mail I send are always going to others SPAM box… I just send a couple of e-mails per dayand of course I’m NOT a spammer! Can someone please help me?

    • Hello Marco,

      Sorry to hear that you’re having problems with sent email going into spam. If your emails are being sent to the SPAM box, it may be depend on several things. The content of your messages, server reputation, or the email filter settings on the destination server. You need to provide more information on the issue in order for us to more thoroughly investigate the problem. We would need to know your domain name, or at least the email address you’re using and the destination you’re sending the email to. You may also be receiving a bounce-back message that explains the issue. If you are getting a bounce-back message, then that information would be invaluable in determining the cause of your email problems.

      We would be happy to help, but at present we need more information in order to proceed. If you wish for us to investigate the issue, then please respond with more info to this post. If you wish for the issue to be handled privately, then please contact our live technical support team via phone/chat/email as per the information at the bottom of the page.

      Kindest regards,
      Arnel C.

  • this is the email address that correspondence was sent.

    the msg. was sent on Tuesday morning and I didn’t recieve it unitl Friday morning.

    • Hello Chris,

      SPF records would not delay email delivery. Although email was intended to be delivered within 24 hours, it can be delayed longer at times due to other issues with one or more email servers along the route.

      Kindest Regards,
      Scott M

Leave a Reply to Marco Tancredi Cancel reply