How do you add a DMARC record at Porkbun?
To add a DMARC record at Porkbun, open Domain Management, click the DNS button under the domain and click Add Record in the Manage DNS Records menu. Choose TXT as the Type, enter _dmarc as the Host, paste a value such as v=DMARC1; p=none; rua=mailto:reports@example.net as the Answer and click Add.
That record only counts when the domain uses Porkbun's nameservers. Porkbun also offers email forwarding and email hosting, and its hosting service has a Configure DMARC button, so check what already exists before you add anything. This guide covers the nameserver check, the DNS screen, Porkbun email, the Porkbun API v3 for MSP (managed service provider) portfolios, verification with dig, RFC 9990 report authorisation and common mistakes. DMARC (Domain-based Message Authentication, Reporting and Conformance) builds on SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail). For the protocol itself, start with the DMARC guide.
Interface note: labels follow the Porkbun Knowledge Base and API documentation as read in November 2026. Porkbun's guide to adding DNS records names the value field Answer/Value (it changes with the record type) and says to leave the TTL at the default unless told otherwise. Confirm the result with dig.
Key takeaways
- DMARC at Porkbun is a TXT record with the Host
_dmarc. The Host field takes the subdomain part only, so never type the full domain. - The record is only served when the domain uses Porkbun's default nameservers:
curitiba.ns.porkbun.com,fortaleza.ns.porkbun.com,maceio.ns.porkbun.comandsalvador.ns.porkbun.com. - Porkbun email hosting can publish DMARC and DKIM for you with Configure DMARC. Keep one
_dmarcrecord only, whichever way you create it. - The API needs a key pair from API Access and the domain opted in under API ACCESS in its Details. Otherwise calls fail with
API_ACCESS_DISABLED. - Leave out
pct,riandrf. RFC 9989 removed them; move fromp=nonetop=quarantinetop=rejectin whole steps.
Is the domain's DNS actually hosted at Porkbun?
Check this first. Porkbun's guide to switching to Porkbun's nameservers lists four defaults: curitiba.ns.porkbun.com, fortaleza.ns.porkbun.com, maceio.ns.porkbun.com and salvador.ns.porkbun.com. If the domain points elsewhere, a record saved at Porkbun is stored but never answers queries.
$ dig +short NS example.com
curitiba.ns.porkbun.com.
fortaleza.ns.porkbun.com.
maceio.ns.porkbun.com.
salvador.ns.porkbun.com.
On Windows, run nslookup -type=NS example.com, or use our DNS lookup tool without a terminal. If the answer names another provider, add _dmarc there instead.
| Nameservers point to | Where to add _dmarc |
|---|---|
*.ns.porkbun.com |
Porkbun Manage DNS Records or the Porkbun API |
| 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 |
| DigitalOcean | See how to add a DMARC record in DigitalOcean DNS |
| A cPanel hosting server | See how to add a DMARC record in cPanel |
| Another registrar's DNS | That registrar's panel, for example Namecheap, GoDaddy or Hover (ns1.hover.com and ns2.hover.com) |
How do you switch a domain to Porkbun's nameservers?
Open Domain Management, click Details at the far right of the domain, click the edit icon next to Nameservers, choose Use Our Default Nameservers and click Save Nameservers. Porkbun says the change can take up to 48 hours to spread worldwide, though most locations see it within a few hours.
Copy the existing zone first, because records at the old DNS host do not move with the delegation.
What are the exact steps in Porkbun's DNS records screen?
Open the domain's Manage DNS Records menu, click Add Record, set Type to TXT, Host to _dmarc, paste the DMARC string as the Answer and click Add. These steps follow Porkbun's DNS records guide, with DMARC values filled in.
- Log in. You should land on Domain Management. If you are already logged in, click ACCOUNT in the top right and select Domain Management.
- Find the domain and click the DNS button under its name. Alternatively, click Details and then the edit icon under DNS RECORDS.
- In Manage DNS Records, look through the current records for a TXT record at
_dmarc. If one exists, edit it instead of adding a second. - Click Add Record.
- Type: TXT.
- Host:
_dmarc. - Answer/Value: the full DMARC string on one line.
- TTL: leave the default unless you have a reason to change it.
- Notes: optional. Porkbun says notes are visible only to you, so this is a good place for a change ticket number.
- Click Add, then Back to return to the list.
A first record in monitoring mode:
v=DMARC1; p=none; rua=mailto:dmarc-reports@example.net
If you are unsure of the syntax, build the value with the DMARC record generator or follow how to create a DMARC record step by step, which explains each tag. Porkbun also links to its own DMARC generator from the Knowledge Base. That tool asks for a Percentage value, a tag RFC 9989 removed, so delete that tag from its output before you publish.
Do you enter _dmarc or _dmarc.example.com as the Host?
Enter _dmarc. Porkbun's DNS guide says the Host is the subdomain name, left blank for the root domain. The DMARC record lives at _dmarc.example.com, so the subdomain part is _dmarc. For a subdomain such as shop.example.com, enter _dmarc.shop.
Do not leave the Host blank for DMARC. A blank Host puts the TXT record on the root, where SPF lives, and receivers never read it as a DMARC policy. More patterns are in DMARC record examples for common setups.
Should the Answer have quotation marks?
Paste the value without surrounding quotation marks. Porkbun's DNS guide gives no quoting rule for TXT records, so the safest test is the result: query the record with dig and check that one clean string comes back. Paste from a plain text editor, because curly quotes from a word processor break the record.
What does Porkbun email do with SPF, DKIM and DMARC?
Porkbun email hosting and email forwarding both put Porkbun's MX and SPF records at the root. Only the hosting service has a DMARC option: the Configure DMARC button, which also sets up DKIM. Forwarding alone adds no DKIM or DMARC, so you still add _dmarc yourself.
How does Configure DMARC work for Porkbun email hosting?
Porkbun's guide to turning on DKIM and DMARC starts from the envelope icon in the EMAIL column of Domain Management:
- On the Email Hosting and Forwarding page, scroll to Additional Notices & Configuration and find the DMARC Notice box.
- Click Configure DMARC. Porkbun says this also configures DKIM, and the button only appears when the domain has an email hosting service.
- Click OK in the confirmation prompt and again in the pop-up that says the records are queued.
- Wait five or ten minutes and refresh. The DMARC Notice should show the domain is configured, with buttons to delete or reset the records.
Porkbun does not publish the exact value it writes, so query _dmarc afterwards. If you need aggregate reports at your own address, edit that record to add or change rua rather than adding a second record. A DMARC Warning instead of the notice usually means the domain uses third-party nameservers.
What records does Porkbun email need when DNS is elsewhere?
Porkbun's guide to using Porkbun email when DNS is hosted elsewhere lists what to copy to the other DNS host:
| Record | Type | Host | Value |
|---|---|---|---|
| MX | MX | root | fwd1.porkbun.com (priority 10), fwd2.porkbun.com (priority 20) |
| SPF | TXT | root | v=spf1 include:_spf.porkbun.com ~all |
| DKIM | TXT | default._domainkey |
Copy from the domain's TXT records at Porkbun |
| DMARC | TXT | _dmarc |
Copy from the domain's TXT records at Porkbun, or write your own |
A domain can have only one SPF record. If Porkbun is one of several senders, merge the include: mechanisms into one record, as described in multiple SPF records: how to merge them and how to create an SPF record.
Does Porkbun email forwarding affect DMARC?
Forwarding changes your inbound mail, not the DMARC policy you publish. Porkbun's email forwarding guide says the service is free and needs your MX records to point to Porkbun, so it cannot run alongside a third-party mail host on the same domain.
The API reference adds that the first forward sets up Porkbun's MX and SPF at the root, and asks for confirmation before it removes other MX records or rewrites SPF. Messages forwarded on to another mailbox can fail SPF at the final receiver; DMARC and email forwarding explains why DKIM matters there.
If staff mail runs on Microsoft 365 or Google Workspace instead, SPF and DKIM come from that provider and Porkbun only hosts the records: follow DMARC and Microsoft 365, DMARC and Google Workspace and how to set up DKIM. Either way, SPF or DKIM must pass for a domain aligned with the visible From domain, as DMARC alignment explained shows.
How do you add the DMARC record with the Porkbun API?
Send a POST to https://api.porkbun.com/api/json/v3/dns/create/{domain} with your API key and secret key and a JSON body that sets type, name and content. The Porkbun API documentation says name is the subdomain only, and the key needs the dns permission.
Two settings must be in place first. Porkbun's getting started guide creates keys under ACCOUNT, API Access: name the key, choose its Permissions, optionally restrict it to domains or IP addresses and click Create API Key. The secret key is shown once only. Then open the domain's Details and turn on API Access. Porkbun's API reference says a domain that is not opted in returns API_ACCESS_DISABLED.
Check the keys with /ping:
curl -X POST https://api.porkbun.com/api/json/v3/ping
-H 'Content-Type: application/json'
-H "X-API-Key: $PB_KEY"
-H "X-Secret-API-Key: $PB_SECRET"
-d '[]'
Then create the record:
curl -X POST https://api.porkbun.com/api/json/v3/dns/create/example.com
-H 'Content-Type: application/json'
-H "X-API-Key: $PB_KEY"
-H "X-Secret-API-Key: $PB_SECRET"
-d '{"name":"_dmarc","type":"TXT","content":"v=DMARC1; p=none; rua=mailto:dmarc-reports@example.net","ttl":600}'
The response includes status, the new record's id and, sometimes, warnings. Porkbun says the TTL minimum comes from account settings, typically 600 seconds, and an omitted or zero TTL uses that minimum. The docs also accept the keys as apikey and secretapikey in the JSON body, and a dryRun field that validates without saving.
How do you read and change the DMARC record through the API?
Read it with /dns/retrieveByNameType/{domain}/TXT/_dmarc, which needs only the read permission. Change it with /dns/editByNameType/{domain}/TXT/_dmarc and a new content. Porkbun says that call replaces the content of every matching record, so it never creates a duplicate.
curl -X POST https://api.porkbun.com/api/json/v3/dns/retrieveByNameType/example.com/TXT/_dmarc
-H 'Content-Type: application/json'
-H "X-API-Key: $PB_KEY"
-H "X-Secret-API-Key: $PB_SECRET"
-d '[]'
curl -X POST https://api.porkbun.com/api/json/v3/dns/editByNameType/example.com/TXT/_dmarc
-H 'Content-Type: application/json'
-H "X-API-Key: $PB_KEY"
-H "X-Secret-API-Key: $PB_SECRET"
-d '{"content":"v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.net","ttl":600}'
Calling create a second time does not replace the policy. It adds another TXT record at _dmarc, which disables DMARC (see below).
Why does the API save records that never resolve?
Porkbun's API reference says writes still save when a domain is not delegated to Porkbun's nameservers, but they do not change what resolves. The response then carries a warnings string naming the nameservers in use. Check warnings on every write, or call GET /dns/preflight/{domain} first, which reports the same condition as nameservers-ours.
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.
For a cautious first step at a new level, RFC 9989 Section 4.7 defines t=y (testing mode), which asks receivers to apply the next lower policy. Remove t=y once the level is confirmed.
| Stage | Answer 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 percentage ramp.
Do you need an RFC 9990 authorisation record for reports?
Yes, when reports go to a domain other than the one publishing the policy. RFC 9990 has receivers check a TXT record at <policy domain>._report._dmarc.<destination host> that starts with v=DMARC1. A reporting provider usually publishes it; see authorising external DMARC report destinations.
If an MSP collects reports for a client at a mailbox on the MSP's own domain, publish example.com._report._dmarc.msp-example.net with the value v=DMARC1 in the MSP's zone, not the client's.
How do you verify the DMARC record after publishing?
Query _dmarc and confirm that exactly one record starting with v=DMARC1 comes back. Then ask a Porkbun nameserver directly, so a cached answer from a public resolver does not mislead you.
$ dig @curitiba.ns.porkbun.com +short TXT _dmarc.example.com
"v=DMARC1; p=none; rua=mailto:dmarc-reports@example.net"
$ dig +short TXT _dmarc.example.com
On Windows, nslookup -type=TXT _dmarc.example.com curitiba.ns.porkbun.com does the same job.
What the result means:
- Present at the Porkbun nameserver, missing in a public lookup. Cached answer or delegation not live yet. Check
dig NSand wait for the TTL. - Missing at the Porkbun nameserver too. Wrong Host, wrong account, or the record was not saved. Try
dig TXT _dmarc.example.com.example.comfor a doubled name. - Two strings starting with
v=DMARC1. Two records exist, often your own plus one from Configure DMARC. Delete one. - Value appears at
example.com. The Host was left blank. Move it to_dmarc. - A percentage tag in the value. Remove it; RFC 9989 removed that tag.
The DMARC checker validates syntax and flags duplicates. How to fix "no DMARC record found" covers the causes of an empty answer.
What are the common Porkbun DMARC mistakes?
Most problems come from editing a domain that is not on Porkbun's nameservers, using the wrong Host, or ending up with two _dmarc records after Configure DMARC or a second API create.
| Symptom | Likely cause | Fix |
|---|---|---|
Record shows at Porkbun, dig returns nothing |
Nameservers are not *.ns.porkbun.com |
Switch to Porkbun's defaults or add the record at the live DNS host |
| DMARC Warning on the email page | Domain uses third-party nameservers | Copy the records to that DNS host |
| Policy sits on the root domain | Host left blank | Recreate with Host _dmarc |
| Checker reports no valid policy | Two TXT records at _dmarc |
Keep one; use edit or editByNameType |
API returns API_ACCESS_DISABLED |
Domain not opted in | Turn on API Access in the domain's Details |
API returns INSUFFICIENT_SCOPE |
Key lacks the dns permission |
Create a key with dns |
API returns DOMAIN_NOT_ALLOWED |
Key restricted to other domains | Add the exact domain to the key |
API write succeeds with warnings |
Domain delegated elsewhere | Fix delegation; check /dns/preflight |
| Record contains a percentage tag | Copied from a generator that still offers it | Delete the tag |
| No aggregate reports arrive | No rua, or external address not authorised |
Add rua; publish the RFC 9990 record |
How should MSPs manage client domains at Porkbun?
Use per-client API keys restricted to that client's domains and the dns permission, and script DMARC changes rather than sharing a login. Porkbun's API reference documents per-key IP, domain and permission restrictions, which keep one leaked key from touching the rest of a portfolio.
- Scoped keys. Porkbun's API reference lists permissions
read,dns,domains,email,hosting,purchase,fundingandaccount, with presets "Read-only" and "Manage, but no purchases". Domain restrictions match exactly, soexample.comdoes not cover subdomains. Calls from an IP outside the allowed list fail withIP_NOT_ALLOWED. - Account holder steps. Porkbun says only the account holder can turn on API access, per domain or for all domains. Its newer API getting started article names an Opt In All Domains option on the API page, which also covers future domains.
- Find what you can touch.
/domain/listAllaccepts anapiAccessfilter ofyesorno, and returns up to 1000 domains per call withstartfor paging. - Safe retries. Writes accept an
Idempotency-Keyheader; a repeat with the same key and body within 24 hours returns the original response instead of creating a second record. - Inventory and change control. Run
dig NSanddig TXT _dmarcacross every client domain, and log each change in a DMARC change-management policy. - Offboarding. Delete the client's keys at contract end; tenant offboarding covers handing DMARC back.
DMARC AI collects aggregate reports for every client domain in one multi-tenant view, so after a Porkbun change you can confirm reports arrive and each client's senders align before you enforce. Multi-tenant DMARC management explains why per-client separation matters. For UK clients, the NCSC's email security and anti-spoofing guidance ends its steps with rejecting spoof emails, which is where p=reject fits.
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. Use t=y if you want receivers to hold back one level while you watch.
- Publish
p=nonewith aruaaddress and confirm reports arrive. - Identify every sending source: Porkbun email, Microsoft 365 or Google Workspace, CRM and billing tools.
- Align SPF or DKIM for each one.
- Edit the record to
p=quarantine, then top=rejectonce reports are clean. - Add
np=rejectfor a strict policy on non-existent subdomains; see non-existent subdomains and the np tag. A domain that sends no mail can go straight top=reject, as in should parked domains have a DMARC record.
Moving from monitoring to enforcement safely walks through each step in detail.
FAQ
Does Porkbun create a DMARC record automatically?
Not by default. Porkbun email hosting offers a Configure DMARC button, which sets up DMARC and DKIM, but you must click it, and it only appears when the domain has an email hosting service. Email forwarding adds MX and SPF, not DMARC. Query _dmarc.example.com to see whether a record already exists before adding one.
What Host does Porkbun need for a DMARC record?
Enter _dmarc in the Host field of a TXT record. Porkbun's Host field takes the subdomain part only and is left blank for the root, so do not type _dmarc.example.com. For a subdomain such as shop.example.com, enter _dmarc.shop. Through the API, set "name":"_dmarc" in the create call.
Why does the Porkbun API return API_ACCESS_DISABLED?
The domain is not opted in to API access. The account holder must open the domain's Details in Domain Management and turn on API Access, or use Opt In All Domains on the API page. A valid key alone is not enough. Use /domain/listAll with the apiAccess filter to see which domains are enabled.
How do I change the DMARC policy without creating a duplicate?
Edit the existing record in Manage DNS Records, or call /dns/editByNameType/{domain}/TXT/_dmarc with the new content, which replaces every matching record. Do not add a second TXT record at _dmarc or click Configure DMARC on top of your own record. Receivers discard all DMARC records when more than one is returned.
What TTL should I use for a DMARC record at Porkbun?
Porkbun's DNS guide says you can usually leave the TTL at its default. Through the API, the minimum comes from account settings, typically 600 seconds, and an omitted or zero TTL uses that minimum. Ten minutes is short enough for policy changes, so there is rarely a reason to raise it while you are rolling out.