schedule 14-min read

How to Add a DMARC Record in Hetzner DNS

DMARC AI editorial team · Last updated

Add a Hetzner DMARC record in Hetzner Console DNS: the _dmarc TXT name, quoting, TTL, the Cloud API route for many zones, dig checks and common mistakes.

01

How do you add a DMARC record in Hetzner DNS?

To add a Hetzner DMARC record, open the project in Hetzner Console, click DNS, select the zone and add a TXT record. Use _dmarc as the name and a quoted value such as "v=DMARC1; p=none; rua=mailto:dmarc@example.com". Then click Add and check the result with dig.

Hetzner now runs DNS inside Hetzner Console. The separate DNS Console at dns.hetzner.com has been shut down, along with its old API. This guide covers the record, quoting and TTL, the Cloud API route for many zones, and common mistakes.

02

Key takeaways

  • The record is a TXT record named _dmarc in the zone. Hetzner Console appends the zone name, so do not type _dmarc.example.com.
  • Hetzner's TXT documentation says the value has to be quoted, and each quoted sub-string can hold up to 255 characters.
  • The old DNS Console and its API were removed in May 2026. Zones and automation now live in Hetzner Console and the Hetzner Cloud API.
  • Start at p=none with a rua address. Move to p=quarantine, then p=reject. Do not copy the percentage tag from Hetzner's generic TXT example: RFC 9989 removed it.
  • Cloud API tokens are scoped per project, which gives MSPs a clean way to separate clients.
03

What happened to the Hetzner DNS Console?

The Hetzner DNS Console at dns.hetzner.com no longer exists. Hetzner moved DNS into Hetzner Console in a beta from 7 October 2025, made it generally available on 10 November 2025, and removed the old console and its API on 27 May 2026. Requests to dns.hetzner.com now redirect to console.hetzner.com.

The dates come from Hetzner's What's New page, its Cloud API changelog and the status page entry on the shutdown of the DNS Console.

Date What changed Source
7 Oct 2025 DNS in Hetzner Console and new DNS API enter beta Hetzner Cloud What's New
10 Nov 2025 General availability; no new zones at dns.hetzner.com Hetzner Cloud changelog
9 Jan 2026 Shutdown of DNS Console announced for May 2026 Hetzner status page
20 May 2026 Old console and API set to read-only Hetzner status page
27 May 2026 Old console and API removed Hetzner status page

Update any runbook that still says "log in to dns.hetzner.com". Old scripts that call the DNS Console API have stopped working, and Hetzner's features and integrations page says old DNS Console tokens do not work with the Cloud API.

04

Is the domain's DNS actually hosted at Hetzner?

Check before you edit anything. A zone in Hetzner Console only works if the domain's registrar delegates to Hetzner's nameservers. Run dig NS example.com +short and compare the answer with the Name servers tab of the zone in Hetzner Console. If they differ, add the record wherever DNS really lives.

dig NS example.com +short
hydrogen.ns.hetzner.com.
oxygen.ns.hetzner.com.
helium.ns.hetzner.de.

Hetzner's DNS overview lists hydrogen.ns.hetzner.com, oxygen.ns.hetzner.com and helium.ns.hetzner.de as primary nameservers. It lists a separate set for konsoleH customers. The guide to updating name servers tells you to copy the addresses from the zone's Name servers tab, and notes that changes can take up to 48 hours.

There is a second reason to check. Hetzner's DNS FAQ says a zone that stays incorrectly delegated for more than 28 days is deleted automatically. A record added to an unused zone does nothing, and the zone itself may disappear.

05

What are the steps in Hetzner Console?

The steps are short. Hetzner's adding records guide says: open your project, click DNS, select the zone, choose the record type, fill in the fields and click Add. For DMARC, the type is TXT and the name is _dmarc.

  1. Sign in to Hetzner Console and open the project that holds the zone.
  2. Click DNS in the left menu.
  3. Select the zone, for example example.com.
  4. Click Type and choose TXT.
  5. Enter _dmarc as the name.
  6. Enter the value in quotes: "v=DMARC1; p=none; rua=mailto:dmarc@example.com".
  7. Leave the TTL at the zone default, or set a value of 60 seconds or more.
  8. Optionally add a comment, such as the ticket number. Hetzner Console supports a comment per record.
  9. Click Add.

Do you enter _dmarc or _dmarc.example.com?

Enter _dmarc. The name is relative to the zone. The Cloud API reference says an RRSet name "must not end with a dot or the Zone", and that the zone apex is @. If you type the full name, you risk creating _dmarc.example.com.example.com, which no receiver will ever query.

Can you create the zone and record in one step?

Yes, through a zone file import. Hetzner's creating a zone guide offers Create an empty zone, Import zone file or Secondary. An empty zone starts with only NS and SOA records, so nothing is copied from the old DNS host. If you migrate a client, export the old zone and import it, then check that the _dmarc record came across.

06

How should the TXT value be quoted, and how long can it be?

Quote the whole value in double quotes. Hetzner's TXT record page says "The value has to be quoted." A value can contain several sub-strings, and each sub-string can be at most 255 characters. Receivers join the sub-strings back together before parsing.

