Cover: Generate SPF, DKIM and DMARC With AI, Then Check Them
October 12, 2026·10 min read·2,175 words·

Generate SPF, DKIM and DMARC With AI, Then Check Them

ChatGPT can draft SPF, DKIM and DMARC records fast, but it invents lookups and selectors, so always verify with a proper checker. Independent…

ChatGPT can draft SPF (Sender Policy Framework), DKIM (DomainKeys Identified Mail) and DMARC (Domain-based Message Authentication, Reporting and Conformance) records in seconds. The problem is it routinely produces records that are syntactically fine and functionally wrong. It duplicates includes, blows past the 10 DNS lookup limit, invents DKIM selectors, or jumps straight to a reject policy that blocks real mail. Use it to draft, then check every record with a dedicated tool before it goes anywhere near production DNS.

What are SPF, DKIM and DMARC records, in plain terms?

SPF lists which mail servers are allowed to send email for your domain. DKIM adds a digital signature so receivers can confirm a message wasn't altered in transit. DMARC tells receiving mail servers what to do when SPF or DKIM checks fail, and where to send reports about it.

All three live as TXT records in your domain's DNS (Domain Name System), the public directory that maps domain names to settings. Get any one wrong and legitimate mail starts landing in spam, or worse, gets rejected outright.

Can ChatGPT write a correct SPF record for me?

Yes, but only if you force it to count lookups first. SPF has a hard limit of 10 DNS lookups per check, and every include: mechanism can silently chain into more lookups than you'd expect.

You are auditing an SPF record for {domain}. My current senders are {list of services, e.g. Google Workspace, Mailchimp, Salesforce}. Before writing anything, count how many DNS lookups each include mechanism will cost, remembering the hard limit is 10. Show me your lookup count as a checklist, one line per include. Then flag if I am over budget and suggest which includes can be flattened or removed. Only after that, give me the final SPF TXT record, ending in ~all not -all unless I confirm I want hard fail.
Here is my current SPF record: {paste record}. Check it for duplicate include statements, mechanisms that resolve to the same sending service twice, and any syntax errors. List every problem you find before suggesting a fix. Then tell me whether the corrected record still fits within 10 DNS lookups. Give the final record last, not first.

What it gets wrong: I've seen ChatGPT include _spf.google.com twice under different labels because a client pasted two old records and asked it to merge them. It also treats third party ESP (email service provider) includes as one lookup each, when some of those includes chain into three or four more behind the scenes, pushing a client silently past the limit with no warning at all.

Verify it: run the final output through HostList's SPF generator, which counts real lookups against the live DNS chain rather than trusting the text on the page.

How do I get ChatGPT to plan DKIM selectors properly?

DKIM needs one record per sending service, each with its own selector, a short name that identifies which key belongs to which sender. ChatGPT often invents a plausible-sounding selector instead of admitting it doesn't know your provider's actual value.

I send mail through {list of services, e.g. Google Workspace, HubSpot, transactional API}. For each one, tell me what DKIM selector name it typically uses and where I find the public key value in that platform's dashboard. Build this as a table: sending service, selector, DNS host name, notes on where to retrieve the key. Do not invent a key value, tell me to copy it from the provider. Flag any service that does not support DKIM signing at all.
My DKIM record for selector {selector} on {domain} is not passing verification. Here is the record: {paste record}. Walk through the likely causes step by step: wrong selector name, line breaks inside the key, quoting issues, or record published at the wrong host name. Rank the causes by likelihood before telling me which one to check first.

What it gets wrong: a client once pasted a Google Workspace DKIM key that ChatGPT had "cleaned up" by removing what it thought were stray line breaks. Those breaks were required TXT record continuation syntax. The signature failed for two weeks until we spotted it in a header trace.

Verify it: generate and cross check the record with HostList's DKIM generator, then confirm the live signature with the email header analyzer on a real test message.

What's the safest way to prompt ChatGPT for a DMARC policy?

Never ask for a final policy in one go, that's the safe answer. DMARC should move from p=none (monitor only) to p=quarantine to p=reject over weeks, not in a single record. ChatGPT will happily write p=reject on the first request, which can silently block real customer emails if your SPF or DKIM setup has gaps.

