How to add SPF, DKIM and DMARC records at OVHcloud
Updated · 9 min read
In short
- Edit the DNS Zone tab in OVHcloud's control panel. The zone only counts if the domain uses OVHcloud's DNS servers.
- Publish SPF with the plain TXT type, and never split a long DKIM key or SPF value across two records: anything over 255 characters is one record made of several strings.
- Leave the DMARC form's percentage empty, and in text mode end every CNAME target with a dot.
On this page
- OVHcloud's zone only counts with OVHcloud's DNS servers
- The DNS Zone tab, and the three ways to add a record
- SPF: use the plain TXT type
- DKIM: OVHcloud's pointers, and long keys from other providers
- DMARC: the form's fixed name, and a field to leave empty
- How to confirm it worked
- What commonly goes wrong at OVHcloud
- Sources, and how current this guide is
OVHcloud's DNS zone editor has a form for each of the three records — SPF, DKIM and DMARC — as well as a plain TXT type, and the forms do help with syntax. Two statements in OVHcloud's documentation need care, though: it caps a TXT value at 255 characters everywhere but its zone text editor, and it suggests that a longer value can be split across several records, which is the one thing a DKIM key or an SPF record cannot survive.
This guide uses the labels OVHcloud's documentation gives today: Create a record for adding one entry, and Modify zone for editing the whole zone as text. Older guides on the web may use other names for the same two actions.
Checked against OVHcloud help, 2026-11-19. OVHcloud can rename a menu or move a button without notice, so treat the labels below as a dated snapshot: where your screen differs, look for the field each step describes. The pages we read are listed at the end, and where they say nothing, this guide says so rather than guessing.
Check yours now
OVHcloud's zone only counts with OVHcloud's DNS servers
OVHcloud says its DNS zone works only with OVHcloud DNS servers, and that a domain using other DNS servers has to be configured through whoever provides them. A domain can also have only one active DNS zone at a time.
So check before editing. If the lookup below names servers that are not OVHcloud's, the zone in your control panel is not the one the world reads, however complete it looks.
dig +short NS example.comThe DNS Zone tab, and the three ways to add a record
In the control panel, go to Domains & DNS, choose the domain, and open the DNS Zone tab. Create a record opens the form, where the Type list includes TXT, SPF, DKIM and DMARC alongside the usual A, CNAME and MX. The form previews the exact line it will add to the zone, and that preview is the best place to catch a mistake.
The SPF, DKIM and DMARC types are forms, not separate kinds of DNS record. OVHcloud says the DKIM entry is actually a TXT record in the zone and that the DMARC entry is read as a TXT record. What the SPF form publishes is not stated, which is one reason to prefer the plain TXT type for SPF.
- Subdomain: the part in front of the domain, such as _dmarc; OVHcloud adds the domain for you. Its editing guide does not say whether a record for the domain itself takes @ or an empty field, so check the Record preview, which shows the exact line that will be added.
- The value, which the general editing guide calls Target and the SPF guide calls Value.
- TTL: Default, meaning the zone's default TTL shown on the DNS zone card, or Custom. OVHcloud does not state the default in seconds; its own examples use 3600.
There is also a text mode, under More actions and then Modify zone, which shows the whole zone as text. OVHcloud marks it for informed users only. Its Use diff mode button shows exactly what you are about to change, and it is the place that matters for a long DKIM key.
SPF: use the plain TXT type
OVHcloud's SPF form builds the record from tick boxes — Include OVH email servers (include:mx.ovh.com), Allow domain MX servers (mx), Allow the domain's IP address (a) — plus fields for other includes and addresses, and a policy. OVHcloud also documents the alternative: choose the TXT type instead and paste the complete v=spf1 value. Use the TXT type. You see exactly what is published, you do not inherit an mx or an a entry for servers that may never send mail, and nothing depends on what the form chooses to write.
Look at the zone before adding anything. OVHcloud's SPF guide says you may find an SPF record for its own email solutions already there, listed under the TXT or the SPF type, and that if you no longer use them you must modify it. Edit that record rather than adding a second one.
For OVHcloud's own mail — MX Plan, Email Pro and Hosted Exchange — OVHcloud gives v=spf1 include:mx.ovh.com ~all. For Google Workspace or Microsoft 365, use their include instead, and put every other sending service into the same record: there must be exactly one SPF record, a rule OVHcloud's SPF guide does not spell out.
On the ending, OVHcloud's guide contradicts itself. Its form preselects ~all and labels it Recommended, while its text strongly recommends -all. Both are right at different times: start with ~all, which marks unlisted mail instead of refusing it, and move to -all once DMARC reports show every legitimate source passing.
DKIM: OVHcloud's pointers, and long keys from other providers
OVHcloud's own mail offers sign with two CNAME records each, named after the service — ovhmo3456789-selector1._domainkey and its selector2 twin in OVHcloud's MX Plan example — pointing into dkim.mail.ovh.net. When the zone is in the same OVHcloud account, OVHcloud adds them for you; otherwise the control panel lists them as expected records to add wherever your DNS is hosted. OVHcloud says activation takes between 30 minutes and 24 hours, and its error codes name the usual faults, such as 504, “One CNAME record is missing”.
For another provider's CNAMEs, such as Microsoft 365's selector1._domainkey and selector2._domainkey, use the CNAME type with only selector1._domainkey as the Subdomain, because OVHcloud adds the domain, and the target Microsoft gives you as the value. The form adds the final dot to a target by itself. In text mode it does not, and OVHcloud says you must add it: without the final dot the target is read as a name inside your own zone, your domain is appended to it, and DKIM fails.
The DKIM form is for keys published as text. Its Selector field takes the selector alone — google, not google._domainkey — because OVHcloud adds the ._domainkey suffix and the domain itself. Typing the suffix as well would publish the key at google._domainkey._domainkey.
The difficulty is length. OVHcloud states that a TXT record is limited to 255 characters, that in some cases a value can be split into several records, and that the limit does not apply when you edit the zone with Modify zone. Never split a DKIM key or an SPF value into several records: two TXT records holding halves of a key are two broken keys, and two records starting v=spf1 are a permanent SPF error. A value longer than 255 characters has to be one record made of several quoted strings, which receivers join back together. OVHcloud does not say whether its DKIM form stores a 2048-bit key that way, so publish it and let the DKIM checker confirm the key is whole; a key cut off at 255 characters is reported as such.
If the form will not hold the whole key, add the record in text mode, where OVHcloud says the limit does not apply, as one record with several strings, as below, comparing it with the lines already in your zone and checking the change in diff mode before saving; our DKIM record generator splits a key into strings of the right size. Google also lets you generate a 1024-bit key for hosts that cannot hold a longer value: it fits in one string and still verifies, but it is the weaker choice, and our DKIM checker reports it as such.
; one record, two strings; receivers join them with nothing in between
google._domainkey IN TXT ( "v=DKIM1; k=rsa; p=<first part of the key>"
"<the rest of the key>" )DMARC: the form's fixed name, and a field to leave empty
The DMARC form fills in the Subdomain as _dmarc and does not let you change it, which is the right name for the domain itself; for a subdomain's own policy, OVHcloud says to use the TXT type with _dmarc followed by the subdomain. The form then asks for the policy (Rule for the domain, p=), a percentage (pct=), the reporting address (rua=), a policy for subdomains (sp=) and SPF alignment (aspf=).
Leave the percentage empty. OVHcloud's examples carry pct=100, but the 2026 revision of DMARC removed the tag, and leaving it out already means the policy applies to all mail. If the form will not save without one, use the TXT type and paste the record instead. For the reporting address, OVHcloud notes that mailto: must come first.
OVHcloud's guide recommends starting at p=none for several weeks of report analysis, although both of its own example records use quarantine. Start at p=none only if you do not yet know every service that sends as you, and treat it as what it is: monitoring, with no protection. The record to aim for is v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com, then reject.
How to confirm it worked
OVHcloud allows up to 24 hours for a zone change to take full effect, and between 4 and 24 hours in its SPF guide. The old record's TTL decides how long other servers keep their copy, so a record you correct may take that long to look right everywhere.
Read the records back with the lookups below. For a CNAME added in text mode, the answer must end in the provider's own domain; if it ends in yours, the final dot was missing. For a long DKIM key, the DKIM checker reports both the key's length and whether it looks cut off.
Then run the SPF checker, the DKIM checker with your selector, and the DMARC checker, and send a message to an outside mailbox: its Authentication-Results header should show spf=pass, dkim=pass and dmarc=pass. For OVHcloud's own mail, the DKIM status in the control panel should read as configured rather than as an error.
# exactly one line, starting v=spf1
dig +short TXT example.com | grep spf1
# one record; its strings join into one key
dig +short TXT google._domainkey.example.com
# the target must not end in your own domain
dig +short CNAME selector1._domainkey.example.com
# exactly one v=DMARC1 record
dig +short TXT _dmarc.example.comWhat commonly goes wrong at OVHcloud
- A long DKIM key or SPF value split into two TXT records, as OVHcloud's records guide suggests for long values.
- A CNAME target typed in text mode without its final dot.
- google._domainkey typed into the DKIM form's Selector field, doubling the suffix.
- A pct=100 copied from OVHcloud's examples, a tag removed from DMARC in 2026.
- A TXT record left at a name that is also a CNAME. OVHcloud warns that it disrupts the CNAME, which for a DKIM selector means the key cannot be found.
- A second DMARC record, created with the DMARC form while a TXT record at _dmarc already existed. The two ways of adding one make this easy, and receivers then apply neither.
- The SPF form's mx and a boxes ticked for a domain whose web and mail servers never send mail, which spends lookups on servers that should not be on the list.
Sources, and how current this guide is
We read every page below on 2026-11-19 and wrote this guide from what they say, without screenshots, which go out of date faster than the text beside them.
From OVHcloud's own help:
- Editing an OVHcloud DNS zone (docs.ovhcloud.com)
- Everything you need to know about DNS records (docs.ovhcloud.com)
- How to improve email security with an SPF record (docs.ovhcloud.com)
- How to improve email security with a DKIM record (docs.ovhcloud.com)
- How to improve email security with a DMARC record (docs.ovhcloud.com)
- Configure an MX record for email management (docs.ovhcloud.com)
- How to add a domain name to your Exchange service (docs.ovhcloud.com)
From Google's and Microsoft's documentation, read the same day, for the steps that depend on the mail provider:
- Google Workspace Admin Help, Set up SPF (knowledge.workspace.google.com)
- Google Workspace Admin Help, Set up DKIM (knowledge.workspace.google.com)
- Microsoft Learn, Set up SPF to identify valid email sources for your Microsoft 365 domain (learn.microsoft.com)
- Microsoft Learn, How to use DKIM for email in your custom domain (learn.microsoft.com)
- Google Workspace Admin Help, Troubleshoot DKIM issues (knowledge.workspace.google.com)
Check your domain with the SPF checker