Cleanbox
Features Blog Pricing Developers Tools
Sign in Start free trial

How to Set Up Email DNS Records at Cloudflare, GoDaddy, and Namecheap

How to Set Up Email DNS Records at Cloudflare, GoDaddy, and Namecheap

Every custom domain email setup starts with DNS records. MX records tell the internet where to deliver your email. SPF, DKIM, and DMARC records prove your emails are legitimate and protect your domain from spoofing.

The problem: every DNS provider has a different interface, different terminology, and different quirks. What takes 30 seconds at Cloudflare takes 5 minutes at GoDaddy because the UI buries the settings. This guide gives you the exact steps for the three most popular DNS providers.

If you need background on what these records do before setting them up, see DNS for Email: Everything You Need to Know and SPF, DKIM, and DMARC Explained.

What you need to add

Regardless of your DNS provider, every email setup requires these records:

Record typePurposeExample value
MXWhere to deliver emailDepends on your email provider
TXT (SPF)Who is allowed to send as your domainv=spf1 include:provider.com -all
TXT (DKIM)Cryptographic signature verificationProvided by your email service
TXT (DMARC)What to do when authentication failsv=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com

Your email provider (Cleanbox, Google Workspace, Microsoft 365, etc.) will give you the specific values. This guide shows you where to enter them.

Cloudflare

Adding MX records

  1. Log in to the Cloudflare dashboard and select your domain.
  2. Click DNS in the left sidebar, then Records.
  3. Click Add record.
  4. Set Type to MX.
  5. Set Name to @ (this means your root domain).
  6. Set Mail server to the value your email provider gave you.
  7. Set Priority to the number your provider specified (usually 10).
  8. Click Save.

If your provider gave you multiple MX records (primary and backup), add each one separately with the correct priority.

Adding SPF

  1. Click Add record.
  2. Set Type to TXT.
  3. Set Name to @.
  4. Paste your SPF record in the Content field (e.g., v=spf1 include:spf.cleanbox.app -all).
  5. Click Save.

Important: You can only have one SPF record per domain. If you already have one, merge the include: statements. For example: v=spf1 include:_spf.google.com include:spf.cleanbox.app -all.

Adding DKIM

  1. Click Add record.
  2. Set Type to TXT (or CNAME if your provider uses CNAME-based DKIM).
  3. Set Name to the selector your provider specified (e.g., cleanbox._domainkey).
  4. Paste the DKIM value in the Content field.
  5. Click Save.

Cloudflare quirk: If you use Cloudflare’s proxy (orange cloud), make sure the DKIM record is set to DNS only (gray cloud). MX and TXT records cannot be proxied.

Adding DMARC

  1. Click Add record.
  2. Set Type to TXT.
  3. Set Name to _dmarc.
  4. Set Content to your DMARC policy (e.g., v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com).
  5. Click Save.

Cloudflare Email Routing conflict

Cloudflare has a built-in email routing feature that creates its own MX records. If you are using a different email provider (like Cleanbox), you need to disable Cloudflare Email Routing first, or it will conflict with your MX records. Go to Email in the sidebar and disable routing before adding your own MX records.

GoDaddy

Accessing DNS settings

  1. Log in to your GoDaddy account.
  2. Go to My Products and find your domain.
  3. Click DNS (or Manage DNS) next to the domain.

Adding MX records

  1. In the DNS Management page, scroll to the Records section.
  2. Click Add.
  3. Set Type to MX.
  4. Set Host to @.
  5. Set Points to to your email provider’s mail server.
  6. Set Priority as specified by your provider.
  7. Set TTL to 1 Hour (or the default).
  8. Click Save.

GoDaddy quirk: GoDaddy often has default MX records pointing to their own email service. Delete these before adding your new MX records, or email will be split between two services.

Adding SPF

  1. Click Add.
  2. Set Type to TXT.
  3. Set Host to @.
  4. Set TXT Value to your SPF record.
  5. Click Save.

GoDaddy quirk: GoDaddy may have a default SPF record for their own email. If you see one, edit it to include your new provider instead of adding a second SPF record. Two SPF records on the same domain will cause authentication failures.

Adding DKIM

  1. Click Add.
  2. Set Type to TXT (or CNAME).
  3. Set Host to the DKIM selector (e.g., cleanbox._domainkey).
  4. Set TXT Value to the DKIM key provided by your email service.
  5. Click Save.

GoDaddy quirk: GoDaddy has a 1024-character limit on TXT record values. If your DKIM key is longer, you may need to split it into two strings. Most providers use 1024-bit keys that fit, but 2048-bit keys require splitting. Contact your email provider if you hit this limit.

Adding DMARC

  1. Click Add.
  2. Set Type to TXT.
  3. Set Host to _dmarc.
  4. Set TXT Value to your DMARC policy.
  5. Click Save.

Namecheap

Accessing DNS settings

  1. Log in to Namecheap and go to Domain List.
  2. Click Manage next to your domain.
  3. Click the Advanced DNS tab.

Adding MX records

  1. In the Mail Settings section, select Custom MX from the dropdown.
  2. Click Add New Record.
  3. Set Host to @.
  4. Set Value to your email provider’s mail server.
  5. Set Priority as specified.
  6. Click the checkmark to save.

Namecheap quirk: The Mail Settings dropdown defaults to “Namecheap Email” or “No Email Service.” You must switch it to Custom MX before you can add your own records. If you leave it on another setting, Namecheap may overwrite your MX records.

Adding SPF

  1. Scroll to Host Records.
  2. Click Add New Record.
  3. Set Type to TXT Record.
  4. Set Host to @.
  5. Set Value to your SPF record.
  6. Click the checkmark to save.

Adding DKIM

  1. Click Add New Record.
  2. Set Type to TXT Record (or CNAME Record).
  3. Set Host to the DKIM selector.
  4. Set Value to the DKIM key.
  5. Click the checkmark to save.

Adding DMARC

  1. Click Add New Record.
  2. Set Type to TXT Record.
  3. Set Host to _dmarc.
  4. Set Value to your DMARC policy.
  5. Click the checkmark to save.

Verifying your setup

After adding all records, wait 5-30 minutes for DNS propagation (Cloudflare is fastest, GoDaddy and Namecheap can take longer). Then verify:

  1. MX records: Send a test email to an address on your domain. If it arrives, MX is working.
  2. SPF: Send an email from your domain and check the headers at the destination. Look for spf=pass.
  3. DKIM: Check for dkim=pass in the same headers.
  4. DMARC: Check for dmarc=pass. DMARC reports will start arriving at the address you specified in the rua= tag within 24-48 hours.

For a deeper explanation of what these authentication checks do and why they matter, see Email Authentication Pass/Fail Scenarios.

Setting up DNS for Cleanbox

If you are using Cleanbox for your domain’s email, the DNS setup follows the same steps above with Cleanbox-specific values. Point your MX records to Cleanbox, add the SPF include, and configure DKIM with the selector and key from your Cleanbox dashboard.

The full step-by-step instructions for connecting your domain to Cleanbox, including the exact values to enter, are available in the DNS Configuration Guide in the helpdesk. If you run into issues after setup, see Troubleshooting Domain Verification.

Ready to take control of your inbox?

Start protecting your email with Cleanbox — free plan available, no credit card required.

Get started free