The Ultimate Email DNS Setup Guide

Learn the exact order of operations for configuring a new email domain.

Welcome to the definitive Email DNS Setup Guide. Whether you are setting up a brand new domain or migrating to a new email provider, you must configure your DNS (Domain Name System) records in a specific order to ensure you can receive mail and send without hitting the spam folder.

1
Access Your DNS Zone
You will need access to the platform where you purchased your domain or where your nameservers point (e.g., Cloudflare, GoDaddy, Namecheap, Route53). Navigate to the "DNS Management" or "Zone Editor" section.
2
The Four Pillars
A complete email setup consists of four record types:
  • MX: Tells the internet where to deliver your incoming mail.
  • SPF: Authorizes your provider's IPs to send mail.
  • DKIM: Adds a cryptographic signature to outbound mail.
  • DMARC: Protects your domain from spoofing and phishing.

Step 1: Receiving Mail (MX Records)

Configure your Mail Exchange records to start receiving emails.

Important: Delete any old or default MX records in your DNS before adding your new provider's records to prevent email routing conflicts.
1
Add Your Provider's MX Records
Your email host will give you specific MX records. They always have a Priority (a number) and a Target (a server hostname). For example, if you use Google Workspace, you add:
Type: MX | Name/Host: @ | Priority: 1 | Target: smtp.google.com
2
Wait for Propagation
Once added, it can take anywhere from a few minutes to a few hours for the internet to recognize your new routing rules. Send a test email from a personal Gmail account to your new custom domain to verify it arrives.

Step 2: Authentication (SPF & DKIM)

Authorize your sender to bypass spam filters.

1
Publish SPF (Sender Policy Framework)
SPF is a TXT record that lists authorized sending IPs. You must only have one SPF record. Create a new TXT record at the root (@) with your provider's include statement.
Type: TXT | Name/Host: @
Value: v=spf1 include:_spf.google.com ~all
2
Generate and Publish DKIM
Go to your email provider's admin panel and "Generate DKIM". They will give you a Selector and a long public key. Add this as a new TXT (or CNAME) record.
Type: TXT | Name: google._domainkey
Value: v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0B...

Step 3: Enforcement (DMARC)

Lock down your domain from spoofers and complete the setup.

Crucial: Only perform this step after your SPF and DKIM records are active. DMARC relies completely on them.
1
Start with Monitoring Mode
Create a TXT record for _dmarc. Always start with a policy of p=none so you can monitor reports without accidentally blocking legitimate emails.
Type: TXT | Name/Host: _dmarc
Value: v=DMARC1; p=none; rua=mailto:admin@yourdomain.com;
2
Upgrade to Reject
After a few weeks of verifying that your emails are passing authentication, change the policy to p=reject to permanently block scammers from forging your domain.

Comprehensive Setup Validator

Check if you followed the Email DNS Setup Guide correctly. We will query all 4 protocols instantly.

|
MX Routing --
Waiting for scan...
SPF Auth --
Waiting for scan...
DKIM Signature --
Waiting for scan...
DMARC Policy --
Waiting for scan...

Next Steps

Comprehensive Email DNS Setup Guide

Stop searching forums. Follow our definitive Email DNS Setup Guide to correctly configure routing and authentication for any modern email provider.

Master MX Routing

The first step in our Email DNS Setup Guide teaches you how to map Mail Exchange records correctly to ensure you never drop an incoming message.

SPF & DKIM Authentication

A proper Email DNS Setup Guide must cover sender authorization. We explain exactly how to craft TXT records to bypass spam filters securely.

DMARC Enforcement Policies

Conclude your Email DNS Setup Guide journey by locking down your domain. Learn to transition from monitoring to strict p=reject to prevent spoofing.

Live Setup Validation

Reading an Email DNS Setup Guide is only half the battle. Use our integrated DoH validator to instantly verify that your configuration is error-free.

Google & Microsoft Ready

The principles taught in this Email DNS Setup Guide apply universally to Google Workspace, Microsoft 365, Zoho, and dedicated VPS hosting.