• Skip to primary navigation
  • Skip to footer navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

WP Fangirl

WordPress Consultant Sallie Goetsch

  • speakerdeck icon
  • Home
  • About
  • Why WordPress?
  • How I Work
  • Portfolio
  • Services
  • Blog
  • Contact

Updating Cloudflare DNS to Use SiteGround’s MX What happens when you need to change MX records on Cloudflare?

March 9, 2017 by Sallie Goetsch 9 Comments

Updated Cloudflare DNS settings for dorataya.com

I actually write most of my tutorials for myself, so that I’ll remember how I did a thing, and it’s just a coincidence that they are useful to other people. This is definitely one of those cases.

I use Cloudflare on all my own websites and on most client websites. (So, yeah, that was a lot of salts to change after Cloudbleed.) Their free plan offers a lot: SSL, caching, a firewall, email obfuscation, and even some nifty graphs of your traffic. It’s easy to set up and usually goes without a hitch.

Usually.

Automated MX detection at Cloudflare

If you’re setting up Cloudflare for the first time, it will detect all your current DNS settings, which it preserves when you switch to Cloudflare’s name servers, automatically detecting which of them should be DNS only (that is, Cloudflare just sends the traffic through) and which should have Cloudflare’s HTTP proxy, and therefore its caching, performance, and security, applied.

So as long as the MX (Mail eXchange) records for your email are already configured correctly, Cloudflare will identify them and your email will continue to work.

Most of my email runs through Google Apps, but my primary domain, rhymeswithsketch.com, actually uses SiteGround’s mail servers. When I set up the account, Cloudflare identified all of the MX records correctly, and there was no interruption to any of my email. (That’s almost a pity, given how much mail I get.)

SiteGround MX detected properly at Cloudflare

What if Cloudflare has the wrong MX records?

I host my mother’s website, dorataya.com, on my SiteGround account. When I set it up, her email ran through GoDaddy, her domain registrar, so I set up the MX records at SiteGround to point to GoDaddy. I later added Cloudflare to the site through SiteGround’s cPanel.

But then we ran into some problems. First, my account at SiteGround was upgraded from GrowBig to GoGeek on account of my resource usage. (That, in fact, was one of my motivations for setting up Cloudflare everywhere.) That meant my name servers changed. This was no problem for any of the domains I owned myself, since I just logged in to Namecheap and updated the servers…six times.

But dorataya.com was registered with GoDaddy, and the password I had for Mom’s GoDaddy account didn’t work. Attempts to get it reset didn’t work too well, either. (Why yes, that was before I started using LastPass and Dashlane.) So the site ended up offline.

Then the domain expired because the credit card on file had expired and we still didn’t have login information.

It took quite a number of months, but eventually dorataya.com became available, so I registered it.

Then I went through the process of resurrecting the website. And here’s where it got awkward.

I already had dorataya.com set up on my SiteGround account as an add-on domain. And I already had SiteGround’s version of Cloudflare turned on for it.

In order to re-scan the site, I had to delete dorataya.com from Cloudflare. That didn’t take too long, and setting it up went smoothly—until I realized that I had not updated the MX records for dorataya.com on SiteGround before activating Cloudflare.

Because the GoDaddy account for dorataya.com no longer existed, it was obviously impossible to use GoDaddy’s MX records. That meant I was going to need to use SiteGround’s MX.

Setting up the MX at SiteGround

This was the easy part, actually. There’s a button in their basic MX entry control panel that lets you revert to the default settings with one click. (And another one to let you use Google’s MX, which was very handy for me.) I clicked “Revert Default” and was good to go…at the SiteGround end.

MX records for dorataya.com at SiteGround

What I thought I had to do to change MX records on Cloudflare

The next step, of course, was to update the MX records at Cloudflare. Based on the example of my rhymeswithsketch.com account, I assumed the thing to do was to add the same MX records, with the same priorities, as I had at SiteGround.

Wrong.

I could not begin to explain to you why this doesn’t work, because I really don’t know that much about servers. (I’m sure my husband could tell me, but he’s busy packing for a trip.) Whatever the reason, it didn’t work. All the messages bounced.

I attempted to use my Google Fu and didn’t get very far. Cloudflare support has an article about how to add MX records in Cloudflare, but neither their instructions for setting up with an email service provider nor their instructions for setting up with your own email server worked. I got pretty tired of all the bounced test messages.

What I actually had to do to get my mail server to work

This morning I decided to try a little further Google Fu. I found the answer buried in a SiteGround article about MX that doesn’t make any reference to Cloudflare (since all their docs about Cloudflare assume you are activating it through their cPanel).

To point your mail service to us, you should change your MX record of your domain to point to your server’s hostname. For example, if your account is hosted on sitegroundXXX.com, then you should change your MX record to: sitegroundXXX.com.

That’s right: you point the MX record at your external DNS not to SiteGround’s mail servers, but to SiteGround’s web server. That sort of almost makes sense, but it was a long way from obvious.

I removed all of my previous non-functional MX records for dorataya.com from Cloudflare and added the server hostname as a single MX record with a priority of 1.

