Skip to main content

How do I correctly apply DKIM and SPF?

Comments

6 comments

  • GOT
    You would need to replicate those records exactly if your DNS is hosted elsewhere. You might want to think about running your own nameservers as it will make your life a lot easier once it's set up.
    0
  • bluecup
    You would need to replicate those records exactly if your DNS is hosted elsewhere.

    I tried to replicate the records into the DNS but looks like it's not working well. Emails coming from the website's forms kept going to the junk folder. Zone Editor records look something like this: DKIM: default._domainkey.mywebsite.com. TXT v=DKIM1; k=rsa; p=BILMIkATRgkqhkblahblahblahblahblah SPF: mywebsite.com. TXT v=spf1 +a +mx +ip4:123.456.789.00 ~all
    Do I need to add DKIM as CNAME type in DNS? Do I need to change "default._domainkey.mywebsite.com." to something else when I replicate the records? SPF record in my DNS already has multiple values in it. My understanding is only a single SPF is allowed. I tried something like this but not sure if this was correct: v=spf1 include:servers.mcsv.net include:spf.protection.outlook.com +a +mx +ip4:123.456.789.00 -all
    0
  • GOT
    You're going to have a problem with DKIM. It looks like you are using Office365 or something similar as your actual incoming mail server? If so, the DKIM is actually provided by them and not your server, so the DKIM record you see on the server is not correct. If mail is not actually being handled by your server then your server should not be sending mail for that domain. Mail from your server is never going to validate against that DKIM record. You would need to get your DKIM record off your mail service and use that in the DNS record.
    0
  • cPanelMichael
    Hello @bluecup, I recommend contacting your provider to verify if there are any specific considerations for DKIM and SPF records. For instance, in some cases a provider relays all email from the server through a relay service, which can require DKIM and SPF records that are different to the standard DKIM and SPF entries setup via cPanel & WHM. Thank you.
    0
  • baronn
    Once you have contacted them to identify the correct DKIM/SPF settings to use it may also be helpful to signup for the free services listed in this post: to identify any further issues to ensure your email deliverability is good.
    0
  • bluecup
    This has been resolved. It turned out that the server has multiple IP addresses. So I had to add all of them to the SPF record.
    0

Please sign in to leave a comment.