schedule 18-min read

How to Add a DMARC Record at Gandi

DMARC AI editorial team · Last updated

Add a DMARC TXT record at Gandi: LiveDNS checks, DNS Records tab in table or text mode, the LiveDNS API with a personal access token, and MSP tips.

01

How do you add a DMARC record at Gandi?

To add a DMARC record at Gandi, log in, click Domain, select the domain and open the DNS Records tab. Click the green Add button, create a TXT record named _dmarc with a value such as v=DMARC1; p=none; rua=mailto:reports@example.net, and confirm. This works when the domain uses Gandi LiveDNS.

Gandi is a French registrar, so many European MSPs (managed service providers) meet it on client domains. This guide covers the LiveDNS check, table mode and text mode in the DNS Records tab, what Gandi documents for SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) on its own mail service, the LiveDNS API with a personal access token, organisation and team access for MSPs, verification with dig, and common mistakes. For the protocol itself, start with the DMARC guide.

Interface note: labels follow Gandi's documentation on docs.gandi.net and api.gandi.net as read in November 2026. Gandi's DNS guide names the DNS Records tab, the green Add button and the Edit DNS Records button for text mode, but it does not name the fields in the Add dialog. Use the fields you see, then confirm the result with dig.

02

Key takeaways

  • DMARC at Gandi is a TXT record at _dmarc. Enter the prefix, not the full domain name.
  • The record only counts when the domain uses Gandi LiveDNS nameservers. If the domain points elsewhere, add _dmarc at that DNS host.
  • Gandi's own DMARC example uses p=reject. Start at p=none instead and move up once your reports are clean.
  • LiveDNS enforces a minimum TTL of 300 seconds, in the panel and in the API.
  • Leave out pct, ri and rf. RFC 9989 removed them; go from p=none to p=quarantine to p=reject in whole steps.
03

Is the domain's DNS actually hosted on Gandi LiveDNS?

Check this first, because Gandi only serves records you add in its panel when the domain uses its LiveDNS nameservers. Gandi's guide to updating DNS records says "DNS records are provided through your nameserver", and records for a domain on an external nameserver must be edited with that provider.

Run a nameserver lookup:

$ dig +short NS example.fr
ns-123-a.gandi.net.
ns-123-b.gandi.net.
ns-123-c.gandi.net.

The names above are illustrative. Gandi's vanity nameservers page writes a nameserver as ns-x-a.gandi.net in its examples, and the LiveDNS API reference says that a zone without NS records at @ gets three hashed nameservers in the form ns-{123}-{abc}.gandi.net. You can also open the domain in the Gandi account and check its Nameservers tab. On Windows, run nslookup -type=NS example.fr, or use our DNS lookup tool.

Nameservers point to Where to add _dmarc
Gandi LiveDNS (ns-...gandi.net) Gandi DNS Records tab or the LiveDNS API
Gandi Classic DNS (a.dns.gandi.net, b.dns.gandi.net, c.dns.gandi.net) Switch to LiveDNS first (see below)
Cloudflare See how to add a DMARC record in Cloudflare DNS
Amazon Route 53 (awsdns) See how to add a DMARC record in Amazon Route 53
A web host's DNS The host's panel, for example cPanel or IONOS
Hover (ns1.hover.com, ns2.hover.com) See how to add a DMARC record at Hover
Hetzner (hydrogen.ns.hetzner.com and siblings) See how to add a DMARC record in Hetzner DNS
OVHcloud (ovh.net name servers) See how to add a DMARC record at OVHcloud

What if the domain is still on Gandi Classic DNS?

Move it to LiveDNS. Gandi's end of Classic DNS announcement (August 2026) says Classic DNS uses a.dns.gandi.net, b.dns.gandi.net and c.dns.gandi.net, that most domains are migrated automatically, and that existing records are kept. The migration and standard LiveDNS are free.

