{"id":1681,"date":"2026-09-03T17:21:18","date_gmt":"2026-09-03T11:51:18","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/how-to-setup-spf-dkim-dmarc-records-email-deliverability\/"},"modified":"2026-09-03T17:24:34","modified_gmt":"2026-09-03T11:54:34","slug":"how-to-setup-spf-dkim-dmarc-records-email-deliverability","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/how-to-setup-spf-dkim-dmarc-records-email-deliverability\/","title":{"rendered":"How to Set Up SPF, DKIM &amp; DMARC Records for 100% Email Deliverability (2026)"},"content":{"rendered":"<div style=\"background-color: #f8fafc;border-left: 4px solid #a855f7;padding: 20px;border-radius: 6px;margin-bottom: 25px\">\n<p style=\"margin: 0;font-size: 16px;color: #1e293b\">\n        <strong>Quick Answer:<\/strong> To achieve 100% email deliverability and comply with Google\/Yahoo sender rules: <strong>1)<\/strong> Add an <strong>SPF TXT Record<\/strong> on <code>@<\/code> authorizing your mail servers (<code>v=spf1 +a +mx include:_spf.google.com ~all<\/code>), <strong>2)<\/strong> Add a <strong>DKIM TXT Record<\/strong> containing your 2048-bit public RSA key (<code>default._domainkey<\/code>), and <strong>3)<\/strong> Add a <strong>DMARC TXT Record<\/strong> on <code>_dmarc<\/code> (<code>v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com<\/code>).\n    <\/p>\n<\/div>\n<h2>Why Gmail and Yahoo Reject Unauthenticated Emails in 2026<\/h2>\n<p>Major email providers (Google, Yahoo, Microsoft Outlook, Apple Mail) enforce mandatory email authentication. If your domain sends transactional WordPress emails or customer newsletters without valid SPF, DKIM, and DMARC records, inbox providers will automatically drop your messages into the <strong>Spam folder<\/strong> or reject them with <code>550 5.7.26 Unauthenticated email<\/code> error codes.<\/p>\n<h2>The 3 Pillars of Email Authentication Explained<\/h2>\n<h3>1. SPF (Sender Policy Framework)<\/h3>\n<p>SPF is a DNS TXT record listing all IP addresses and third-party services (e.g. Google Workspace, Brevo, Mailgun) authorized to send email from your domain.<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">Type: TXT\nHost: @ (or yourdomain.com)\nValue: v=spf1 +a +mx ~all<\/pre>\n<h3>2. DKIM (DomainKeys Identified Mail)<\/h3>\n<p>DKIM adds an invisible cryptographic digital signature to email headers. When the receiving mail server gets the message, it fetches your public key from DNS to verify that the message was not modified in transit.<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">Type: TXT\nHost: default._domainkey\nValue: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQE...<\/pre>\n<h3>3. DMARC (Domain-based Message Authentication &amp; Reporting)<\/h3>\n<p>DMARC tells receiving mail servers what to do if an incoming email fails SPF or DKIM checks (Monitor, Quarantine in Spam, or Reject completely):<\/p>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">Type: TXT\nHost: _dmarc\nValue: v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc-reports@yourdomain.com<\/pre>\n<h2>Enabling Automated SPF &amp; DKIM in cPanel in 1-Click<\/h2>\n<ol style=\"padding-left: 20px;line-height: 1.8\">\n<li>Log in to your <a href=\"https:\/\/cpanelfree.com\/\">CpanelFree<\/a> dashboard.<\/li>\n<li>Under the <strong>Email<\/strong> category, click <strong>Email Deliverability<\/strong>.<\/li>\n<li>Locate your domain name and click <strong>Manage<\/strong>.<\/li>\n<li>cPanel will display your SPF and DKIM status. Click <strong>Install Suggested Records<\/strong> to generate and publish both DNS records automatically.<\/li>\n<\/ol>\n<div style=\"background-color: #f8fafc;border: 1px solid #e2e8f0;border-left: 4px solid #0ea5e9;padding: 20px;border-radius: 8px;margin: 30px 0\">\n<h3 style=\"margin-top: 0;color: #0f172a;font-size: 18px;display: flex;align-items: center\">\n        <span style=\"margin-right: 8px\">\ud83d\udd17<\/span> Recommended Related Technical Guides:<br \/>\n    <\/h3>\n<ul style=\"margin: 10px 0 0 0;padding-left: 20px;line-height: 1.8\">\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-fix-wordpress-not-sending-emails-smtp-setup\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">How to Fix WordPress Not Sending Emails (Free SMTP Setup)<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/dns-a-record-vs-cname-vs-alias-guide\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">DNS A Record vs CNAME vs ALIAS Explained<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-setup-free-cloudflare-cdn-dns-hosting\/\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">How to Set Up Free Cloudflare CDN &amp; DNS<\/a><\/li>\n<li><a href=\"https:\/\/cpanelfree.com\/#plans\" style=\"color: #0284c7;text-decoration: none;font-weight: 600\">Explore $0 Free cPanel Web Hosting Plans<\/a><\/li>\n<\/ul>\n<\/div>\n<h2>Configuring Strict DMARC Policies: p=none vs p=quarantine vs p=reject<\/h2>\n<p>When first implementing DMARC, always follow a progressive 3-stage rollout strategy:<\/p>\n<ol style=\"padding-left: 20px;line-height: 1.8\">\n<li><strong>Stage 1 (Monitoring Mode):<\/strong> <code>v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com;<\/code> &#8211; Monitors email flows without altering inbox delivery.<\/li>\n<li><strong>Stage 2 (Quarantine Mode):<\/strong> <code>v=DMARC1; p=quarantine; pct=100;<\/code> &#8211; Automatically moves unauthenticated spoofed emails directly to recipient spam folders.<\/li>\n<li><strong>Stage 3 (Strict Reject Mode):<\/strong> <code>v=DMARC1; p=reject; pct=100;<\/code> &#8211; Blocks unauthenticated phishing and spoofing attempts at the mail server gateway before reaching users.<\/li>\n<\/ol>\n<h2>Testing DNS Authentication Records with MXToolbox &amp; Mail-Tester<\/h2>\n<p>Send a test email to <a href=\"https:\/\/www.mail-tester.com\/\" target=\"_blank\" rel=\"noopener\">Mail-Tester.com<\/a>. The automated analyzer evaluates your SPF record syntax, validates 2048-bit DKIM signatures, checks DMARC alignment, and assigns an overall deliverability score out of 10.<\/p>\n<h2>Detailed Syntax and Best Practices for SPF, DKIM &amp; DMARC Records<\/h2>\n<h3>1. Perfect SPF TXT Record Structure<\/h3>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">v=spf1 +a +mx include:_spf.google.com include:sendinblue.com ~all<\/pre>\n<p><strong>Mechanisms Explained:<\/strong> <code>+a<\/code> (authorizes domain A record IP), <code>+mx<\/code> (authorizes mail servers), <code>include:domain<\/code> (authorizes third-party SMTP relays), <code>~all<\/code> (SoftFail policy: accept but flag unauthorized senders).<\/p>\n<h3>2. Generating 2048-Bit DKIM Keys via OpenSSL CLI<\/h3>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\"># Generate private key\nopenssl genrsa -out dkim_private.key 2048\n\n# Extract public key for DNS TXT record\nopenssl rsa -in dkim_private.key -pubout -outform PEM<\/pre>\n<h3>3. Structuring Comprehensive DMARC Policy Directives<\/h3>\n<pre style=\"background-color: #1e293b;color: #38bdf8;padding: 14px;border-radius: 6px;font-size: 13px\">v=DMARC1; p=quarantine; sp=quarantine; pct=100; rua=mailto:dmarc-aggregate@yourdomain.com; ruf=mailto:dmarc-forensic@yourdomain.com; adkim=r; aspf=r;<\/pre>\n<div style=\"background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);border: 1px solid #334155;border-radius: 12px;padding: 25px;margin: 30px 0;text-align: center\">\n<h3 style=\"color: #38bdf8;margin-top: 0;font-size: 20px\">100% Email Deliverability on CpanelFree<\/h3>\n<p style=\"color: #94a3b8;font-size: 14px;line-height: 1.6;max-width: 600px;margin: 0 auto 15px\">\n        Enjoy built-in cPanel Email Deliverability tools, custom domain mailboxes, and automated SPF\/DKIM records at $0 forever on <strong>CpanelFree<\/strong>.\n    <\/p>\n<p>    <a href=\"https:\/\/cpanelfree.com\/#plans\" style=\"display: inline-block;background-color: #a855f7;color: #ffffff;padding: 10px 22px;border-radius: 6px;text-decoration: none;font-weight: bold;font-size: 14px\">Claim Free Hosting<\/a>\n<\/div>\n<h2>Frequently Asked Questions<\/h2>\n<div style=\"border-bottom: 1px solid #e2e8f0;padding: 12px 0\">\n<h4 style=\"margin: 0 0 8px 0;color: #1e293b\">Can I have more than one SPF TXT record on my domain?<\/h4>\n<p style=\"margin: 0;color: #475569;font-size: 14px\"><strong>No!<\/strong> Having multiple SPF records violates RFC 7208 and causes receiving mail servers to fail SPF evaluation. Always merge multiple sending services into a single record (e.g. <code>v=spf1 +a +mx include:_spf.google.com include:sendinblue.com ~all<\/code>).<\/p>\n<\/div>\n<h2>Understanding DMARC Aggregate (rua) XML Reports<\/h2>\n<p>When you include <code>rua=mailto:dmarc-reports@yourdomain.com<\/code> in your DMARC DNS record, inbox providers (Google, Yahoo, Microsoft) send daily automated XML reports detailing which IP addresses sent emails on behalf of your domain and whether they passed SPF and DKIM validation. Free services like <strong>DMARCian<\/strong> or <strong>Postmark DMARC<\/strong> parse these raw XML files into clean graphical visualizers.<\/p>\n<div style=\"border-bottom: 1px solid #e2e8f0;padding: 12px 0\">\n<h4 style=\"margin: 0 0 8px 0;color: #1e293b\">How long does it take for DNS authentication records to propagate globally?<\/h4>\n<p style=\"margin: 0;color: #475569;font-size: 14px\">DNS TXT records generally propagate globally within 15 minutes to 2 hours when managed through Cloudflare or modern cPanel DNS zone editors.<\/p>\n<\/div>\n<div style=\"background-color: #f1f5f9;padding: 15px;border-radius: 8px;margin: 20px 0\">\n<h4 style=\"margin-top: 0;color: #1e293b\">Pro Sysadmin Tip: Subdomain Email Alignment (sp=reject)<\/h4>\n<p style=\"margin: 0;color: #475569;font-size: 14px\">Include <code>sp=reject;<\/code> in your apex DMARC record to prevent malicious spoofing attacks using unauthorized subdomains (e.g. <code>mail.yourdomain.com<\/code> or <code>support.yourdomain.com<\/code>).<\/p>\n<\/div>\n<p>Properly authenticating SPF, DKIM, and DMARC DNS records establishes an unshakeable domain reputation, protecting your business against spoofing and guaranteeing 100% inbox delivery.<\/p>\n<p>Enforcing strict SPF, DKIM, and DMARC authentication protocols guarantees that transactional receipts and marketing emails pass spam filters reliably and land directly in user inboxes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quick Answer: To achieve 100% email deliverability and comply with Google\/Yahoo sender rules: 1) Add an SPF TXT Record on @ authorizing your mail servers (v=spf1 +a +mx include:_spf.google.com ~all), 2) Add a DKIM TXT Record containing your 2048-bit public RSA key (default._domainkey), and 3) Add a DMARC TXT Record on _dmarc (v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com). [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1680,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51],"tags":[],"class_list":["post-1681","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/comments?post=1681"}],"version-history":[{"count":5,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1681\/revisions"}],"predecessor-version":[{"id":1726,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1681\/revisions\/1726"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/1680"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=1681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=1681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=1681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}