[{"data":1,"prerenderedAt":181},["ShallowReactive",2],{"tool-spf-generator":3},{"id":4,"title":5,"body":6,"description":158,"extension":159,"faq":160,"h1":173,"intro":174,"meta":175,"navigation":176,"path":177,"seo":178,"stem":179,"__hash__":180},"tools\u002Ftools\u002Fspf-generator.md","SPF Record Generator: Build an SPF Record",{"type":7,"value":8,"toc":151},"minimark",[9,14,59,63,67,83,86,95,98,107,111,136,140,147],[10,11,13],"h2",{"id":12},"how-to-use-the-spf-generator","How to use the SPF generator",[15,16,17,21,33,40,48],"ol",{},[18,19,20],"li",{},"Tick every service that sends mail with your domain in the envelope sender: your mailbox provider, your transactional email API, your marketing tool, your helpdesk.",[18,22,23,24,28,29,32],{},"Add any servers of your own as ",[25,26,27],"code",{},"ip4:"," or ",[25,30,31],{},"ip6:"," ranges.",[18,34,35,36,39],{},"Choose how to treat everything else. ",[25,37,38],{},"~all"," is the usual choice alongside DMARC.",[18,41,42,43,47],{},"Click ",[44,45,46],"strong",{},"Count real DNS lookups",". The generator resolves the draft record live, without publishing it, and shows the full include tree.",[18,49,50,51,54,55,58],{},"Publish the record as a TXT record at the root of the domain (",[25,52,53],{},"@"," in most DNS panels), replacing any existing ",[25,56,57],{},"v=spf1"," record.",[10,60,62],{"id":61},"examples","Examples",[64,65,66],"p",{},"Google Workspace plus a transactional provider:",[68,69,74],"pre",{"className":70,"code":71,"language":72,"meta":73,"style":73},"language-txt shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","v=spf1 include:_spf.google.com include:sendgrid.net ~all\n","txt","",[25,75,76],{"__ignoreMap":73},[77,78,81],"span",{"class":79,"line":80},"line",1,[77,82,71],{},[64,84,85],{},"A single office server and Microsoft 365:",[68,87,89],{"className":70,"code":88,"language":72,"meta":73,"style":73},"v=spf1 ip4:203.0.113.25 include:spf.protection.outlook.com -all\n",[25,90,91],{"__ignoreMap":73},[77,92,93],{"class":79,"line":80},[77,94,88],{},[64,96,97],{},"A domain that never sends mail:",[68,99,101],{"className":70,"code":100,"language":72,"meta":73,"style":73},"v=spf1 -all\n",[25,102,103],{"__ignoreMap":73},[77,104,105],{"class":79,"line":80},[77,106,100],{},[10,108,110],{"id":109},"keeping-under-the-lookup-limit","Keeping under the lookup limit",[112,113,114,117,126,133],"ul",{},[18,115,116],{},"Remove includes for services you have stopped using. They still cost lookups.",[18,118,119,120,122,123,125],{},"Use ",[25,121,27],{},"\u002F",[25,124,31],{}," for your own servers. They are free.",[18,127,128,129,132],{},"Send marketing or bulk mail from a subdomain (",[25,130,131],{},"news.example.com",") with its own SPF record.",[18,134,135],{},"Check the record again from time to time. Providers change their own records, and your total can grow without you editing anything.",[10,137,139],{"id":138},"many-services-use-their-own-envelope-domain","Many services use their own envelope domain",[64,141,142,143,146],{},"Some email services send with their own ",[25,144,145],{},"Return-Path"," domain by default. Then SPF is checked against their domain, not yours, and adding their include to your record changes nothing. It only counts once you configure the provider's custom return-path or bounce domain on a subdomain of yours. That subdomain gets its own SPF record, usually a CNAME or TXT record the provider gives you.",[148,149,150],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":73,"searchDepth":152,"depth":152,"links":153},2,[154,155,156,157],{"id":12,"depth":152,"text":13},{"id":61,"depth":152,"text":62},{"id":109,"depth":152,"text":110},{"id":138,"depth":152,"text":139},"Free SPF record generator. Pick the services that send for your domain, add your own IP ranges, get a valid v=spf1 record, and count its DNS lookups.","md",[161,164,167,170],{"question":162,"answer":163},"Can I add a second SPF record for a new service?","No. A domain must have exactly one v=spf1 record. Add the new service's include to your existing record instead.",{"question":165,"answer":166},"Why count lookups before publishing?","Each include can pull in more includes. The record may look like it has four includes but cost nine lookups. Past ten, receivers return permerror and SPF fails for every message.",{"question":168,"answer":169},"Should I include a and mx?","Only if the servers in your A or MX records actually send mail as the domain. With a hosted mailbox provider, the provider's include already covers outbound mail, and a and mx just waste lookups.",{"question":171,"answer":172},"Where do I find a provider's include?","In their domain authentication or SPF setup guide. The common ones are listed here. If a provider gives you IP ranges instead, add them as ip4 or ip6.","SPF record generator","Pick the services that send as your domain and add your own servers. The SPF record generator builds the TXT record, and one click resolves every include to count the DNS lookups receivers will see.",{},true,"\u002Ftools\u002Fspf-generator",{"title":5,"description":158},"tools\u002Fspf-generator","MXRSPV48NWxMXXB4-HmTIpLjZXZKKi7-s5bh0gBB7Vk",1795555753504]