DNS Setup to Prevent Emails Going to Spam
Gabriel Moraes · · 9 min read
Quick answer: The proper DNS setup to prevent emails going to spam requires configuring four essential DNS records with your domain provider: MX (to direct incoming messages), SPF (to authorize which servers can send on your behalf), DKIM (a cryptographic key verifying message integrity), and DMARC (the policy guiding providers on how to handle unauthenticated messages). Without this combination, major providers will doubt your company's legitimacy.
When a client or supplier says the classic phrase "I didn't receive your proposal, check if it went to spam," the content of your message or an attached PDF is almost never to blame. In the vast majority of small business cases, the problem lies in the domain's DNS zone, where basic technical validation records are missing.
For anyone running a company, dealing with acronyms like MX, SPF, DKIM, and DMARC sounds intimidating. However, the logic behind these rules is simple, and they protect both the sender and the recipient.
Why does DNS determine whether your message reaches the inbox?
The internet was designed without native identity layers for exchanging electronic messages. Historically, any server could send a message claiming to be management@suaempresa.com, even without any authorization. To combat fraud, identity theft, and financial scams, email providers created verification mechanisms anchored in the domain name system (DNS).
When you send a business email, the recipient's server (such as Google Workspace or Outlook) does not simply read the content of the message. Before showing the text to the user, it queries your domain's public DNS records to verify whether the server that transmitted that data packet has explicit permission to do so.
If records are missing, incorrect, or conflicting, the receiving server treats the message with immediate suspicion. As a preventive security measure, the email is promptly downgraded to the spam folder or rejected outright at the connection stage. Therefore, getting the DNS setup right is not a technical indulgence for network admins—it is an indispensable operational requirement for closing deals and assisting customers every day.
What are the 4 essential DNS records for email?
For your message delivery to run smoothly, you must understand the role of each of the four components of deliverability. They work together as a chain of custody for your digital identity.
| Record | Entry type | Main role in email | What happens if missing or wrong |
|---|---|---|---|
| MX | MX | Points where to send incoming emails for the domain | Your business cannot receive any messages |
| SPF | TXT | Lists the servers authorized to send emails for the domain | Sent messages easily land in spam or get blocked |
| DKIM | CNAME or TXT | Digitally signs each message with a cryptographic key | The recipient cannot verify integrity and doubts sender authenticity |
| DMARC | TXT | Sets rules when SPF or DKIM fail and produces reports | Modern providers penalize domain reputation and filter messages |
1. MX Record (Mail Exchange)
The MX record serves as the physical street address of your company on the internet. It tells the world: "whenever someone sends a message to any @suaempresa.com account, deliver the packets to server X." Without it, no one can send emails to you. If you want to dive deeper into configuring this specific entry, read our guide on how to set up DNS for business email.
2. SPF Record (Sender Policy Framework)
SPF is a TXT entry added to the root of your domain. According to technical standard RFC 7208, SPF allows a domain owner to publish explicitly which IP addresses or server hostnames are authorized to send messages on their behalf.
When your team sends an email, the receiving server checks your company's SPF record. If the email originated from a listed server, the check passes. A very common mistake among small businesses is having two SPF records in the same DNS zone; the technical standard strictly forbids multiple SPF TXT entries, which invalidates the check and sends your emails straight to junk.
3. DKIM Record (DomainKeys Identified Mail)
While SPF authorizes servers, DKIM validates the authenticity of the content. As detailed in RFC 6376, DKIM uses an asymmetric key pair: a private key held exclusively by your email server and a public key published in your domain's DNS via a TXT or CNAME record.
With every outgoing message, the server attaches an invisible cryptographic signature to the header. Upon receiving the email, the recipient uses the public key in your DNS to decode the signature. This mathematically proves that the sender is the legitimate owner of the domain and that no part of the email was altered in transit.
4. DMARC Record (Domain-based Message Authentication)
DMARC ties the previous two protocols together. Standardized by RFC 7489, DMARC requires SPF and DKIM alignment with the domain displayed in the visible "From:" header. Furthermore, it provides clear instructions to receiving providers if a message fails validation tests: you can instruct them to monitor it (p=none), quarantine it (p=quarantine), or reject it entirely (p=reject).
Since early 2024, mandatory guidelines published by Google for senders and Yahoo's requirements made SPF, DKIM, and DMARC mandatory for any serious corporate sender. Without these records, landing in the inbox at Gmail and Yahoo becomes nearly impossible.
The case of Registro.br: why do you need to switch DNS to Cloudflare?
In Brazil, a large share of small businesses register .com.br domains directly with Registro.br. Registro.br provides an excellent and secure service for managing domain ownership, but its free DNS panel has a critical technical limitation.
According to Registro.br technical characteristics documentation, their free authoritative DNS server does not allow the underscore character (_) in record names. This creates an insurmountable barrier for modern deliverability, as the DKIM protocol requires names like domailo._domainkey.seudominio.com.br and DMARC requires the mandatory prefix _dmarc.seudominio.com.br.
The standard, widely adopted industry solution is simple and free: keep your domain registration with Registro.br, but delegate your DNS zone to a modern provider like Cloudflare (on its free plan). You create a free Cloudflare account, copy the two provided DNS servers (nameservers), and insert them into the Registro.br panel. From then on, all MX, TXT, and CNAME record management takes place in Cloudflare, with full underscore support, near-instant propagation, and total stability.
How to do the DNS setup to prevent emails going to spam in Domailo?
Setting up corporate email on major enterprise platforms is often a frustrating process, filled with complex security consoles designed for multinational corporations with dedicated IT teams. At Domailo, the entire experience was designed from scratch for small businesses needing speed, reliability, and simplicity.
Domailo delivers professional email using your company's custom domain directly in a modern webmail client in your browser, featuring light and dark modes, fast search, and practical mailbox organization. Instead of charging per-user monthly fees—a model that unnecessarily drives up operational costs—Domailo charges per organization, allowing you to share mailboxes among team members and connect multiple domains depending on your plan.
To get your email running smoothly without any spam issues, the process in Domailo involves four straightforward steps:
- Connect your custom domain: In your Domailo organization administration panel, enter the domain you already own (for example,
suaempresa.com). - Verify ownership: Domailo displays the exact DNS records you must create in your DNS zone (such as Cloudflare, if your domain came from your domain registrar). An initial TXT record confirms that the domain actually belongs to your organization.
- Create delivery and authentication records: Add the MX record pointing to Domailo's infrastructure, along with the TXT/CNAME records for SPF and DKIM provided in your panel. The dashboard clearly indicates the values you need to copy and paste.
- Enable the DMARC policy: Next, simply create the
_dmarcDNS entry with the recommended policy to ensure nobody can spoof your brand. If you have questions about the syntax, read our guide on what DMARC is and how to configure it.
As soon as the records propagate, the Domailo panel confirms validation. From that moment on, messages sent by your team members pass smoothly through the destination servers' validation filters. To follow other delivery best practices, read our guide on how to improve business email deliverability.
Which DNS mistakes cause business emails to land in spam?
Even companies that attempt to configure their DNS independently often make subtle mistakes that ruin deliverability. Keep an eye out for these four common pitfalls:
- Multiple SPF records in the same zone: SPF must be unique. If you use Domailo for business email and a third-party service for invoicing or automation, you must not create two TXT records starting with
v=spf1. The correct approach is to merge all authorizations into a single record (using theinclude:mechanism). - Missing closing qualifier in SPF: Ending an SPF string without
~all(softfail) or-all(fail) leaves your policy undefined, creating distrust among anti-spam filters. - Typos in the DKIM record name: The DKIM selector name must be exact. An extra or missing period or character will prevent the recipient server from finding your public key, causing signature verification to fail.
- Missing primary MX record: Setting up SPF and DKIM without configuring MX causes receiving servers to view your domain as suspicious, since it sends emails while being incapable of receiving replies.
If your business requires protocols like IMAP/POP synchronization with legacy desktop software or a cloud office and spreadsheet suite, tools like Google Workspace or Microsoft 365 may be the right fit, despite recurring per-user fees. But for small businesses looking for a clean browser inbox, a custom domain, high deliverability, and effortless team management, Domailo is the ideal choice.
Conclusion: secure your business email deliverability
Ensuring that your business email reliably reaches the inbox is neither luck nor guesswork. It is a straightforward matter of technical integrity: making sure your MX, SPF, DKIM, and DMARC records are properly set up in your domain's DNS.
With Domailo, managing domains, mailboxes, and team access is streamlined. You get transparent pricing per organization: the Startup plan at US$ 5/month (2 users, 2 mailboxes, and 1 domain), the Essential plan at US$ 9/month (5 users, 5 mailboxes, and 3 domains), and the Team plan at US$ 19/month (20 users, 20 mailboxes, and 10 domains)—all with an annual discount (pay for 10 months and get 12 months of access).
All paid plans include a 30-day trial. Connect the domain you already own, validate your DNS records without headaches, and experience the simplicity firsthand. Create your account and try Domailo for 30 days to set your business communication on the right track.
Frequently asked questions
What should I do if my company's email keeps going to spam?
The first step is to verify your domain's DNS records using online diagnostic tools. Make sure you do not have two SPF records configured at the same time, confirm that DKIM is active with the correct selector, and verify that a DMARC record exists. You should also check that your domain is not listed on public blocklists.
Why does Registro.br require external DNS for email to work properly?
Registro.br's free basic DNS panel does not support the underscore character (_) in record names. Because DKIM keys and DMARC policies require this character under international standards, you must delegate DNS management to free providers such as Cloudflare, while keeping your annual domain registration at Registro.br.
Can I have more than one SPF record on the same domain?
No. Having more than one SPF TXT record on the same domain violates RFC 7208 and causes receiving mail servers to fail the check, sending your messages to spam. When you use multiple email delivery services, all authorized servers must be combined into a single SPF record.
Does Domailo configure my domain's DNS automatically?
Domailo does not alter your DNS records autonomously because it does not have access to your domain registrar account, ensuring full security for you. However, the Domailo dashboard provides exact instructions with the names and values you need to copy and paste into your DNS panel, validating records as soon as they propagate.