Skip to content

SPF, DKIM and DMARC so your email reaches the inbox

Find every service that sends as your domain and get the exact SPF, DKIM and DMARC records to add.

  • Free, no sign-up
  • 30 to 60 minutes with an agent
  • By Devvrat Hans
  • Version 1.0, updated Oct 26, 2026

1Your site and stack

Optional. The prompt adapts as you type; leave a field blank and the agent works it out.

2Copy it into your agent

email-authentication.md66 lines, about 906 tokens

Paste into any coding agent: Claude Code, Cursor, Codex, Copilot, Windsurf or Cline.

# SPF, DKIM and DMARC so your email reaches the inbox

Sign-up confirmations, password resets and launch emails from the production site go to spam, or are rejected outright by Gmail and Yahoo, when the domain is not authenticated. Work out everything that sends email as the domain and give me the exact DNS records to add, with a safe path from monitoring to enforcement.

Site: not given. Find the production URL in the project config, or ask me.

## Ground rules

1. Read before you write. Explore the parts of the codebase this job touches and tell me what is already in place.
2. Plan, then stop. Give me a numbered plan: what you will change, in which files, and why. Wait for my approval before editing anything.
3. Fix things at their source (the shared layout, the config, the generator), not with one-off patches page by page.
4. Keep the project's conventions: its framework APIs, file layout, naming and code style. Add no new dependency without asking.
5. Where something is already done well, say so and leave it alone.

## You will not

- Edit `.env` files, secrets or API keys, or print their values.
- Deploy, push, merge or publish anything.
- Delete data, or run migrations or scripts against a production database.
- Add tracking, third-party scripts or links to any site I did not ask for.
- Change copy, design or behaviour that this job does not need.
- Change DNS records: I add them.
- Send test emails to anyone but me.

## Your stack

- Framework: Work out the framework, router and build output from the project files (package.json, lockfiles, framework config) before planning, and say which you found.
- Host: Work out where the site is hosted from the config files (vercel.json, netlify.toml, wrangler config, Dockerfile, fly.toml) and say which you found.

## Steps

### 1. Find every sender

From the code and config, list every service that sends email as the domain: the transactional provider, the newsletter tool, support desk, billing receipts, the auth provider and any SMTP settings. Ask me about senders outside the code (Google Workspace, a CRM).

### 2. SPF

Write one `v=spf1` TXT record for the root domain that includes each sender (for example `include:_spf.google.com`), ending in `~all` (or `-all` once confirmed). Keep it under the limit of 10 DNS lookups; if senders push it over, propose sending some from a subdomain instead.

### 3. DKIM

For each sender, list the DKIM records it asks for (usually CNAME or TXT records under `selector._domainkey`) and where in its dashboard to find them. Make sure every sender signs with the site's domain, not its own.

### 4. DMARC

Write a `_dmarc` TXT record starting at monitoring: `v=DMARC1; p=none; rua=mailto:<reports address>; adkim=r; aspf=r`. Explain the path: read the reports for a couple of weeks, then move to `p=quarantine`, then `p=reject` once every legitimate sender passes.

### 5. Check the code side

Make sure every email the app sends uses a From address on the authenticated domain, a working Reply-To, and a plain-text part as well as HTML.

## Done means

- [ ] Every service that sends as the domain is listed.
- [ ] I have one SPF record under 10 lookups, the DKIM records per sender, and a DMARC record.
- [ ] I have a dated plan to move DMARC from p=none to quarantine and reject.
- [ ] Every email the app sends uses the authenticated domain and has a plain-text part.

## Report back

When you finish, give me:

- what you changed, file by file;
- anything you skipped, and why;
- anything I must do by hand (DNS records, dashboards, accounts, deploys);
- how to check each change on the live site.

One-line version

For agents that can read a URL. It fetches this prompt with your settings applied.

Read https://abacklaunch.com/prompts/email-authentication.md and follow it for this project.

3Check the result

When the changes are live, run these free checks. Add your site URL above and each one opens already running on it.

