In short. At Gandi, SPF and DMARC are TXT records in your domain's DNS records, and DKIM is a toggle in the email settings when you use Gandi mail and Gandi LiveDNS. Set SPF and DKIM first, then DMARC, and tighten the policy only after reading the reports.
SPF lists the servers allowed to send for your domain, DKIM signs each message, and DMARC tells receivers what to do with mail that fails both. Gandi documents all three for GandiMail in its anti-spoofing help page.
Last verified: November 26, 2026, against Gandi's official documentation (checked November 26, 2026).
Before you start
To add a record: log in, click Domain, click your domain, open the DNS Records tab and click Add. If your email is hosted outside Gandi, ask that provider for its SPF and DKIM values. One SPF record must cover every service that sends with your domain.
1. SPF
Add a TXT record on @ (Gandi's documentation shows a TTL of 10800). Gandi's documented values:
- Gandi mail servers only:
v=spf1 include:_mailcust.gandi.net ?all - Gandi-hosted website that sends email:
v=spf1 include:_spf.gpaas.net ?all - Both:
v=spf1 include:_mailcust.gandi.net include:_spf.gpaas.net ?all
?all is neutral: it gives no verdict on unlisted servers. Once your DMARC reports show that every legitimate sender passes for several weeks, move to ~all or -all (RFC 7208).
2. DKIM
With Gandi mail and Gandi LiveDNS: click Domain, your domain, the Email tab, Edit next to Settings & Security, switch on DKIM Signature, then Update. This requires the domain and the email to be hosted at Gandi and the domain to use Gandi LiveDNS. Otherwise, add three CNAME records (TTL 10800), all three being needed for key rollover:
gm1._domainkeypointing togm1.gandimail.net.gm2._domainkeypointing togm2.gandimail.net.gm3._domainkeypointing togm3.gandimail.net.
3. DMARC
Add a TXT record named _dmarc. Gandi's example is v=DMARC1; p=reject; rua=mailto:[email protected], with the address replaced by yours. Gandi lists the policies none, quarantine and reject, and warns that reject can prevent forwarded mail from being delivered. Start with:
v=DMARC1; p=none; rua=mailto:[email protected]Then tighten DMARC step by step
Start with p=none and read the reports for one to two weeks. Once every legitimate sender passes, move to p=quarantine, then to p=reject after several clean weeks. Never publish quarantine or reject straight away: one forgotten sender, such as an invoicing tool, would have its mail sent to spam or refused. Google recommends the same staged rollout.
Common mistakes
- Two SPF records on the same domain: SPF fails with an error. Merge them into one.
- Two DMARC records on
_dmarc: receivers ignore both. - More than 10 DNS lookups in SPF (each
include:costs at least one; RFC 7208): SPF fails. - Typing the full name in the host field:
_dmarc.yourdomain.comcan become_dmarc.yourdomain.com.yourdomain.com. Enter only_dmarc, and check the result in the list. - Forgetting
mailto:in theruaaddress. - Forgetting other senders (newsletter, invoicing, online shop): each must pass SPF or sign with DKIM for your domain.
Check that it works
Wait for the change to be visible (minutes to hours, sometimes up to 48 hours), then:
nslookup -type=TXT yourdomain.com
nslookup -type=TXT _dmarc.yourdomain.comYou should see one line starting with v=spf1 and one line starting with v=DMARC1. Our free tools read both and the DKIM key: use the SPF, DKIM and DMARC checkers linked above. For a full test, send an email to a Gmail address, open it, choose Show original: SPF, DKIM and DMARC should read PASS.
Free tool. SPF checker · DKIM checker · DMARC checker
Check your domain for free. AttackScout reads your public SPF, DKIM and DMARC records and tells you what to change. Run the free check
Frequently asked questions
Do I need all three at Gandi?
Gmail and Microsoft require SPF, DKIM and DMARC from senders of more than 5,000 messages a day, and a complete setup helps at every volume. DMARC only passes when SPF or DKIM passes with your own domain, so set SPF and DKIM first.
How long before it works?
Providers announce from a few minutes to 48 hours for DNS changes to be visible everywhere. Test after a short wait.
Should I start with p=reject?
No. Start with p=none, read the reports, then tighten.
Related pages
Sources
Accessed on 11/26/2026.
- Gandi, How to protect your email against being spoofed: https://docs.gandi.net/en/gandimail/common_operations/enable_antispoofing_tools.html
- Gandi, DNS records: https://docs.gandi.net/en/domain_names/common_operations/dns_records.html
- IETF, RFC 7208 (SPF): https://www.rfc-editor.org/rfc/rfc7208
- IETF, RFC 9989 (DMARC, May 2026): https://www.rfc-editor.org/info/rfc9989
- Google Workspace, Recommended DMARC rollout: https://knowledge.workspace.google.com/admin/security/recommended-dmarc-rollout