{"id":78103,"date":"2026-11-02T16:49:53","date_gmt":"2026-11-02T14:49:53","guid":{"rendered":"https:\/\/tremhost.com\/blog\/?p=78103"},"modified":"2026-11-06T20:39:11","modified_gmt":"2026-11-06T18:39:11","slug":"how-to-set-up-spf-dkim-and-dmarc-for-your-business-domain","status":"publish","type":"post","link":"https:\/\/tremhost.com\/blog\/how-to-set-up-spf-dkim-and-dmarc-for-your-business-domain\/","title":{"rendered":"How to Set Up SPF, DKIM and DMARC for Your Business Domain"},"content":{"rendered":"<p>To set up SPF, DKIM and DMARC, publish three DNS TXT records on your domain: an SPF record listing the servers allowed to send your mail, a DKIM public key supplied by your email provider, and a DMARC policy that tells receiving servers what to do with mail that fails those checks. Start DMARC in monitoring mode (p=none), confirm every legitimate sender passes, then tighten the policy step by step.<\/p>\n<p>For a business in Zimbabwe, this matters whether you use a .co.zw or a .com domain. If you send invoices, quotations and payment instructions from your company address, these records make it harder for criminals to send fake invoices that appear to come from accounts@yourcompany.co.zw. Since 1 February 2024 Gmail has also required every sender to use SPF or DKIM, and senders of more than 5,000 messages a day to use SPF, DKIM and DMARC.<\/p>\n<h2>What do SPF, DKIM and DMARC do?<\/h2>\n<table>\n<thead>\n<tr>\n<th>Record<\/th>\n<th>What it checks<\/th>\n<th>Where it lives in DNS<\/th>\n<th>Starts with<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>SPF (Sender Policy Framework)<\/td>\n<td>Whether the sending server is authorised to send for your domain<\/td>\n<td>TXT on the domain itself (often entered as @)<\/td>\n<td>v=spf1<\/td>\n<\/tr>\n<tr>\n<td>DKIM (DomainKeys Identified Mail)<\/td>\n<td>Whether the message carries a valid signature from your domain and was not altered after signing<\/td>\n<td>TXT (or sometimes CNAME) at selector._domainkey.yourdomain<\/td>\n<td>v=DKIM1<\/td>\n<\/tr>\n<tr>\n<td>DMARC<\/td>\n<td>Whether SPF or DKIM passes and matches the domain in the visible From address, and what to do if not<\/td>\n<td>TXT at _dmarc.yourdomain<\/td>\n<td>v=DMARC1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>These records are not a complete email security solution. They do not stop lookalike domains, and they cannot protect you if a real mailbox is compromised, so use strong passwords and two-factor login as well.<\/p>\n<h2>What you need before you start<\/h2>\n<ul>\n<li><strong>Access to your DNS.<\/strong> This may be at your domain registrar, your hosting provider or an external DNS service such as Cloudflare.<\/li>\n<li><strong>Your email provider&#8217;s values.<\/strong> The provider should give you the exact SPF include and DKIM key for its service.<\/li>\n<li><strong>A list of everything that sends mail as your domain.<\/strong> Staff mailboxes, website contact forms, an accounting or invoicing system, a CRM, a helpdesk, an email marketing service and automated website notifications. Missing one is the most common cause of genuine mail failing.<\/li>\n<li><strong>A copy of your current DNS records,<\/strong> with the date, so you can roll back if something goes wrong.<\/li>\n<\/ul>\n<h2>Step 1: Find where your DNS is managed<\/h2>\n<p>Your registrar and your DNS host are not always the same company. If your domain uses Cloudflare&#8217;s nameservers, for example, records must be added in Cloudflare, not in an inactive zone at the registrar. Check the authoritative nameservers with a DNS lookup tool or the command dig NS yourdomain.co.zw. Do not change nameservers just to add these records: that affects your website, email and every other DNS record at once. The Help Centre explains how to <a href=\"https:\/\/tremhost.com\/help\/edit-dns-records\">edit DNS records<\/a>.<\/p>\n<h2>Step 2: Publish one SPF record<\/h2>\n<p>Add a TXT record on the root of your domain. It starts with v=spf1, lists the authorised senders, and ends with an all mechanism. An illustrative template (not a working record) looks like this:<\/p>\n<p><strong>v=spf1 include:mail.your-provider.example include:your-newsletter-service.example ~all<\/strong><\/p>\n<ul>\n<li><strong>Only one SPF record per hostname.<\/strong> If one already exists, edit it. Two v=spf1 records cause a permanent error and SPF fails.<\/li>\n<li><strong>Stay within 10 DNS lookups.<\/strong> Each include, a, mx, exists and redirect counts, including lookups nested inside includes. Too many cause a permerror.<\/li>\n<li><strong>~all or -all.<\/strong> ~all (softfail) marks unlisted senders as suspicious; -all (fail) asks receivers to reject them. Start with ~all until you are sure every sender is listed, and let DMARC do the enforcement.<\/li>\n<li><strong>Do not copy another company&#8217;s record.<\/strong> Providers use different sending infrastructure.<\/li>\n<\/ul>\n<p>If your mail is hosted in cPanel, the Email Deliverability tool shows the SPF and DKIM values cPanel expects for your domain.<\/p>\n<h2>Step 3: Turn on DKIM signing<\/h2>\n<p>DKIM uses a key pair. Your email provider keeps the private key and signs outgoing mail; you publish the public key in DNS so receivers can check the signature.<\/p>\n<ol>\n<li>In your email provider&#8217;s admin panel, generate or view the DKIM key. Use a 2048-bit key where the provider offers it.<\/li>\n<li>Note the selector name, for example default or s1. The record goes at selector._domainkey.yourdomain.<\/li>\n<li>Publish the value exactly as given. It begins v=DKIM1; k=rsa; p= followed by a long key. Some DNS panels split long values into quoted strings; that is normal.<\/li>\n<li>Enable signing in the provider&#8217;s panel if it is not automatic.<\/li>\n<li>Repeat for each third-party sender, such as a newsletter service, that offers DKIM for your domain. Each uses its own selector, so several DKIM records can exist side by side.<\/li>\n<\/ol>\n<p>DKIM matters more than SPF when mail is forwarded: forwarding usually breaks SPF because the forwarding server is not in your record, but an intact DKIM signature still passes.<\/p>\n<h2>Step 4: Publish DMARC in monitoring mode<\/h2>\n<p>Add a TXT record at _dmarc.yourdomain with a policy of none and an address for aggregate reports:<\/p>\n<p><strong>v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.co.zw<\/strong><\/p>\n<p>DMARC passes when SPF or DKIM passes and the passing domain matches the domain in the From address (alignment). With p=none, nothing is blocked; you simply receive daily aggregate reports from large mailbox providers showing which servers send as your domain and whether they pass. Use a dedicated mailbox or a DMARC report reader, because the reports are XML files. The ruf tag requests individual failure reports, but few providers send them, so do not rely on it.<\/p>\n<h2>Step 5: Tighten the policy safely<\/h2>\n<ol>\n<li><strong>Monitor for two to four weeks<\/strong> at p=none. Fix any legitimate sender that fails by adding it to SPF or enabling its DKIM.<\/li>\n<li><strong>Move to quarantine.<\/strong> p=quarantine asks receivers to treat failing mail as suspicious, usually by sending it to spam. You can phase it in with pct, for example pct=25, then raise it.<\/li>\n<li><strong>Move to reject<\/strong> once reports show only unauthorised sources failing. p=reject asks receivers to refuse mail that fails DMARC.<\/li>\n<li><strong>Cover subdomains.<\/strong> The sp tag sets a policy for subdomains; by default they inherit the main policy.<\/li>\n<\/ol>\n<h2>How to test your records<\/h2>\n<ul>\n<li>Look the records up with an online DNS checker or dig TXT yourdomain.co.zw and dig TXT _dmarc.yourdomain.co.zw.<\/li>\n<li>Send a message to a Gmail address, open it, choose Show original, and check that SPF, DKIM and DMARC each show PASS.<\/li>\n<li>Send from every system on your list, not just staff mailboxes: contact forms and invoicing systems are where failures usually hide.<\/li>\n<li>Allow for propagation. Changes normally appear within the record&#8217;s TTL; see <a href=\"https:\/\/tremhost.com\/help\/dns-propagation-time\">how long DNS propagation takes<\/a>.<\/li>\n<\/ul>\n<h2>Common mistakes<\/h2>\n<ul>\n<li>Two SPF records on the same domain.<\/li>\n<li>Exceeding the 10-lookup limit after adding several services.<\/li>\n<li>Pasting a DKIM key with missing characters or extra spaces.<\/li>\n<li>Jumping straight to p=reject and blocking a forgotten invoicing or website mailer.<\/li>\n<li>Adding records at the registrar when the domain&#8217;s DNS is actually hosted elsewhere.<\/li>\n<\/ul>\n<p>If mail still lands in junk after authentication passes, the cause is usually content, sending volume or domain reputation; the Help Centre has a guide to <a href=\"https:\/\/tremhost.com\/help\/emails-going-to-spam\">emails going to spam<\/a>.<\/p>\n<h2>Frequently asked questions<\/h2>\n<h3>Do I need all three records?<\/h3>\n<p>Yes, for a business domain. SPF and DKIM provide the checks; DMARC ties them to your visible From address and tells receivers what to do when they fail.<\/p>\n<h3>Will DMARC stop all phishing that uses my company name?<\/h3>\n<p>No. It stops exact use of your domain by unauthorised servers once enforced, but not lookalike domains or mail from a compromised real account.<\/p>\n<h3>Can a domain that never sends email be protected?<\/h3>\n<p>Yes. Publish v=spf1 -all and a DMARC record with p=reject, so nobody can send convincingly as that domain.<\/p>\n<h3>Does Tremhost set these records up for me?<\/h3>\n<p>On Tremhost business email plans, SPF, DKIM and DMARC are set up for you. If you also send from other services, add them to the same SPF record and enable their DKIM.<\/p>\n<h2>Next step<\/h2>\n<p>List every system that sends mail as your domain, then publish SPF, DKIM and a monitoring DMARC record today. If you would rather have it configured for you, Tremhost <a href=\"https:\/\/tremhost.com\/emailhosting\">business email<\/a> plans start at $5 a month for 50 mailboxes, with SPF, DKIM and DMARC included. Support is available Monday to Friday, 08:00 to 17:00 CAT, by ticket or WhatsApp.<\/p>\n<aside class=\"th-bridge\" aria-label=\"Want us to handle it?\">\n<p class=\"th-bridge__t\">Want us to handle it?<\/p>\n<p class=\"th-bridge__d\">Inbox Assurance: we find everything that sends email as your domain, move it to DMARC enforcement step by step, check blocklists weekly and review your DMARC reports every month. $47 a month per domain.<\/p>\n<p><a class=\"btn\" href=\"https:\/\/tremhost.com\/inbox-assurance\" data-place=\"blog-product\" data-plan=\"inbox-assurance-how-to-set-up-spf-dkim-and-dmarc-for-you\">See Inbox Assurance<\/a><\/aside>\n","protected":false},"excerpt":{"rendered":"<p>SPF, DKIM and DMARC let receiving mail servers check that email using your domain really comes from you. This guide shows how to publish each record, roll out DMARC safely and test the result.<\/p>\n","protected":false},"author":226,"featured_media":78104,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[49],"tags":[],"class_list":["post-78103","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips"],"_links":{"self":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/78103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/users\/226"}],"replies":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/comments?post=78103"}],"version-history":[{"count":3,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/78103\/revisions"}],"predecessor-version":[{"id":81331,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/posts\/78103\/revisions\/81331"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/media\/78104"}],"wp:attachment":[{"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/media?parent=78103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/categories?post=78103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tremhost.com\/blog\/wp-json\/wp\/v2\/tags?post=78103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}