Improve email deliverability using SPF and DKIM
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: firstname.lastname@example.org and you want to send an email to email@example.com.
What happens when you click Send in Gorgias (in simple terms) is this:
- We contact the Gmail email servers and tell them that we want to send an email to firstname.lastname@example.org.
- Gmail says: fine, that email address exists on our servers, from whom is the email?
- Our servers say From: email@example.com
- Gmail: Ok, but how do I know that you have the right to send emails from firstname.lastname@example.org - 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 acme.com 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 gorgias.com servers are allowed to send email on behalf of acme.com.
In order to setup 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 include:spf.gorgias.com ?all
If you already have a TXT record on your root domain that is used for SPF you can simply add
include: spf.gorgias.com alongside the other records (space separated). For example:
v=spf1 include:mailgun.org include:spf.gorgias.com ?all
The change will be taken into effect depending on the TTL you've setup for your TXT record.
DKIM Setup - not supported
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.