Overview
SPF, DKIM, and DMARC are DNS records on your domain. Receiving mail servers, such as Gmail and Outlook, check them to confirm that an email really comes from your domain. Without them, your emails are more likely to land in spam or be rejected.
Gravity SMTP sends your WordPress emails through an email provider, such as SendGrid or Mailgun. To send from your own domain, add the records your provider provides to your domain’s DNS. This article explains what each record does. For the exact values, follow the domain article for your provider.
SPF
SPF (Sender Policy Framework) is a TXT record that lists the servers allowed to send email for your domain. When an email arrives, the receiving server checks whether the sending server is on that list.
v=spf1 include:_spf.example-provider.com ~all
- A domain can have only one SPF record. If you already have one, add your provider’s
include:to it instead of creating a second record. - SPF allows at most 10 DNS lookups. Each
include:counts, so remove services you no longer use.
DKIM
DKIM (DomainKeys Identified Mail) adds a digital signature to every email. Your provider signs the email with a private key, and the receiving server checks the signature against the public key published in your DNS. A valid signature indicates the email originated from your domain and wasn’t altered in transit.
Providers give you the DKIM record as a TXT or CNAME record. Add it exactly as shown, including the selector in the record name (for example, s1._domainkey).
DMARC
DMARC (Domain-based Message Authentication, Reporting and Conformance) tells receiving servers what to do when an email fails SPF and DKIM checks that match your From domain, and where to send reports. It is a TXT record on _dmarc.yourdomain.com.
v=DMARC1; p=none; rua=mailto:[email protected]
| Policy | What happens to failing emails |
|---|---|
p=none | Delivered as usual. Use this to start and read the reports. |
p=quarantine | Sent to spam. |
p=reject | Rejected. |
Start with p=none. Once the reports show that all your legitimate email passes, move to quarantine or reject.
Note: The DMARC policy is a request. Receiving servers usually follow it, but they aren’t required to.
Setting Up the Records
- Add and verify your domain in your email provider’s account. Follow the domain article for your provider in Integrations.
- Copy the SPF, DKIM, and any other records the provider shows into your domain’s DNS at your domain registrar or DNS host.
- Add a DMARC record if your domain doesn’t have one.
- Wait for DNS to update, then verify the domain in your provider’s account. This can take up to 48 hours.
- Send a test email from Gravity SMTP and check the results.
Checking Your Records
To confirm your records are working, open a test email in Gmail and select Show original. SPF, DKIM, and DMARC should each show PASS. You can also look up your records with a free tool such as MXToolbox or the Google Admin Toolbox.
Related Articles
Disclaimer: Third-party services, plugins, or code snippets that are referenced by our Support documentation or in Support Team communications are provided as suggestions only. We do not evaluate, test or officially support third-party solutions. You are wholly responsible for determining if any suggestion given is sufficient to meet the functional, security, legal, ongoing cost and support needs of your project.
Feedback, feature, and integration requests, and other functionality ideas can be submitted at https://gravity.com/feature-request/.