Write me a DMARC rollout plan for {domain} moving from p=none to quarantine to reject over {timeframe, e.g. 8 weeks}. For each stage, give me the exact DNS TXT record, the percentage rollout if using pct, and what I should check in aggregate reports before moving to the next stage. Explain your reasoning for the timing before giving me the records, don't just list them.
Explain what rua and ruf tags do in a DMARC record and recommend whether I should use my own mailbox or a third party report processor for {domain}. Consider that I get {approximate daily email volume}. Give me a comparison of self hosted parsing versus a report processor, then the final record with your recommended tags.

What it gets wrong: I've had ChatGPT recommend jumping to p=reject within a fortnight for a domain that had never run SPF or DKIM before. That's how you find out three vendors were sending unauthenticated mail on your behalf. Staging exists precisely to catch that before it breaks anything.

Verify it: check the staged record and current DMARC status with HostList's DMARC checker before each stage change, not after.

Can AI find every sender I need to include?

No, not on its own. ChatGPT has no visibility into which of your tools actually sends email, so it can only guess from what you tell it. Missing one sender is the single most common cause of DMARC breaking legitimate mail.

Help me build a complete inventory of every service that sends email as {domain} before I touch SPF or DMARC. Ask me questions about marketing tools, CRM, helpdesk, transactional email APIs, invoicing software, and any staff who send from personal devices via SMTP relay. Present this as a checklist I fill in, not a guess. Only summarise once I've answered.
Here is a DMARC aggregate report in XML for {domain}: {paste report}. Explain which source IP addresses are passing SPF, passing DKIM, and which are failing both. Identify anything that looks like a legitimate sender I forgot to authorise versus something that looks like spoofing. Give me your reasoning per row before summarising which action to take.

What it gets wrong: a marketing team once forgot their invoicing platform sends receipts directly, outside the main ESP. ChatGPT's inventory prompt missed it too, because nobody mentioned it. The invoices started bouncing the week DMARC moved to quarantine.

Verify it: cross check your assumed sender list against actual mail flow with HostList's MX record lookup and real message headers via the header analyzer.

How do I combine SPF, DKIM and DMARC without breaking mail flow?

Order matters. Publish SPF and DKIM first, confirm both pass, then add DMARC in monitor mode. Adding DMARC before the other two are solid just generates noisy failure reports with no quick way to fix them.

Build me a single deployment checklist for adding SPF, DKIM and DMARC to {domain} in the right order, without breaking existing mail flow. For each step, tell me what to publish, what to wait for, and what could go wrong if I skip the wait. Put DMARC last and explain why. Format as a numbered checklist with a verification step after each entry.

This is email authentication only. It has nothing to do with moving your inbox between providers. If you're also changing where mail is hosted, that's a different job with its own risks around downtime and lost messages, covered in HostList's email migration guides.

What it gets wrong: ChatGPT sometimes suggests publishing DMARC and SPF simultaneously "to save time", which skips the window where you'd otherwise notice SPF is broken before DMARC starts enforcing against it.

Verify it: run the full stack, SPF, DKIM and DMARC together, through the DMARC checker once all three are live, and keep the MX lookup handy to confirm mail routing hasn't shifted unexpectedly.

Which prompt should I use for which job?

TemplateWhat you paste inWhat you get backVerify with
SPF lookup budgetList of sending servicesLookup count checklist plus final record/tools/spf-generator
SPF duplicate auditExisting SPF recordList of errors plus corrected record/tools/spf-generator
DKIM selector planList of sending servicesTable of selectors and where to find keys/tools/dkim-generator
DKIM troubleshootingFailing DKIM recordRanked list of likely causes/tools/email-header-analyzer
Staged DMARC rolloutDomain and timeframeThree-stage records with rationale/tools/dmarc-checker
DMARC reporting tagsDomain and email volumeRecommended rua/ruf record/tools/dmarc-checker
Sender inventoryAnswers to a checklistComplete sender list/tools/mx-record-lookup
Aggregate report readingDMARC XML reportPass/fail breakdown per sender/tools/email-header-analyzer
Combined deployment orderDomainNumbered rollout checklist/tools/dmarc-checker

Why does ChatGPT keep getting these records wrong?

