Cloudflare Email on Sub Domains

I would like to use cloudflare email on a subdomain for one of my websites. The problem is the root domain is already signed up with a email service provider and i dont want to change that because my business uses that for correspondence with my clients. Rather, i want to have a subdomain and have mail route to that in instances where i dont want my (or my teams email address) exposed. It seems cloudflare email routing for sub domains only work if the main (root) domain is also onboarded, which, as I explained before, is not possible.

Please let me know how this can be done.

I may have figured out a work-around for anyone interested. I tested this config for several hours and it still works.

I hope this doesn’t violate any CF ToS

(1) First enable CF Routing for email on your primary / root domain

  • Select “Email” under your respective domain
  • Select “Email Routing”
  • Skip the Wizard if its your first time
  • Then go to “Settings”
  • Under “Domain”, click the 3 dots at the end of the record
  • Choose “Fix Records”
  • You will see a preview of the records that will get added.
  • Select “Add records and enable”
  • You will come back to the “Settings” page and you should see “Enabled” under “Routing Status” and “Configured” under “Email DNS records” under “Domain”. If all is in order, proceed to the next step else if you don’t see this immediately, give it a little bit of time and check back later.

(2) Create a subdomain and enable CF routing on it

  • Under “Subdomains”, click “Add Subdomain”
  • type your intended subdomain
  • Give it a moment after you type, you will see a preview of the records that will get added.
  • Click “Add records and enable”
  • You will come back to the “Settings” page and you should see “Enabled” under “Routing Status” and “Configured” under “Email DNS records” under “Subdomain”. If all is in order, proceed to the next step else if you don’t see this immediately, give it a little bit of time and check back later.

(3) Unlock MS Records (Not disable) for Root Domain

  • In the same “Settings” page, click the 3 dots at the end of the record under “Domain” and choose the only option called “Disabling” or something like that
  • In the next screen called “Disable Email Routing” choose the second option “Unlock and keep DNS records”
  • Then press “Unlock records and continue”
  • You will return back to the “Settings” page once again
  • Observe the column titled “MX records” shows “Unlocked”

(4) Delete mail related records from DNS for root domain

  • Now Click “DNS” option from the left side panel (to change DNS entries)
  • Delete all 4 entries carefully as mentioned in Step 1, one-by-one. MAKE SURE YOU ARE DELETING THE RIGHT RECORDS, ELSE YOU WILL BREAK SERVICES ON YOUR SITE.

(5) Checking a few things…

  • Looking at your left side panel, go back to “Email” → “Email Routing” → “Settings”
  • You will notice an alert stating “There might be some conflict or missing records. Configure the records to make sure Email Routing works properly.” (as at the time of this article), which you can ignore.
  • Under “Domain” you will see “Disabled” (coloured in red) under “Routing status” column and “Misconfigured” (coloured in red) under “Email DNS records” column. This is fine and normal and can be ignored
  • Under “Subdomain” you will see “Enabled” (coloured in green) under “Routing status” column and “Configured” (coloured in green) under “Email DNS records” column. This is good.

Notes

  • All other aspects like “Routing rules”, “Destination addresses” will remain and function as normal - so make sure you configure them.
  • I tried this on a freshly created domain and it worked. I haven’t added the email provider for the root domain just yet but that shouldn’t be a problem since we deleted the DNS records for the root domain, there shouldn’t be any conflicting records or issues. But I must mention that I haven’t tested this as of this post.
  • At the time of this post, there were 3 MX records and 1 SPF (TXT) record with regards to DNS entries for CF Email Routing

I will post an update here if anything changes / has an issue.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.