This prompt will not

  • Edit .env files, secrets or API keys, or print their values.
  • Deploy, push, merge or publish anything.
  • Delete data, or run migrations or scripts against a production database.
  • Add tracking, third-party scripts or links to any site I did not ask for.
  • Change copy, design or behaviour that this job does not need.
  • Change DNS records: I add them.
  • Send test emails to anyone but me.

It reads your code first, shows you a plan, and waits for your approval before it changes anything.

What you get

  • A list of every service that sends as your domain
  • Exact SPF, DKIM and DMARC records to add
  • A safe path from monitoring to an enforcing DMARC policy

How to use this prompt

  1. 1

    Describe your stack

    Add your site, framework and host. The prompt adapts; blank fields are left for the agent to work out.

  2. 2

    Paste it into your agent

    Open your project in Claude Code, Cursor, Codex, Copilot, Windsurf or Cline, and paste the prompt or the one-line version.

  3. 3

    Approve the plan

    The agent reads your code, shows you a plan with the files it will touch, and waits. Change anything you disagree with.

  4. 4

    Check the result

    When the changes are live, run the free checks below on your site to confirm each fix.

What the agent does

Sign-up confirmations, password resets and launch emails from the production site go to spam, or are rejected outright by Gmail and Yahoo, when the domain is not authenticated. Work out everything that sends email as the domain and give me the exact DNS records to add, with a safe path from monitoring to enforcement.

  1. 1. Find every sender

    From the code and config, list every service that sends email as the domain: the transactional provider, the newsletter tool, support desk, billing receipts, the auth provider and any SMTP settings. Ask me about senders outside the code (Google Workspace, a CRM).

  2. 2. SPF

    Write one v=spf1 TXT record for the root domain that includes each sender (for example include:_spf.google.com), ending in ~all (or -all once confirmed). Keep it under the limit of 10 DNS lookups; if senders push it over, propose sending some from a subdomain instead.

  3. 3. DKIM

    For each sender, list the DKIM records it asks for (usually CNAME or TXT records under selector._domainkey) and where in its dashboard to find them. Make sure every sender signs with the site's domain, not its own.

  4. 4. DMARC

    Write a _dmarc TXT record starting at monitoring: v=DMARC1; p=none; rua=mailto:<reports address>; adkim=r; aspf=r. Explain the path: read the reports for a couple of weeks, then move to p=quarantine, then p=reject once every legitimate sender passes.

  5. 5. Check the code side

    Make sure every email the app sends uses a From address on the authenticated domain, a working Reply-To, and a plain-text part as well as HTML.

Done means

  • Every service that sends as the domain is listed.
  • I have one SPF record under 10 lookups, the DKIM records per sender, and a DMARC record.
  • I have a dated plan to move DMARC from p=none to quarantine and reject.
  • Every email the app sends uses the authenticated domain and has a plain-text part.

Questions

Do I really need DMARC?

Gmail and Yahoo require SPF or DKIM for all senders, and DMARC for bulk senders, since 2024. Without it, more of your email lands in spam or bounces.

Why start with p=none?

p=none only collects reports, so nothing breaks while you find senders you forgot. Jumping straight to reject can block your own receipts or support emails.

What if my SPF record has too many lookups?

SPF fails above 10 DNS lookups. Send some mail from a subdomain (news.example.com) with its own records, or drop services you no longer use.

Does this prompt add links to Aback Launch to my site?

No. Nothing in the prompt mentions Aback Launch or asks your agent to link to us. The only exception is an optional badge step, which stays off unless you tick it. Some prompt libraries slip their own link into your codebase by default; we think that should always be your choice.

Which coding agents does it work with?

Claude Code, Cursor, Codex, GitHub Copilot, Windsurf, Cline, and any agent that can read your project and edit files. You can copy it as a plain prompt, save it as a Claude Code skill or a Cursor rule, or add it to AGENTS.md.

Is it safe to run on my real codebase?

The prompt makes the agent read first, show a plan and wait for your approval, and it forbids touching secrets, deploying and deleting data. Still review the changes and run your tests before you deploy, as with any change.

Changelog

  • v1.0First version.

Launch your startup on Aback Launch

Get a launch page that search engines and AI assistants can read, a place in the weekly launch list, and a review by a real person. Free to join.