Large language models generate plausible text, not verified DNS output. They've seen thousands of correct-looking SPF and DKIM records during training, so they reproduce the pattern confidently, even when a specific value like a selector name or a public key is invented rather than recalled.

  • They can't query live DNS, so they don't know your current record state unless you paste it in.
  • They default to common patterns, like assuming every business uses Google Workspace, even when you don't.
  • They rarely push back on -all (hard fail) versus ~all (soft fail) unless explicitly asked, which matters hugely during a migration.

None of this makes the prompts useless. It just means treating every output as a draft, then running it through a tool that actually resolves DNS and flags real problems.

  • Always paste your current record into the prompt rather than describing it from memory.
  • Ask for reasoning before the final record, every time, so you catch mistakes before they hit DNS.
  • Never publish a DMARC policy stricter than p=none until you've reviewed at least one round of aggregate reports.

Frequently Asked Questions

Can ChatGPT check if my SPF record is already broken?

It can read a pasted record and spot obvious issues like duplicate includes or missing all mechanisms. It cannot resolve live DNS, so it won't catch a chain include that's silently exceeding the 10 lookup limit. Use a real SPF generator for that check.

Is it safe to let AI write my DMARC record straight to p=reject?

No. Start at p=none to gather reports, move to quarantine once SPF and DKIM both pass consistently, then move to reject. Jumping straight to reject risks blocking real customer or vendor mail you didn't know was sending on your behalf.

What's the difference between SPF, DKIM and DMARC in one sentence each?

SPF lists which servers can send for your domain. DKIM signs messages so tampering is detectable. DMARC tells receivers what to do when SPF or DKIM fail, and sends you reports so you can see who's sending mail as you.

Why does my SPF record say "too many DNS lookups"?

SPF allows a maximum of 10 DNS lookups per check. Each include: can chain into further lookups behind the scenes, especially with large email service providers. Flatten unnecessary includes or use a tool that counts the real chain, not just the visible line.

Do I need DKIM if I already have SPF set up?

Yes. SPF only checks the sending server, not the message content. DKIM adds a cryptographic signature that survives forwarding, which SPF alone doesn't. DMARC needs at least one of SPF or DKIM to pass in alignment, so most setups run both.

Can AI generate the actual DKIM key value for me?

No, and be suspicious of any AI that offers to. The public key must come from your actual sending service's dashboard, whether that's Google Workspace, your ESP, or your mail server software. A generated key that doesn't match your real signing key will never validate.

Final thoughts

AI is genuinely useful for planning the sequence and explaining what each tag does, which saves real time on a task most people find confusing. It's not useful as the final source of truth for a record that, if wrong, quietly breaks your invoices or your marketing sends. Draft with ChatGPT, then check every record with a proper tool that resolves live DNS, before it ever goes near your zone file. For deeper reading on the mechanics, see Cloudflare's SPF explainer, DKIM explainer, and DMARC explainer, and browse HostList's directory if you're also weighing up which host handles your DNS and email infrastructure best.

HostList on LinkedIn
More independent hosting data

Follow HostList for new rankings, original research, and changes across the hosting industry.

Gautam Khorana
Gautam Khorana
Founder, HostList.io

Over 10,000 websites launched. Years managing thousands of client sites. Built HostList because the world deserves honest hosting advice.

LinkedIn →

MENTIONED HOSTS

RELATED ARTICLES

RadixSponsorPremium names that work like prime real estate400,000+ short, memorable premium domains across .tech, .store, .online, .site and more. 20,000+ already sold.See Radix premiums
.tech domains from RadixSponsor.tech: the address for what you buildPremium .tech names like cloud.tech and micro.tech, from Radix. Short, dictionary-word domains for tech brands.See premium .tech
.host domains from RadixSponsor.host: a domain that says what you doPremium .host names for hosting companies and infrastructure brands, from the Radix registry.See premium .host
GreenGeeksSponsorEco-Friendly WordPress Hosting DealFast WordPress performance backed by expert 24/7 support, free migration, daily backups and built-in security.See GreenGeeks
HostPapaSponsorFast, Reliable, & Affordable Web HostingLaunch, grow and manage your website with reliable hosting, easy tools and 24/7 PapaSquad support.See HostPapa

Promoted placement. Does not affect HRI, ranking order or eligibility.