
DNS & Deliverability
DNS setup guides.
DNS & Deliverability
How to Set Up Porkbun DNS Records for Email Marketing
Learn how to add SPF, DKIM, DMARC, MX, and tracking records in Porkbun without hostname formatting errors or conflicting mail settings.
By Peak Meadow Published September 19, 2026

You manage DNS records in Porkbun through the Domain Management dashboard. Porkbun applies a default TTL of 600 seconds (10 minutes), which propagates updates faster than most traditional registrars. Before adding your email marketing records, check for existing SPF or MX entries so you do not publish conflicting configurations.
Porkbun DNS navigation and nameserver check
To access your DNS records in Porkbun:
- Log in to your Porkbun account.
- Click Account in the top navigation bar, then select Domain Management.
- Locate your domain name in the list.
- Click the DNS button directly beneath the domain name (or click Details, then click the pencil icon next to DNS Records).
Check the Authoritative Nameservers section on the Details panel before making changes. Your domain must point to Porkbun nameservers (such as curitiba.ns.porkbun.com, fortaleza.ns.porkbun.com, maceio.ns.porkbun.com, and salvador.ns.porkbun.com). If your domain uses custom nameservers pointing to Cloudflare or a web host, Porkbun will not control your active DNS. In that situation, add these records in your external host’s panel instead.
Adding a record in Porkbun
- In the Manage DNS Records window, scroll to the Add Record section at the top.
- Select the record type from the Type dropdown (
TXT,CNAME, orMX). - Fill in the Host field:
- For root domain records (such as SPF), leave the Host field completely blank. Porkbun does not use
@for root records. - For subdomains (such as
_dmarcor DKIM selectors), enter only the subdomain prefix. Porkbun automatically appends your root domain.
- For root domain records (such as SPF), leave the Host field completely blank. Porkbun does not use
- Enter the destination value in the Answer field:
- For TXT records, paste the plain text string into the Answer field. Do not wrap the value in quotation marks.
- For CNAME records, paste the target hostname into the Answer field.
- For MX records, enter the mail server hostname in the Answer field, and enter your priority integer into the separate Priority field.
- Leave the TTL field at
600unless your email service specifies a different value. - Click Add.
Porkbun documents its record fields and requirements in its DNS management knowledge base.
Required authentication records
Receiving mail servers use these three records to verify that messages sent from your domain are authentic.
1. SPF (Sender Policy Framework)
- Type: TXT
- Host: Leave blank (Porkbun applies blank host fields to your root domain)
- Answer: The SPF string provided by your email platform, such as:
v=spf1 include:_spf.google.com include:sendgrid.net ~all - TTL: 600
Merging multiple SPF records
A domain must only have one root SPF record. If you already send email through Porkbun Email or Google Workspace, an SPF record already exists in your table.
Do not create a second TXT record starting with v=spf1. Publishing multiple SPF records produces a PermError during mail server validation, which routes your emails directly to spam folders or triggers outright delivery rejections.
To combine your email marketing provider with an existing SPF record:
- Look through the Current Records list for a
TXTrecord starting withv=spf1. - Click the pencil icon next to that record to edit it.
- Insert your email marketing provider’s
include:statement before the closing qualifier (~allor-all). For example:v=spf1 include:_spf.porkbun.com include:sendgrid.net ~all - Click Submit to save the updated string.
Do not place quotation marks around the text in the Answer field. Porkbun saves the string literally, and extra quotes will invalidate the SPF record.
2. DKIM (DomainKeys Identified Mail)
Email providers deliver DKIM records in either CNAME or TXT format:
CNAME-based DKIM
Most modern email platforms (such as Klaviyo, Postmark, SendGrid, and Amazon SES) provide CNAME records:
- Type: CNAME
- Host: The selector prefix without your root domain, such as
s1._domainkeyork1._domainkey - Answer: The target hostname provided by your email platform, such as
s1.domainkey.example-esp.com - TTL: 600
If your email provider gives you a full name like s1._domainkey.yourdomain.com, enter only s1._domainkey in the Host field. Entering your full domain causes Porkbun to create s1._domainkey.yourdomain.com.yourdomain.com, which prevents DKIM verification.
TXT-based DKIM
Some platforms (such as Google Workspace or self-hosted mail servers) provide a raw public key string:
- Type: TXT
- Host: The selector prefix, such as
google._domainkey - Answer: The raw public key string starting with
v=DKIM1; k=rsa; p=... - TTL: 600
Paste the full string directly into the Answer field without quotation marks. Porkbun supports standard 2048-bit keys in a single input field.
3. DMARC (Domain-based Message Authentication, Reporting, and Conformance)
- Type: TXT
- Host:
_dmarc(enter only_dmarc; Porkbun attaches your root domain) - Answer:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com; pct=100; - TTL: 600
Begin with p=none to collect delivery reports without affecting inbox placement. After verifying that SPF and DKIM pass for all authorized sending services, tighten the policy to p=quarantine or p=reject.
Optional deliverability and branding records
These records let you handle bounces and track link clicks through your own branded subdomain instead of shared provider domains.
4. Custom return path (bounce domain) (optional)
- Type: CNAME
- Host:
bounces(or the subdomain specified by your platform) - Answer: The mail server hostname assigned by your email platform (such as
pm.mtasv.netorsendgrid.net) - TTL: 600
5. Branded tracking domain (optional)
- Type: CNAME
- Host:
links(ortrack,click, oremailas specified by your platform) - Answer: The tracking hostname assigned by your email platform
- TTL: 600
Setting up custom MX records (if required)
If your email marketing service requires dedicated MX records for inbound message processing, reply tracking, or sending from a dedicated subdomain:
- In the Manage DNS Records window, select MX from the Type dropdown.
- Fill in the fields:
- Host: Leave blank for the root domain, or enter your subdomain prefix (such as
mail) if using a sending subdomain. - Answer: The mail server hostname provided by your platform (such as
feedback-smtp.us-east-1.amazonses.com). - Priority: The integer specified by your provider (such as
10). - TTL: 600
- Host: Leave blank for the root domain, or enter your subdomain prefix (such as
- Click Add.
If you use Porkbun Hosted Email or Google Workspace for your business mailboxes, do not delete or overwrite your root MX records. Overwriting root MX records disrupts regular email delivery for your entire team. Only add MX records for dedicated subdomains unless you are fully migrating your primary email service.
Verifying your DNS records
Porkbun processes DNS updates quickly, and its 600-second default TTL keeps propagation fast. You can test your records in Windows PowerShell using Resolve-DnsName:
Check SPF
Resolve-DnsName -Name yourdomain.com -Type TXT
Look at the Strings column. Verify that exactly one record begins with v=spf1 and includes your provider’s mechanism.
Check DMARC
Resolve-DnsName -Name _dmarc.yourdomain.com -Type TXT
Confirm that the Strings column returns your v=DMARC1; p=... record.
Check DKIM
Replace s1 with your provider’s specific selector:
Resolve-DnsName -Name s1._domainkey.yourdomain.com -Type CNAME
If your platform uses TXT-based DKIM, replace -Type CNAME with -Type TXT. The output will display your provider’s target hostname or public key.
Check tracking and bounce records (if configured)
Resolve-DnsName -Name bounces.yourdomain.com -Type CNAME
The NameHost column should point to your email platform’s destination address.
Check MX records (if configured)
Resolve-DnsName -Name yourdomain.com -Type MX
The NameExchange column should list your designated mail servers with their numerical priorities under Preference.
Common troubleshooting issues
| Issue | Root cause | Solution |
|---|---|---|
Subdomain hostname is duplicated (_dmarc.yourdomain.com.yourdomain.com) |
The full domain was entered into the Host field. | Enter only the subdomain prefix (such as _dmarc). Porkbun appends your domain automatically. |
SPF validation fails with PermError |
Multiple TXT records start with v=spf1. |
Delete duplicate SPF entries and merge all required include: mechanisms into a single TXT string. |
| Root record fails to save or resolve | An @ symbol was entered into the Host field. |
Leave the Host field blank. Porkbun uses blank inputs to designate the root domain. |
| Verification fails with syntax errors | Quotation marks were included in the Answer field. | Remove quotation marks from the Answer field. Porkbun stores values literally. |
| Primary business email stops working | Root MX records were replaced with email marketing MX records. | Restore your original inbox MX records, and place email marketing MX records on a dedicated subdomain. |
| DNS records do not update after saving | Porkbun’s authoritative nameservers are not active for the domain. | Check the Details panel in Domain Management to ensure the domain points to Porkbun nameservers rather than external hosts. |