Cloudflare Email Routing Not Delivering: DNS Fixes
In this article
If Cloudflare Email Routing is not delivering mail, the cause is almost always a DNS misconfiguration—specifically, missing or conflicting MX, SPF, and DKIM records, or a conflict with proxy (orange cloud) settings. This article explains how to fix these issues step by step, and how to avoid them in the first place.
How Cloudflare Email Routing Works
Cloudflare Email Routing is a free service that lets you receive mail at your custom domain and forward it to an existing inbox (like Gmail or Outlook). Instead of hosting a mail server, you configure your domain's DNS records so that mail sent to your domain is handled by Cloudflare's servers, which then forward it to your destination address.
To set it up, Cloudflare automatically adds three types of DNS records to your zone:
- MX records – point to Cloudflare's mail servers (e.g.,
route1.mx.cloudflare.net). - TXT records for SPF – declare that Cloudflare is allowed to send mail for your domain.
- TXT records for DKIM – provide cryptographic signatures for outgoing mail.
If any of these records are missing, incorrect, or overridden by other records, mail delivery can fail silently or bounce.
Common Causes of Non-Delivery
When mail isn't arriving, the first thing to check is the DNS configuration in your Cloudflare dashboard. Here are the most frequent culprits:
- Missing MX records – If the MX records were not automatically added (or were deleted), mail has nowhere to go.
- Conflicting MX records – If you have other MX records (e.g., from a previous mail provider), Cloudflare's routing may be skipped.
- SPF misconfiguration – An SPF record that doesn't include Cloudflare's servers can cause receiving servers to reject mail as spam.
- DKIM missing or invalid – Without DKIM, mail may be flagged or dropped.
- Proxy (orange cloud) on MX records – MX records must be DNS-only (grey cloud). Proxying mail records breaks delivery because Cloudflare's proxy does not handle SMTP traffic.
Step-by-Step Fix for DNS and Proxy Errors
- Log in to Cloudflare and select your domain.
- Go to Email > Email Routing. If the service is not enabled, click Enable Email Routing.
- Click Edit DNS records (or go to DNS > Records).
- Ensure the following records exist and are exactly as shown (replace
yourdomain.comwith your actual domain):- MX:
route1.mx.cloudflare.net(priority 10),route2.mx.cloudflare.net(priority 20),route3.mx.cloudflare.net(priority 30). All must be DNS Only (grey cloud). - TXT (SPF):
v=spf1 include:_spf.mx.cloudflare.net ~all - TXT (DKIM): Cloudflare generates two records like
google._domainkeyandgoogle2._domainkey– copy them exactly from the Email Routing page.
- MX:
- If any MX record has an orange cloud icon, click it to switch to grey cloud (DNS only).
- If you have any other MX records (e.g., from a previous provider), remove them unless you intentionally use multiple mail servers.
- Wait for DNS propagation (can take up to a few hours, but often minutes).
- Send a test email to your custom address and check the destination inbox (and spam folder).
Why Proxy (Orange Cloud) Breaks Email
Cloudflare's proxy (orange cloud) is designed for HTTP/HTTPS traffic (web). Email uses SMTP, which is a different protocol that the proxy does not support. When you set an MX record to proxied, mail servers trying to deliver to your domain will connect to Cloudflare's proxy IP, which does not listen on port 25 for SMTP. The connection fails, and the sending server will retry for a while, then bounce the message. Always keep MX records as DNS Only (grey cloud).
How to Verify Your DNS Configuration
After making changes, you can verify that your DNS records are correct using external tools like dig or online MX lookup tools. For example, running dig MX yourdomain.com should return the three Cloudflare MX records. You can also use Cloudflare's own Email Routing page – it shows a green checkmark if everything is configured correctly.
If the checkmark is missing, click the Edit DNS records button to see exactly what's missing or wrong. The page will list the required records and highlight any discrepancies.
Frequently Asked Questions
Why is my email going to spam?
If your SPF or DKIM records are missing or incorrect, receiving servers may treat your mail as suspicious. Double-check that the SPF record includes include:_spf.mx.cloudflare.net and that the DKIM records match exactly what Cloudflare provides. Also, make sure your destination inbox isn't filtering the forwarded mail – add the sender to your contacts if needed.
Can I use Cloudflare Email Routing with a custom domain that has existing MX records?
Yes, but you must remove any existing MX records that point to other mail servers. Cloudflare Email Routing requires that your domain's MX records point exclusively to Cloudflare's servers. If you need to keep another mail service, you cannot use Cloudflare Email Routing for the same domain.
How long does DNS propagation take after changing records?
DNS changes typically propagate within a few minutes to a few hours, but in some cases it can take up to 48 hours. Cloudflare's DNS updates are usually fast, but your domain's TTL (time-to-live) settings affect how quickly other servers pick up the changes. You can check the status in the Email Routing dashboard.
What if I still don't receive mail after fixing DNS?
Check the destination address in Cloudflare Email Routing – make sure it's correct and verified. Also, check your spam folder in the destination inbox. If mail is still not arriving, try sending from a different provider (e.g., Gmail to your custom address) and check the Cloudflare Email Routing logs (if available). If the issue persists, contact Cloudflare support.
Can I use Cloudflare Email Routing with a subdomain?
Yes, you can enable Email Routing for a subdomain (e.g., mail.yourdomain.com). The setup is the same – you'll need to add the MX and TXT records to the subdomain's DNS zone. Note that the subdomain must be a separate zone in Cloudflare.
Does Cloudflare Email Routing support sending mail?
No, Cloudflare Email Routing is only for receiving and forwarding mail. It does not allow you to send mail from your custom domain. For sending, you need a separate email service (like Gmail's “Send mail as” feature) or a full email hosting provider.