To switch yourself, Gandi's nameserver guide says: click Domain, click the domain, open the nameservers tab, click Change, pick the Gandi's Live DNS option, click Save, choose between your custom records and Gandi's LiveDNS default records, then click Switch to LiveDNS. Gandi asks you to allow 12 to 24 hours for propagation before testing.

04

What are the exact steps in the Gandi DNS Records tab?

Open the domain's DNS Records tab, click Add, choose TXT, enter _dmarc as the name and the DMARC string as the value, and confirm. The navigation follows Gandi's guide to updating DNS records, which calls this table mode.

  1. Log in to Gandi with an account that can manage the domain, either as owner or through the organisation that owns it.
  2. Click Domain in the left navigation menu.
  3. Click the domain, for example example.fr.
  4. Select the DNS Records tab.
  5. Optional but useful: click Save a backup so you can roll back with Restore. Gandi documents backups for LiveDNS only.
  6. Look for an existing TXT record at _dmarc. If one exists, edit it with the green pencil instead of adding a second.
  7. Click the green Add button above the table.
  8. In the dialog, choose the TXT type, enter _dmarc as the name, a TTL of 300 seconds or more, and the DMARC string as the value.
  9. Confirm. Gandi says new LiveDNS records are made "in real time in our zone".

A first record in monitoring mode:

v=DMARC1; p=none; rua=mailto:dmarc-reports@example.net

Gandi's DNS records FAQ says "The minimum TTL value that we enforce at Gandi with our LiveDNS is 300 seconds", and it warns that changes can take a couple of hours to be seen everywhere. If you need help with the syntax, use the DMARC record generator or follow how to create a DMARC record step by step.

Do you enter _dmarc or _dmarc.example.fr as the name?

Enter _dmarc. Gandi's TXT record page uses @ for the bare domain and a subdomain label such as www for a subdomain, so names are relative to the zone. The DMARC record sits at _dmarc.example.fr, so the label is _dmarc. For shop.example.fr, enter _dmarc.shop.

Do not put the DMARC string at @. That is where SPF lives, and receivers never read a TXT record at the apex as a DMARC policy. More patterns are in DMARC record examples for common setups.

How do you add the record in text mode?

Click Edit DNS Records in the DNS Records tab, add one line for _dmarc to the zone file, then click Save. Gandi describes text mode as editing "the entire zone file on your own", for people who know the record format. Gandi's helpdesk DMARC article shows the line in this form:

_dmarc 10800 IN TXT "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.net"

In zone file syntax the value goes in double quotation marks. The number is the TTL in seconds; 10800 is Gandi's example, and anything from 300 upwards is accepted. Text mode replaces the whole zone when you save, so take a backup first and do not delete lines you do not recognise. Gandi's TXT page also says each string is limited to 255 characters, so a very long record must be split into several quoted strings. A normal DMARC record is far shorter.

05

Does Gandi's documentation recommend a DMARC policy?

Gandi's anti-spoofing guide shows a TXT record at _dmarc with the example "v=DMARC1; p=reject; rua=mailto:user@domain.tld" and explains the none, quarantine and reject options. It also warns that a reject policy can stop forwarded mail from being delivered.

Treat that example as the end state, not the first step. Jumping straight to p=reject before you have read any reports risks blocking legitimate mail from a CRM, billing tool or forwarder you forgot about. DMARC and email forwarding explains the forwarding case in detail.

06

What does Gandi document for SPF and DKIM?

For mail sent through Gandi's own email service, Gandi documents both records. For mail hosted elsewhere, it tells you to ask that provider. Either way, the records go in the same DNS Records tab as DMARC.

From Gandi's anti-spoofing guide:

