Improve email deliverability using SPF and DKIM - Deprecated

Updated 3 months ago by Alex Plugaru

Note: If you're using our Gmail or Outlook native integration, then you don't need to follow this part of the guide, since Gmail and Outlook set it up for you. This is, however, really important if you have an email integration that was set up via forwarding.

If you have some customers complaining that they didn't receive your email or that it arrived in their Spam/Junk folder, then you're in the right place. Even if nobody complained and you're just setting your account up, it's a good idea to follow these steps anyway.

First, to understand why those emails arrive in the Spam folder, we need to look at how we send emails through Gorgias. Suppose you added an Email Integration and your address is: and you want to send an email to

What happens when you click Send in Gorgias (in simple terms) is this:

  1. We contact the Gmail email servers and tell them that we want to send an email to
  2. Gmail says: fine, that email address exists on our servers, from whom is the email?
  3. Our servers say From:
  4. Gmail: Ok, but how do I know that you have the right to send emails from - what if you're a spammer, eh?

To answer that last question, we have to somehow prove that we're allowed to send email on behalf of email addresses. That is where SPF (Sender Policy Framework) comes in. SPF is a simple mechanism that uses a DNS record on your domain to answer that exact question. Which is to say that the IP addresses of servers are allowed to send an email on behalf of

Setup instructions


In order to set up SPF, you have to be able to change the DNS records of your domain. The process of setting up an SPF DNS TXT record is different for different domain registrars and we cannot possibly cover them all, but here are some instructions for a few major ones: 

Once you're logged in and able to modify your DNS records, you need to add this TXT record:

v=spf1 ?all

If you already have a TXT record on your root domain that is used for SPF you can simply add include: alongside the other records (space separated). For example:

v=spf1 ?all

The change will be taken into effect depending on the TTL you've setup for your TXT record. 


Currently, DKIM support is not supported in Gorgias. If you have a DMARC policy setup, our suggestion is to relax it to support SPF only.


  • Error message: "Unauthenticated email from xxx is not accepted due to domain's DMARC policy. Please contact the administrator".

You will need to relax your DMARC policy setup to support SPF only.

  • I have a direct Gmail/Outlook integration, but my emails are still not reaching my customers.

In cases like this one, no SPF setup is necessary, as this was done automatically by Gmail/Outlook. We recommend performing a spam test to check if your emails are deliverable.

What do you think? Yay or Nay?