Updated Cloudflare DNS settings for dorataya.com

And behold, there was email. And it was good.

So if you ever need to change your MX records on a Cloudflare account that’s already been set up and the obvious solution doesn’t work, try adding your server hostname as the MX instead of adding your actual MX. Just make sure the priority number on Cloudflare is lower than the ones at your host.

Related Items

  • Manage domain aliases at Pagely (2012)
    Setting Up DNS and Email on Page.ly
  • screenshot of CloudFlare's Crypto page with SSL set to strict
    Adventures in SSL, CloudFlare, and WooCommerce
  • GTMetrix test results with PHP 7 and WP Rocket
    So how much faster IS PHP 7?

Share this post:

Share on Twitter Share on Facebook Share on Pinterest Share on LinkedIn Share on Email

Filed Under: Hosting and Servers Tagged With: CloudFlare

Reader Interactions

Comments

  1. Peter says

    February 20, 2018 at 7:36 am

    THANK YOU!!! :)

    Reply
  2. soale says

    June 8, 2018 at 8:59 am

    This helped. Thank you so much :)

    Reply
  3. Eric says

    August 13, 2018 at 11:25 pm

    Thank you! This was exactly what I needed! Your solution was explained well.

    Reply
  4. Sven says

    January 15, 2019 at 12:09 am

    Thanks , I was struggling so hard, after hours of searching i’m happy I found this post.
    I still have to test it though if my emails will come true.

    But thanks for writing this detailed guide.

    Reply
  5. Amy Dunn says

    August 2, 2020 at 8:43 am

    Thank you! I’ve been spending ages first trying to find the MX record of siteground (which I was told on one guideline), and after finding, copying the MX records of the three priorities onto the godadd’ys DNS MX info. It didn’t work, I was so frustrated.
    Then voila, your post saved my life. Thanks ever so much!!!!

    Reply
    • Sallie Goetsch says

      August 2, 2020 at 11:06 am

      DNS can be a real pain in the patootie–more so for client sites as clients may not know where their DNS is managed. Tools like DNS Lookup tell you where you need to go to manage the domain’s DNS records. (In general, the possible choices are at the domain registrar, at the hosting company, and on a third-party site like Cloudflare.)

      Reply
  6. Mike Boardley says

    December 5, 2020 at 3:30 pm

    I am confused. Where do I find the server’s hostname?
    Is it the name server? ns1.giowm1135.siteground.biz
    Thank you for your help.

    Reply
    • Sallie Goetsch says

      December 5, 2020 at 5:12 pm

      I wrote this a few years ago, and since that time, SiteGround has set up a new control panel, which means everything looks different. I can show you where it is for my account, but don’t know whether it will match on yours.
      SiteGround control panel server information

      Reply
  7. osman says

    February 13, 2021 at 11:09 am

    Thank you, this worked for me!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

What I Write About

  • Book Reviews
  • Content Strategy
  • Design
  • Hosting and Servers
  • Most Valuable Plugins
  • There's a Plugin for That
  • Using WordPress
  • Widgets
  • WordPress Consulting
  • WordPress Events

Series

  • Interviews (5)
  • Checking Up on Your Website (4)
  • Client from Hell (5)
  • WordCamps (17)
  • WP-Tonic Roundtable (30)
  • Modern Tribe Tutorials (13)

Follow Sallie on Twitter

    Sorry, no Tweets were found.

RSS Latest News from the East Bay WordPress Meetup

  • Does It Work? Using The New CSS Layout with Rachel Andrew
    Things change rapidly in the WordPress world. The content in this post is more than a year old and may no longer represent best practices.Description Over the past two years, […] The post Does It Work? Using The New CSS Layout with Rachel Andrew appeared first on East Bay WordPress Meetup.
  • Speaker Training
    Get the workbook and slides for the October 2019 speaker training, plus background and pro tips. The post Speaker Training appeared first on East Bay WordPress Meetup.
  • SEO Audit Template & Resources
    Our November speaker, John Locke, graciously provided a template for an SEO audit report. You can download it as a Microsoft Word or PDF document. The post SEO Audit Template & Resources appeared first on East Bay WordPress Meetup.

Footer

Contact Info

2063 Main St #133 · Oakley, CA 94561

+1 (510) 969-9947

author-izer

sallie [at] wpfangirl [dot] com

Location

Map of East Contra Costa County

I live in Oakley, CA and run a WordPress Meetup in Oakland, CA. Don't confuse them!

Subscribe for New Posts

  • Since I blog on an unpredictable schedule, you might want to subscribe by email. I'll also send out occasional announcements about events.

  • Privacy Policy: I will never sell or rent your contact information.

  • This field is for validation purposes and should be left unchanged.
  • Contact
  • Colophon
  • Comment Policy
  • Privacy Policy
  • Five for the Future

Copyright © 2023 · Utility Pro on Genesis Framework · WordPress · Log in

MENU
  • Home
  • About
  • Why WordPress?
  • How I Work
  • Portfolio
  • Services
  • Blog
  • Contact