A normal DMARC record is far below 255 characters, so one quoted string is enough:

_dmarc  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@example.com"

If you add several report addresses and the value grows past 255 characters, split it into adjacent quoted strings. Split at a point that is not inside a tag value, for readability:

_dmarc  TXT  "v=DMARC1; p=quarantine; np=reject; rua=mailto:dmarc@example.com," "mailto:reports@msp.example.net"

RFC 9989 says a DMARC evaluator must join the strings in order and parse the result as one string. The join adds no space, so the comma must sit inside the first string.

Should you copy Hetzner's DMARC example?

No. Hetzner's TXT page shows a _dmarc example that includes sp=quarantine and a percentage tag set to 100. It is a generic example of TXT syntax, not DMARC advice. RFC 9989 removed pct, along with rf and ri. A receiver following RFC 9989 ignores those tags, so they only add noise. Write the record from the values in the policy table below.

07

What TTL should a DMARC record use at Hetzner?

Use the zone default unless you have a reason not to. According to the Cloud API reference, a zone's default TTL is 3600 seconds unless you change it, and an RRSet TTL must be between 60 and 2147483647 seconds. A shorter TTL, such as 300, helps during the weeks you are changing policy.

Lower the TTL a day before a planned policy change, so a mistake can be reversed quickly. Restore the default once the policy is stable.

08

Which DMARC values should you use under RFC 9989?

Start with monitoring and move up one step at a time. RFC 9989 keeps the three policies none, quarantine and reject, and adds np for non-existent subdomains, psd for public suffix operators and t for testing. Each stage is a complete record, not a percentage.

Stage Value When to use it
Monitor "v=DMARC1; p=none; rua=mailto:dmarc@example.com" First publish, while you map senders
Test quarantine "v=DMARC1; p=quarantine; t=y; rua=mailto:dmarc@example.com" Asks receivers to apply one level below the policy
Quarantine "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com" All legitimate senders pass
Reject "v=DMARC1; p=reject; np=reject; rua=mailto:dmarc@example.com" Reports are clean for a full cycle

RFC 9989 defines t=y as a request not to apply the policy, with failing mail treated one level below what p says. The new tags guide covers np, psd and t in more detail. The organizational domain is now found by a DNS tree walk of _dmarc records, not by a public suffix list, so subdomains inherit the parent's record unless they have their own.

Do you need a record for an external report address?

Only if rua points outside the client's own domain. RFC 9990 asks receivers to check a TXT record such as example.com._report._dmarc.msp.example.net containing v=DMARC1. That record belongs in the destination's zone, not the client's. Our guide to authorising external report destinations shows the full setup.

09

How do you add the record with the Hetzner Cloud API?

Use the Zone RRSets endpoints of the Hetzner Cloud API at https://api.hetzner.cloud/v1. Authenticate with a project API token in an Authorization: Bearer header. Then call POST /zones/{id_or_name}/rrsets with name _dmarc, type TXT and the quoted value. The API works on RRSets, identified by name and type.

curl -X POST "https://api.hetzner.cloud/v1/zones/example.com/rrsets" 
  -H "Authorization: Bearer $HCLOUD_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{
    "name": "_dmarc",
    "type": "TXT",
    "ttl": 3600,
    "records": [
      { "value": ""v=DMARC1; p=none; rua=mailto:dmarc@example.com"",
        "comment": "DMARC monitoring, ticket 1234" }
    ]
  }'

The Cloud API reference documents these RRSet operations. All of them are only applicable to zones in primary mode:

Method and path What it does
GET /zones/{id_or_name}/rrsets?name=_dmarc&type=TXT Reads the current DMARC RRSet
POST /zones/{id_or_name}/rrsets Creates an RRSet (name, type, records; ttl optional)
POST .../rrsets/_dmarc/TXT/actions/set_records Overwrites the records of an existing RRSet
POST .../rrsets/_dmarc/TXT/actions/add_records Appends records, creating the RRSet if missing
POST .../rrsets/_dmarc/TXT/actions/change_ttl Changes the TTL; ttl is required since 30 Sep 2026
DELETE .../rrsets/_dmarc/TXT Deletes the RRSet

Use set_records for policy changes. add_records appends a value, so on an existing _dmarc RRSet it would create a second DMARC record. RFC 9989 says that when several DMARC records are returned for one name, "they are all discarded". The same API is available through the hcloud CLI, for example hcloud zone rrset set-records.

How do API tokens map to client projects?

Hetzner's features page says API tokens are scoped per project, so you can limit access by placing zones in separate projects. One project per client keeps a leaked token away from other clients' zones. Hetzner also offers optional change protection on RRSets, which helps guard a _dmarc record that has reached p=reject.

10

How do you verify the DMARC record after publishing?

Query the record from Hetzner's nameserver first, then from a public resolver. The first shows what Hetzner serves; the second shows what receivers see once caches expire. Both should return one string that starts with v=DMARC1.

dig TXT _dmarc.example.com @hydrogen.ns.hetzner.com +short
"v=DMARC1; p=none; rua=mailto:dmarc@example.com"

