Email tools
SPF record generator and checker
Tick every service that sends email as your domain, including your website, and the builder writes one SPF record and counts its DNS lookups. Then test the record you publish to see whether it is valid and what to fix.
- 10-lookup counter
- One record for every sender
- Cloudflare origin check
Free, no sign-up. Results are not saved.
This tool needs JavaScript. Turn JavaScript on and reload the page.
Email DNS
Your domain
The part after the @ in your email address, such as example.com. Subdomains and international names work too. The builders use it to write your records; nothing is sent until you press a Test button.
The service you read your email in. It decides your MX records and is usually your main sender.
Other services that send email as your domain
Tick every service that sends with an address at your domain: your website's SMTP plugin service, newsletters, your help desk. Each one needs its own SPF and DKIM setup, or its mail fails DMARC.
Enter your domain and run the full test: mail servers, SPF, DKIM for the services found, DMARC, MTA-STS, TLS reporting and BIMI in one go, as a checklist with a link to the tab that fixes each problem.
MX records say which servers receive email for your domain. Pick your mailbox provider to get the exact records, then test what is published.
MX records to publish
Choose where your mailboxes are above. Lower numbers are tried first.
How to add these records at your DNS host
- Which name to type. The Name column is relative to your domain: @ means the domain itself. Most DNS hosts add your domain for you, so type only the part shown (such as _dmarc). If a test then finds the record at _dmarc.example.com.example.com, your host did not add it and wants the full name instead.
- Cloudflare. MX and TXT records are always DNS only. Any host name an MX record points to must be DNS only too (grey cloud), because Cloudflare's proxy does not carry email. Set DKIM and autodiscover CNAME records to DNS only, and turn off CNAME flattening for them. Cloudflare's guide (opens in a new tab)
- Namecheap. Use @ for the domain itself and only the subdomain part for anything else, such as selector1._domainkey; do not add your domain to the Host field. Namecheap's guide (opens in a new tab)
- cPanel Zone Editor. cPanel adds your domain to the name automatically. An MX record's destination must be a full host name. cPanel manages SPF and DKIM for mail it sends under Email Deliverability. cPanel's guide (opens in a new tab)
- Long TXT values. A TXT string holds at most 255 characters. Most DNS hosts split longer values for you; if yours asks for quoted strings, use the zone-file version from Copy all, which is already split.
SPF lists every server allowed to send email as your domain. Tick every service that sends for you, including your website, and the builder writes one record and counts its DNS lookups.
Build your SPF record
Your mailbox provider and the services ticked above are included. A domain may have only one SPF record: put everything in this one.
With DMARC at quarantine or reject, ~all is safe and is what Google recommends: DMARC decides what happens to mail that fails. -all is stricter. Never use +all (anyone may send) or ?all (no opinion). The builder never adds ptr, which RFC 7208 says not to use.
Relays and alignment: why SPF can pass and DMARC still fail
DMARC needs SPF or DKIM to pass for your own domain. Most sending services use their own bounce address (the return path), so SPF passes for their domain, not yours. Their mail then passes DMARC only through DKIM signed with your domain, unless you set up the service's custom return path (bounce domain) on a subdomain of yours.
How to add these records at your DNS host
- Which name to type. The Name column is relative to your domain: @ means the domain itself. Most DNS hosts add your domain for you, so type only the part shown (such as _dmarc). If a test then finds the record at _dmarc.example.com.example.com, your host did not add it and wants the full name instead.
- Cloudflare. MX and TXT records are always DNS only. Any host name an MX record points to must be DNS only too (grey cloud), because Cloudflare's proxy does not carry email. Set DKIM and autodiscover CNAME records to DNS only, and turn off CNAME flattening for them. Cloudflare's guide (opens in a new tab)
- Namecheap. Use @ for the domain itself and only the subdomain part for anything else, such as selector1._domainkey; do not add your domain to the Host field. Namecheap's guide (opens in a new tab)
- cPanel Zone Editor. cPanel adds your domain to the name automatically. An MX record's destination must be a full host name. cPanel manages SPF and DKIM for mail it sends under Email Deliverability. cPanel's guide (opens in a new tab)
- Long TXT values. A TXT string holds at most 255 characters. Most DNS hosts split longer values for you; if yours asks for quoted strings, use the zone-file version from Copy all, which is already split.
DKIM signs each message with a key published in DNS. Pick the services that send for you to see the records each one needs, then test that the keys are there.
DKIM records for your services
Each service creates its own keys. Where it hands out CNAME records, it keeps and rotates the key for you, so copy the record exactly. Where the value depends on your account, copy it from the service. Ask for 2048-bit keys where the service offers a choice.
How to add these records at your DNS host
- Which name to type. The Name column is relative to your domain: @ means the domain itself. Most DNS hosts add your domain for you, so type only the part shown (such as _dmarc). If a test then finds the record at _dmarc.example.com.example.com, your host did not add it and wants the full name instead.
- Cloudflare. MX and TXT records are always DNS only. Any host name an MX record points to must be DNS only too (grey cloud), because Cloudflare's proxy does not carry email. Set DKIM and autodiscover CNAME records to DNS only, and turn off CNAME flattening for them. Cloudflare's guide (opens in a new tab)
- Namecheap. Use @ for the domain itself and only the subdomain part for anything else, such as selector1._domainkey; do not add your domain to the Host field. Namecheap's guide (opens in a new tab)
- cPanel Zone Editor. cPanel adds your domain to the name automatically. An MX record's destination must be a full host name. cPanel manages SPF and DKIM for mail it sends under Email Deliverability. cPanel's guide (opens in a new tab)
- Long TXT values. A TXT string holds at most 255 characters. Most DNS hosts split longer values for you; if yours asks for quoted strings, use the zone-file version from Copy all, which is already split.
DMARC tells receivers what to do with mail that fails SPF and DKIM, and where to send reports. Build a record, follow the rollout steps, and test it.
Build your DMARC record
Where you are heading: reject. Get there step by step (see the rollout guide below).
For subdomains that have no DMARC record of their own, such as news.yourdomain.
Made-up names like invoices.yourdomain are only used by forgers. np comes from RFC 9989 (May 2026); receivers that do not know it use sp.
One or more email addresses, separated by spaces: a mailbox you read, or a DMARC reporting service's address. The reports are XML files listing who sent as your domain.
Few receivers send these, and they can contain parts of real messages.
Only used with a failure report address.
Relaxed alignment accepts any subdomain of your domain, such as em1234.yourdomain used by a sending service. Strict needs the exact domain, which breaks most sending services' return paths; keep relaxed unless you have a reason.
Receivers apply one step less than your policy: none instead of quarantine, quarantine instead of reject. RFC 9989 (May 2026) added t=y and removed the old pct tag.
Rollout guide: from p=none to p=reject
- Start with p=none and a report address. Nothing changes for your mail, and receivers send you daily reports.
- Read the reports for two to four weeks. A DMARC reporting service makes them readable. List every service that sends as your domain, including your website's contact forms.
- Fix each sender. Set up DKIM with your domain for every service (the DKIM tab), and SPF where it aligns (the SPF tab), until real mail passes.
- Move to p=quarantine, with t=y for a week or two if you want a gentler step. Keep reading the reports.
- Move to p=reject. Forged mail is now refused, and your domain is ready for BIMI.
How to add these records at your DNS host
- Which name to type. The Name column is relative to your domain: @ means the domain itself. Most DNS hosts add your domain for you, so type only the part shown (such as _dmarc). If a test then finds the record at _dmarc.example.com.example.com, your host did not add it and wants the full name instead.
- Cloudflare. MX and TXT records are always DNS only. Any host name an MX record points to must be DNS only too (grey cloud), because Cloudflare's proxy does not carry email. Set DKIM and autodiscover CNAME records to DNS only, and turn off CNAME flattening for them. Cloudflare's guide (opens in a new tab)
- Namecheap. Use @ for the domain itself and only the subdomain part for anything else, such as selector1._domainkey; do not add your domain to the Host field. Namecheap's guide (opens in a new tab)
- cPanel Zone Editor. cPanel adds your domain to the name automatically. An MX record's destination must be a full host name. cPanel manages SPF and DKIM for mail it sends under Email Deliverability. cPanel's guide (opens in a new tab)
- Long TXT values. A TXT string holds at most 255 characters. Most DNS hosts split longer values for you; if yours asks for quoted strings, use the zone-file version from Copy all, which is already split.
MTA-STS makes other mail servers use an encrypted, verified connection when they deliver to you, and TLS reporting tells you when they cannot.
Build your MTA-STS policy
Switch to enforce once TLS reports show no failures.
max_age. Longer protects better between fetches; shorter lets changes reach senders sooner.
Filled in from your mailbox provider, or from your MX records after a test. *.example.com matches exactly one label, such as mx1.example.com.
Policy file
Where to host the policy
- Create the subdomain mta-sts.yourdomain and point it (A or CNAME record) at a web host that serves HTTPS. Any static host works.
- It needs its own valid certificate for mta-sts.yourdomain, such as a free Let's Encrypt certificate. A certificate only for www or the bare domain is not enough.
- Upload the file to .well-known/mta-sts.txt, served as text/plain with status 200 and no redirect: senders do not follow redirects.
- On WordPress hosting, a separate tiny site for mta-sts works best, so no plugin or HTTPS rule redirects it.
How to add these records at your DNS host
- Which name to type. The Name column is relative to your domain: @ means the domain itself. Most DNS hosts add your domain for you, so type only the part shown (such as _dmarc). If a test then finds the record at _dmarc.example.com.example.com, your host did not add it and wants the full name instead.
- Cloudflare. MX and TXT records are always DNS only. Any host name an MX record points to must be DNS only too (grey cloud), because Cloudflare's proxy does not carry email. Set DKIM and autodiscover CNAME records to DNS only, and turn off CNAME flattening for them. Cloudflare's guide (opens in a new tab)
- Namecheap. Use @ for the domain itself and only the subdomain part for anything else, such as selector1._domainkey; do not add your domain to the Host field. Namecheap's guide (opens in a new tab)
- cPanel Zone Editor. cPanel adds your domain to the name automatically. An MX record's destination must be a full host name. cPanel manages SPF and DKIM for mail it sends under Email Deliverability. cPanel's guide (opens in a new tab)
- Long TXT values. A TXT string holds at most 255 characters. Most DNS hosts split longer values for you; if yours asks for quoted strings, use the zone-file version from Copy all, which is already split.
BIMI shows your logo beside your emails in Gmail, Apple Mail and Yahoo once DMARC is enforced. Test your BIMI record, logo and certificate, and build the record.
BIMI record generator
Enter where your logo and certificate are hosted to get the TXT record to add to your DNS. A test fills these in from the record it finds.
- Name (host)
default._bimi- Type
TXT- Value
Enter your logo address to make the record.
Which inboxes show BIMI logos
- Gmail shows the logo only with a mark certificate: a Verified Mark Certificate (VMC) for a registered trademark, or a Common Mark Certificate (CMC) for a logo you have used for at least a year. It adds a verified checkmark for a VMC only.
- Apple Mail (iOS 16, macOS Ventura and later) documents a VMC as the evidence it checks.
- Yahoo says it does not require a certificate, and shows logos on bulk mail from senders with a good reputation.
- Every provider needs DMARC at p=quarantine or p=reject for all mail, a square SVG Tiny PS logo, and a BIMI record.
Read more: Google: set up BIMI (opens in a new tab), Yahoo: BIMI (opens in a new tab) and Apple: BIMI (opens in a new tab). Making a signature for your email? Try the email signature generator.
For a domain that sends and receives no email at all: four records that stop anyone sending convincing email as it.
Lock down a domain that sends no email
Spammers like domains with no email records, because nothing tells receivers to refuse forged mail from them. These records say: this domain sends nothing and receives nothing. Use them for parked domains, old brand domains, and subdomains that never send mail (publish them at the subdomain's own name).
Belt and braces: with SPF -all and DMARC p=reject, forged mail already fails. Some DNS hosts do not allow a wildcard here; leave it out if yours refuses it.
- MX 0 . is a null MX (RFC 7505): senders learn at once that the domain takes no mail, instead of retrying for days.
- v=spf1 -all says no server at all may send as the domain.
- p=reject asks receivers to refuse forged mail outright; sp=reject does the same for its subdomains, and strict alignment (adkim=s, aspf=s) leaves no room for lookalike subdomains.
How to add these records at your DNS host
- Which name to type. The Name column is relative to your domain: @ means the domain itself. Most DNS hosts add your domain for you, so type only the part shown (such as _dmarc). If a test then finds the record at _dmarc.example.com.example.com, your host did not add it and wants the full name instead.
- Cloudflare. MX and TXT records are always DNS only. Any host name an MX record points to must be DNS only too (grey cloud), because Cloudflare's proxy does not carry email. Set DKIM and autodiscover CNAME records to DNS only, and turn off CNAME flattening for them. Cloudflare's guide (opens in a new tab)
- Namecheap. Use @ for the domain itself and only the subdomain part for anything else, such as selector1._domainkey; do not add your domain to the Host field. Namecheap's guide (opens in a new tab)
- cPanel Zone Editor. cPanel adds your domain to the name automatically. An MX record's destination must be a full host name. cPanel manages SPF and DKIM for mail it sends under Email Deliverability. cPanel's guide (opens in a new tab)
- Long TXT values. A TXT string holds at most 255 characters. Most DNS hosts split longer values for you; if yours asks for quoted strings, use the zone-file version from Copy all, which is already split.
Not showing yet? Why new records take time, and how to clear caches
DNS answers are cached. Every record has a TTL (time to live), the number of seconds resolvers may keep it, often between 5 minutes and a day. A record that was missing when someone last looked is also cached as "missing", for as long as your zone's SOA record says. So a change shows at once in some places and later in others; DNS hosts commonly quote up to 48 hours for everything to catch up. The test above also asks your domain's own nameservers, so it can tell you when your DNS host already has the change.
- Clear the big public resolvers. Cloudflare: Purge 1.1.1.1 cache (opens in a new tab). Google: Flush Google Public DNS cache (opens in a new tab). Enter the full record name, such as _dmarc.example.com, and its type.
- Clear your browser's cache (Chrome). Copy this address into the address bar, then press Clear host cache:
chrome://net-internals/#dns - Clear your computer's cache. Windows (Command Prompt):
ipconfig /flushdnsmacOS (Terminal, asks for your password; Apple's documented command for OS X 10.10.4 and later):sudo killall -HUP mDNSResponderLinux with systemd-resolved:resolvectl flush-caches - Still stale? Your router and phone keep their own caches: restart them, or try from mobile data.
- Check the record is at the right name. If the test finds nothing, look in the DNS lookup tool for the record with your domain added twice (such as _dmarc.example.com.example.com): your DNS host added the domain for you.
What gets your email delivered in 2026
- Gmail and Yahoo ask every sender for SPF or DKIM. Bulk senders (for Gmail, about 5,000 or more messages a day to Gmail accounts) also need both SPF and DKIM, a DMARC record (p=none at least) aligned with SPF or DKIM, and one-click unsubscribe for marketing mail. Since November 2025 Gmail has been stepping up enforcement, including rejecting mail that does not comply.
- Outlook.com, Hotmail and Live ask domains that send more than 5,000 messages a day for passing SPF and DKIM and DMARC p=none or stronger, aligned with one of them. Since 5 May 2025 mail that fails goes to Junk.
- Mail from your WordPress site (password resets, orders, contact forms) counts too: send it through an SMTP plugin and an email service that is in your SPF and DKIM records.
Sources: Gmail sender guidelines (opens in a new tab), Yahoo sender best practices (opens in a new tab), Outlook.com requirements (opens in a new tab), RFC 7208 (SPF) (opens in a new tab), RFC 6376 (DKIM) (opens in a new tab), RFC 9989 (DMARC) (opens in a new tab), RFC 8461 (MTA-STS) (opens in a new tab) and RFC 7505 (null MX) (opens in a new tab). To see all of a domain's records, use the DNS lookup; to check its certificate, the SSL checker.
What you can do
-
Build one SPF record for your mailbox provider and every other sender
-
Count DNS lookups as you build, against the limit of 10
-
Test the published record through every include
-
Find includes that no longer exist and void lookups
-
Catch +all, ?all, ptr and more than one SPF record
-
See whether SPF reveals a server hidden behind Cloudflare
How to create and check an SPF record
-
List every sender
Choose where your mailboxes are and tick each service that sends with an address at your domain: your website's SMTP service, newsletters, your help desk. Add IP addresses or extra includes only for servers not in the list.
-
Publish one TXT record
Copy the record and add it as a TXT record at your domain's root, replacing any SPF record that is already there. Start with ~all, and keep the lookup count at 10 or below.
-
Test it
After a quick Cloudflare security check, the test follows every include, counts the lookups, and lists each problem with a fix. It also asks your domain's own nameservers, so a new record shows before caches expire.
SPF records explained for WordPress site owners
SPF (Sender Policy Framework, RFC 7208) is a TXT record that starts with v=spf1 and lists the servers allowed to send email as your domain. Receivers check it against the bounce address (the return path) of each message.
The rules that matter
- One record only. Two TXT records starting with v=spf1 make SPF fail with a permanent error, so put every sender in one record.
- No more than 10 DNS lookups. Each include, a, mx, exists and redirect costs one, and so does everything inside an include. ip4 and ip6 cost nothing. When we last checked, Google Workspace's and Microsoft 365's includes cost one lookup each, while Mailgun's costs 5 and Freshdesk's 7. More than two lookups that find nothing also fail.
- End with ~all (soft fail) while you confirm your senders. With DMARC enforced, ~all is enough; -all is stricter. Never use +all, which lets anyone send as you, or ?all. Do not use ptr: RFC 7208 says it should not be published.
- Each string in a TXT record holds at most 255 characters. A longer record is split into several quoted strings, which receivers join without spaces.
Relays and alignment
Most sending services use their own return path, so SPF passes for their domain, not yours, and does not help DMARC. Their mail passes DMARC through DKIM signed with your domain, or through SPF once you set up the service's custom return path (bounce domain) on a subdomain of yours.
Over the limit? Avoid flattening
"SPF flattening" replaces includes with long lists of IP addresses, which break when providers change them. Instead, remove services you no longer use, set up a provider's return-path domain so its include moves off your main record, or send marketing mail from a subdomain with its own SPF record.
WordPress, Cloudflare and your server's address
Do not let the web server send mail itself. Install an SMTP plugin, send through your mailbox provider or an email service, and include that service. An SPF record never hides anything: a and ip4 values are public. With Cloudflare's proxy on, a means Cloudflare's addresses, which never send your mail, and putting your origin server's IP address in SPF reveals the server Cloudflare hides, so attackers can go round it.
Frequently asked questions
Can I have two SPF records?
No. If a domain has more than one TXT record starting with v=spf1, SPF fails with a permanent error for all of your mail. Merge them into one record that lists every sender.
What does too many SPF lookups mean?
Each include, a, mx, exists and redirect in your record costs a DNS lookup, including the ones inside the records you include. Receivers stop after 10 and SPF fails, even for your real email. Remove services you no longer use, replace a and mx with the addresses they stand for, or move a group of senders to a subdomain.
Should I use ~all or -all?
Start with ~all (soft fail) while you check that every sender is listed. With DMARC at quarantine or reject, ~all is safe, because DMARC decides what happens to failing mail. Move to -all only once you are sure the list is complete.
Why does SPF pass but DMARC fail?
DMARC needs SPF to pass for your own domain. Many sending services use their own bounce address, so SPF passes for their domain instead. Set up DKIM with your domain for that service, or its custom return path on a subdomain of yours.
How do I add my WordPress site to SPF?
Do not add the web server. Install an SMTP plugin, send WordPress mail through your mailbox provider or an email service, and add that service's include. Mail from a web server is often marked as spam, and naming the server can reveal its address.
My SPF record is longer than 255 characters. What do I do?
Split it into several quoted strings of up to 255 characters inside the same TXT record. Receivers join them without adding spaces, so split between terms and keep the space at the end of one string or the start of the next. Many DNS hosts split long values for you.
Is the domain I check stored?
The result is not saved. The MTA-STS policy, BIMI logo and certificate the test downloads are read once and not kept. To count how the tool is used, this site keeps the domain you tested for 12 months, with the time, the outcome, your approximate location (country, region and city), the site you came from and your type of device and browser, but no IP address, and never the services or DKIM selectors you picked. The privacy policy has the details.
Related tools
-
Look up DNS records and check SPF, DMARC, DKIM and DNSSEC.
-
Email header decoder
New (added recently)Paste an email’s full headers to see its delivery path, delays, SPF, DKIM, DMARC and ARC results, alignment and spam scores, decoded in your browser.
-
Blacklist checker
New (added recently)Check whether an IP address or a domain’s website and mail servers are on spam blocklists, with what each listing means and how to get removed.
-
DNS propagation checker
New (added recently)Check whether a DNS change has reached Google, Cloudflare, Quad9 and other public resolvers, and when each one refreshes.