Run it from your AI agent
This is also a Hermoso tool your agent can call, free, as often as it needs, for example on every domain in a lead list before a campaign. Paste this into Claude Code, Codex or Cursor once:
Set up Hermoso for me. It is an AI marketing tool (hermoso.ai) that researches ads, makes image and video ads and posts to my social accounts. 1. Install it by running: claude plugin marketplace add hermoso-ai/hermoso && claude plugin install hermoso@hermoso If the new skills only load after a restart, tell me, and use npx meanwhile. 2. Sign me in by running: npx -y hermoso auth login It opens my browser and I will approve the connection there. If this machine has no browser, ask me for a Hermoso API key and run npx -y hermoso auth login --token <key> instead. 3. Once I am signed in, do one small task to show it works: tell me my Hermoso credit balance and which profile is saved. 4. Then set up my brand from my website and make my first ad.
Then ask it: “Hermoso, write an SPF record for example.com, which sends through Google Workspace and Mailgun”
In ChatGPT or Claude, connect Hermoso from hermoso.ai/mcp and ask the same thing. The tools are check_domain_email_health, check_email_address, generate_dns_record and check_spam_words, and they work over the API and CLI too.
How to use it
- Tick every service that sends email with your domain in the From line: your mailbox provider, your newsletter tool, your help desk, your store.
- Add any include your provider’s instructions name that is not in the list, and the IP addresses of servers you run yourself.
- Choose what happens to email from servers you did not list. ~all is the usual start; -all once you are sure the list is complete.
- Copy the record and add it as a TXT record on your domain (host @) at your DNS provider.
Services that need nothing on your SPF record
Several sending services send with their own return address and handle SPF themselves, so adding them to your record would only use up lookups. SendGrid, Postmark, Mailchimp, Klaviyo, Shopify Email, Intercom, Brevo (unless you have a dedicated IP) and Amazon SES (unless you set a custom MAIL FROM domain) are in that group: tick them and the generator tells you what they need instead, usually DKIM records. HubSpot gives each account its own include, which you copy from its domain settings.
Only one SPF record
A domain may have exactly one SPF record. If you already have one, replace it with the new one rather than adding a second: two records break both. Keep the whole record under 10 DNS lookups. When you add your domain, the generator reads each include and adds up the total, so you see the count your receivers will see.
Once it is published, check it with the SPF checker, then add DMARC with the DMARC record generator.
Sending from your own mailbox? Hermoso writes and sends one-to-one emails and timed follow-ups from your own mailbox, stops a sequence when someone replies, and never adds a tracking pixel.
Free tools: SPF checker · DMARC record generator · SPF, DKIM and DMARC checker
Frequently asked questions
How do I create an SPF record?
Tick the services that send your email on this page, add your own servers if any, choose the ending, and copy the record. Add it as a TXT record on your domain at your DNS provider.
What is a good SPF record for Google Workspace?
v=spf1 include:_spf.google.com ~all, plus an include for every other service that sends as your domain.
What is the SPF record for Microsoft 365?
v=spf1 include:spf.protection.outlook.com -all for most domains, plus any other service that sends as your domain. Microsoft recommends -all once DKIM and DMARC are in place.
Can I have two SPF records?
No. Put every service in one record. With two, receivers treat SPF as broken.
Is this SPF generator free?
Yes, and it needs no account.
Hermoso makes the ads, sends the follow-ups and posts to every channel from one place. Start free, no card.
Start free → See pricing