What sends mail SPF TXT record at @ (Gandi's values)
Gandi mail servers v=spf1 include:_mailcust.gandi.net ?all
A Gandi-hosted website (contact forms) v=spf1 include:_spf.gpaas.net ?all
Both v=spf1 include:_mailcust.gandi.net include:_spf.gpaas.net ?all

For DKIM on a domain whose mail and DNS are both at Gandi with LiveDNS, the guide says to open the domain's Email tab, click Edit next to Settings & Security, switch on DKIM Signature and click Update. If Gandi hosts the mail but the domain uses another nameserver, you add three CNAME records yourself, all of which Gandi says are needed for key rotation:

gm1._domainkey  CNAME  gm1.gandimail.net.
gm2._domainkey  CNAME  gm2.gandimail.net.
gm3._domainkey  CNAME  gm3.gandimail.net.

Gandi's SPF examples end in ?all (neutral). Many administrators tighten this to ~all or -all once every sender is listed; how to create an SPF record explains the choice. A domain can only have one SPF record, so if staff mail runs on Microsoft 365 or Google Workspace while the website sends through Gandi, merge the includes as described in multiple SPF records: how to merge them. For other senders, follow how to set up DKIM.

To pass DMARC, SPF or DKIM must pass for a domain that aligns with the visible From domain. DMARC alignment explained covers why.

07

How do you add the DMARC record with the Gandi LiveDNS API?

Send a PUT to https://api.gandi.net/v5/livedns/domains/{fqdn}/records/_dmarc/TXT with an Authorization: Bearer header carrying a personal access token (PAT) and a JSON body with rrset_values and rrset_ttl. The LiveDNS API reference says PUT overwrites the record with that name and type, so it is safe to repeat.

curl -X PUT 
  -H "Authorization: Bearer $GANDI_PAT" 
  -H "Content-Type: application/json" 
  -d '{"rrset_values":[""v=DMARC1; p=none; rua=mailto:dmarc-reports@example.net""],"rrset_ttl":300}' 
  "https://api.gandi.net/v5/livedns/domains/example.fr/records/_dmarc/TXT"

Note the escaped inner quotation marks. Gandi's own TXT example in the reference is ""v=spf1 include:_mailcust.gandi.net ?all"", so each TXT value is sent with its quotes. rrset_ttl accepts 300 to 2592000 seconds.

Other calls on the same path:

Method What the reference says it does
GET Returns the record, or 404 if the name and type pair does not exist
POST Creates the record; returns 409 if one with that name and type already exists
PUT Overwrites the record with that name and type
PATCH Adds or removes individual values with add_rrset_values and remove_rrset_values
DELETE Deletes the record (204)

To read the whole zone as a zone file, send GET /v5/livedns/domains/example.fr/records with Accept: text/plain. Prefer PUT over PATCH for DMARC: add_rrset_values would add a second string to the record set, which gives receivers two DMARC records.

How do you create a Gandi personal access token?

Gandi's authentication docs say PATs are created in the Gandi Admin account settings: select an organisation, then click Create a token, and choose the token's permissions and resources in the form. A PAT belongs to one organisation and cannot be shared across several. PATs expire, so plan rotation; Gandi offers a Renew PAT API call.

The older API key, sent as Authorization: Apikey ..., is marked deprecated. It cannot be scoped and carries the owner's full permissions, so move scripts to PATs. The old dns.api.gandi.net/api/v5 LiveDNS API with an X-Api-Key header is also legacy: its documentation says there will be no future development and points to the new reference.

08

Which DMARC values should you use under RFC 9989?

Start at p=none with a rua address, fix your senders, then publish p=quarantine and later p=reject as whole steps. RFC 9989 replaced RFC 7489 in 2026. It removed pct, ri and rf, added np, psd and t, and replaced the Public Suffix List with a DNS tree walk.

RFC 9989 Section 4.7 defines t=y (testing mode), which asks receivers to apply the next lower policy. It is a cautious first step at a new level, not a percentage ramp.

Stage TXT value at _dmarc
Monitoring v=DMARC1; p=none; rua=mailto:dmarc-reports@example.net
Cautious quarantine v=DMARC1; p=quarantine; t=y; rua=mailto:dmarc-reports@example.net
Quarantine v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.net
Reject v=DMARC1; p=reject; rua=mailto:dmarc-reports@example.net

Change policy by editing the one record. RFC 9989 Section 4.10 says that if multiple DMARC records are returned for a name, they are all discarded. New DMARC tags: np, psd and t explains the new tags, and why partial enforcement was dropped covers what replaced the ramp.

Do you need an RFC 9990 authorisation record for reports?

Yes, when the rua address sits on a different domain from the one publishing the policy. RFC 9990 has receivers check for a TXT record at <policy domain>._report._dmarc.<destination host> that starts with v=DMARC1. Your reporting provider usually publishes it; see authorising external DMARC report destinations.

If the report mailbox is on another domain you control at Gandi, add that record yourself in the destination domain's DNS Records tab. For reports from example.fr going to reports.example.net, the label in the example.net zone is example.fr._report._dmarc.reports with the value v=DMARC1.

09

How do you verify the DMARC record after publishing?

Query _dmarc and confirm that exactly one record starting with v=DMARC1 comes back. Ask one of the domain's Gandi nameservers directly as well, so a cached answer from a public resolver does not mislead you.

$ dig +short NS example.fr
$ dig @ns-123-a.gandi.net +short TXT _dmarc.example.fr
"v=DMARC1; p=none; rua=mailto:dmarc-reports@example.net"

$ dig +short TXT _dmarc.example.fr

Replace ns-123-a.gandi.net with a nameserver from the first command. On Windows:

nslookup -type=TXT _dmarc.example.fr
Resolve-DnsName -Name _dmarc.example.fr -Type TXT

What the result means:

  • Present at the Gandi nameserver, missing in a public lookup. Cached answer. Wait for the old TTL to expire.
  • Missing at the Gandi nameserver too. Wrong label, wrong organisation, or the domain is not on LiveDNS. Try dig TXT _dmarc.example.fr.example.fr for a doubled name.
  • Two strings starting with v=DMARC1. Two records, or two values in one record set. Delete one.
  • Value appears at example.fr. The name was @. Move it to _dmarc.

The DMARC checker validates syntax and flags duplicates, and how to check your DMARC policy explains each result. How to fix "no DMARC record found" covers an empty answer.

10

What are the common Gandi DMARC mistakes?

Most problems come from editing a zone that is not live, using the wrong name, or ending up with two _dmarc values when changing policy.

Symptom Likely cause Fix
Record shows in the panel, dig returns nothing Domain uses external nameservers or Classic DNS Switch to LiveDNS, or add the record at the live DNS host
Policy sits on the root domain Name set to @ Recreate with the name _dmarc
Record found only at a doubled name Full domain typed as the name Delete it and re-add with _dmarc
Checker reports no valid policy Second record added, or PATCH with add_rrset_values Keep one value; edit or use PUT
API call returns 409 POST on a name and type that already exists Use PUT to overwrite
TTL rejected Below 300 seconds Use 300 or more
Zone lost records after a text mode edit Lines deleted when saving the full zone file Click Restore and pick the backup
Forwarded mail bounces after p=reject Forwarding breaks SPF, as Gandi warns Check reports first; rely on DKIM alignment
No aggregate reports arrive No rua, or external address not authorised Add rua; publish the RFC 9990 record
11

How should MSPs manage client domains at Gandi?

Use one Gandi organisation per client and a team with only the DNS permission, rather than sharing a client's login. Gandi's reseller versus organisation page says a person can belong to several organisations, so an MSP can run a separate one per client, and each client sees only its own.

  • Teams and permissions. Gandi's team permissions guide lists Manage domain name technical configurations, which covers nameservers, DNS records, glue records, DNSSEC and web forwarding. Set it under Organizations, the organisation, Manage your teams, the team, then Permissions. Leave owner changes and outgoing transfers off.
  • Quickshare for one-off access. Gandi's Teams versus Quickshare page describes Quickshare as sharing individual products with individuals through a product's Sharing tab. It suits a single domain owned by a client without an organisation.
  • One token per organisation. A PAT cannot span organisations, which matches a per-client setup. Store each client's token separately and rotate before expiry.
  • Backups and inventory. Take a backup before each change, export the DNS records to CSV from the Domains list, and log changes in a DMARC change-management policy.
  • Offboarding. Remove yourself from the client's team and revoke tokens; tenant offboarding covers handing DMARC back.

A read-only check across a client's domains, using one token per organisation:

for d in example.fr example.eu example.com; do
  curl -s -H "Authorization: Bearer $GANDI_PAT" 
    "https://api.gandi.net/v5/livedns/domains/$d/records/_dmarc/TXT" | grep -o 'v=DMARC1[^"\]*'
done

DMARC AI collects aggregate reports for every client domain in one multi-tenant view and classifies sending sources with AI, so after a Gandi change you can confirm that reports arrive and that each client's senders align before you enforce. Multi-tenant DMARC management explains why per-client separation matters, and DMARC for MSPs covers running it as a service.

12

Does it matter that Gandi is an EU registrar?

Not for the record itself. DMARC works the same way at any DNS host, and receivers only see the published TXT value. Gandi is a company incorporated under French law, based in Paris, according to its about page. That can simplify supplier documentation for EU clients, but where the aggregate reports go is decided by your rua address, not by the registrar.

For EU clients covered by NIS2, DMARC often appears in security baselines; see NIS2 obligations for MSPs and DMARC implications. UK clients on Gandi domains can follow the same rollout described in what the NCSC recommends for DMARC.

13

FAQ

Does Gandi add a DMARC record automatically?

Gandi's documentation does not describe automatic DMARC creation. Its anti-spoofing guide tells you to add a TXT record at _dmarc yourself, and its example uses p=reject. Check with dig TXT _dmarc.example.fr. If nothing comes back, add a record starting at p=none in the DNS Records tab or through the LiveDNS API.

What name does Gandi need for a DMARC record?

Enter _dmarc as the record name. Gandi's zone names are relative, with @ for the bare domain and a label such as www for a subdomain, so do not type _dmarc.example.fr. For a subdomain such as shop.example.fr, use _dmarc.shop. In the LiveDNS API, put _dmarc and TXT in the URL path.

Should the DMARC value have quotation marks at Gandi?

In text mode, yes: zone file syntax puts TXT values in double quotes, as Gandi's own example line does. In the LiveDNS API, Gandi's TXT example sends the value with escaped inner quotes inside rrset_values. In the table mode dialog, check with dig afterwards that one clean string comes back without doubled quotes.

Why does my Gandi DMARC record not show up in lookups?

Usually the domain is not using Gandi LiveDNS, so the record you added is not served. Run dig NS to see the live nameservers. Other causes are a doubled name such as _dmarc.example.fr.example.fr, or a cached answer. Gandi says changes can take a couple of hours to be seen everywhere.

Can an MSP edit Gandi DNS without the client's password?

Yes. The client can add the MSP to a team in their Gandi organisation with the Manage domain name technical configurations permission, or share a single domain through Quickshare. For scripts, a personal access token created in that organisation gives API access, and it cannot be reused across other organisations.

14

What are the next steps after publishing p=none?

Collect aggregate reports for a few weeks, fix every legitimate sender that fails alignment, then edit the record to p=quarantine and later p=reject. Each step changes the whole domain at once, because RFC 9989 removed pct.

  1. Publish p=none with a rua address and confirm reports arrive.
  2. List every sending source: Gandi mail, the website, Microsoft 365 or Google Workspace, CRM and billing tools.
  3. Align SPF or DKIM for each one, including Gandi's DKIM Signature setting if you use Gandi mail.
  4. Edit the record to p=quarantine, then to p=reject once reports are clean.
  5. Add np=reject for non-existent subdomains if you want; see non-existent subdomains and the np tag.

Moving from monitoring to enforcement safely walks through each step.

Related articles

Related tools

Ready to Implement?

Get authenticated mail moving in minutes: start free, book a guided demo, or talk to the team about your stack.