dig TXT _dmarc.example.com @1.1.1.1 +short
"v=DMARC1; p=none; rua=mailto:dmarc@example.com"

If the authoritative query works but the public one does not, wait for the old TTL to expire. If neither works, recheck the delegation. Our guide to checking your DMARC policy covers what to read in the result.

11

What are the common Hetzner DMARC mistakes?

Most failures come from the wrong place or the wrong name, not from DMARC syntax. Records end up in a zone that is not delegated, or under a doubled name. A second _dmarc value added by a script is another cause.

Mistake Symptom Fix
Zone not delegated to Hetzner dig shows other nameservers; zone deleted after 28 days Add the record at the real DNS host, or update the registrar
Full name typed Record appears at _dmarc.example.com.example.com Use _dmarc only
Value not quoted Value does not match Hetzner's documented TXT format Wrap the value in double quotes
Two DMARC values in the RRSet Receivers discard both Keep one value; use set_records
Percentage tag copied from the TXT example Tag ignored under RFC 9989 Remove it
Old DNS Console token in a script API calls fail Create a project token in Hetzner Console
Script omits ttl on change_ttl Request fails since 30 Sep 2026 Send a number, or null for the zone default
External rua without authorisation No reports arrive at the MSP address Publish the _report._dmarc record at the destination
12

How should MSPs manage Hetzner zones across many clients?

Keep one Hetzner project per client, read before you write, and record every change. Read the _dmarc RRSet, compare it with the intended policy, and only then call set_records. That leaves an audit trail and prevents duplicate records.

A routine that works:

  1. Inventory. List each client domain, its registrar, the Hetzner project and the current _dmarc value.
  2. Check delegation. Confirm the NS records point to Hetzner before you rely on the zone.
  3. Publish p=none. Add the record with a rua address you monitor, and authorise it with RFC 9990 if it is external.
  4. Map senders. Use aggregate reports to find every service sending as the domain, then fix SPF and DKIM alignment.
  5. Step up. Move to p=quarantine (optionally with t=y first), then p=reject, with a lowered TTL during each change.
  6. Protect. Turn on RRSet change protection for enforced records.
  7. Re-check monthly. Script a read-only GET across projects to catch drift.

A simple drift check reads one zone per token:

for zone in example.com example.co.uk; do
  curl -s -H "Authorization: Bearer $HCLOUD_TOKEN" 
    "https://api.hetzner.cloud/v1/zones/$zone/rrsets?name=_dmarc&type=TXT"
done

Our DMARC change-management policy for MSP portfolios describes approvals and rollback. A multi-tenant platform such as DMARC AI reads the aggregate reports across clients, so you can see which domains are ready for the next step.

13

Does it matter that Hetzner is a German provider?

For the DNS record, not much. A DMARC record is public data, so the DNS host's location does not change any privacy question. For GDPR-sensitive clients, the real question is where reports are sent and who processes them, because reports can contain IP addresses and failure reports can contain message details. Our guide to DMARC, GDPR and personal data in reports covers what reports contain. For EU clients in scope of NIS2, the NIS2 and DMARC guide explains how email authentication fits.

14

FAQ

Can I still use dns.hetzner.com to add a DMARC record?

No. Hetzner removed the old DNS Console and its API on 27 May 2026, after a read-only period from 20 May. Requests to dns.hetzner.com now redirect to console.hetzner.com. Add the _dmarc TXT record under DNS in Hetzner Console, or through the Hetzner Cloud API with a project token.

Does Hetzner add a DMARC record automatically?

Hetzner's DNS documentation does not describe any automatic DMARC record for zones in Hetzner Console. An empty zone starts with only NS and SOA records. Hetzner's managed email page mentions that konsoleH sets a default SPF record, but you add DMARC yourself. Check with dig after any migration.

Does the DMARC value need quotes in Hetzner Console?

Yes. Hetzner's TXT record documentation says the value has to be quoted. Wrap the whole DMARC record in double quotes. If the value is longer than 255 characters, split it into several quoted sub-strings. Receivers join them without adding spaces, so place separators inside the strings.

Why do my old Hetzner DNS API scripts fail?

The old DNS Console API was removed with the console in May 2026, and old tokens do not work with the Cloud API. Rewrite scripts against https://api.hetzner.cloud/v1 and the Zone RRSets endpoints, using a token created in the client's Hetzner Console project. Tools like acme.sh and lego also renamed their Hetzner provider settings.

Can one Hetzner API token manage all my clients' zones?

Only if all the zones sit in one project. Hetzner scopes Cloud API tokens per project. One project per client, with a separate token for each, is the cleaner set-up. That limits the damage if a token leaks, and it matches how client access is usually separated elsewhere in the estate.

15

Next steps

  1. Publish p=none with a monitored rua address and check it with dig.
  2. Inventory senders from aggregate reports and fix SPF and DKIM alignment.
  3. Move to p=quarantine, then p=reject, following how to move from monitoring to enforcement safely.
  4. Add np=reject once enforcement is stable, as explained in the np tag guide.
  5. Compare other DNS hosts in the series, such as Gandi, OVHcloud and DigitalOcean DNS, and read the DMARC guide for the full picture.

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.