← All guides DNS · CLOUDFLARE · EMAIL

Moving Your Domain's DNS to Cloudflare Without Breaking Email

I moved a GoDaddy domain to Cloudflare's free plan while a GitHub Pages site and Google Workspace email were live on it. Here's the order that kept both working.

Why Move DNS at All

You keep your domain registered where you bought it. Moving DNS only changes who answers the question "where does this domain point?" Reasons to do it:

The one rule: email and your website follow the nameservers. The moment you switch nameservers, every record has to already exist in Cloudflare. Copy first, check twice, switch last.

Step 1 — Write Down Every Record You Have Now

In GoDaddy: My Products → your domain → DNS. Screenshot every page of the records list. A typical setup for a GitHub Pages site plus Google Workspace email looks like this:

TypeNameValueWhat it does
A ×4@185.199.108.153 / 109 / 110 / 111.153Website (GitHub Pages)
CNAMEwwwusername.github.ioWebsite with www
MX@smtp.google.com (priority 1)Receiving email
TXT@v=spf1 include:… ~allSPF: who may send your mail
TXTgoogle._domainkeyv=DKIM1; k=rsa; p=…DKIM: signs your mail
TXT_dmarcv=DMARC1; p=…DMARC: spam policy
TXT@google-site-verification=…Proves you own the domain to Google
NS ×2, SOA@ns##.domaincontrol.comGoDaddy's own; Cloudflare replaces these

Watch for records that point to other records. My SPF record included a sub-record (include:something._spfm.yourdomain.com), and that sub-record had its own TXT entry. Miss it and your SPF check fails quietly.

Step 2 — Add the Domain to Cloudflare

  1. Sign up or log in at dash.cloudflare.com.
  2. On the account home, click Add → Connect a domain (older wording: "Add a site"). Enter the domain and continue. Don't use the "Onboard domain" button inside a Worker's settings for this. It gives you no chance to review records first.
  3. Choose the Free plan.
  4. Cloudflare scans your existing DNS and shows a list of records it found.

Step 3 — Compare and Fix the Scanned Records

The scan is good, not perfect. In my case it found 10 of the 11 records. It missed the SPF sub-record. Go through your screenshot line by line:

Tiny screen? On a small office monitor the record editor's Save button can sit off-screen. Zoom the browser (Ctrl + minus) or do this part on a bigger display.

Step 4 — Check DNSSEC Is Off at the Registrar

In GoDaddy: DNS → DNSSEC. If it's on, turn it off before changing nameservers. If you don't, the domain can stop resolving completely after the switch. You can switch DNSSEC on again later from Cloudflare.

Step 5 — Switch the Nameservers

  1. Cloudflare shows two nameservers assigned to you, for example carter.ns.cloudflare.com and davina.ns.cloudflare.com. Yours will have different names.
  2. In GoDaddy: your domain → DNS → Nameservers → Change Nameservers → I'll use my own nameservers.
  3. Delete the two domaincontrol.com entries, paste the two Cloudflare ones, and Save.

Step 6 — Wait, and Don't Panic at "Invalid Nameservers"

Right after the change, Cloudflare may show "Invalid nameservers" or "Pending". It checked before GoDaddy finished publishing the change. Click Check nameservers now after an hour. Mine went Active within about 12 hours. Cloudflare says it can take up to 24.

During the wait nothing breaks, because both GoDaddy and Cloudflare hold identical records.

Step 7 — Test Everything

  1. Open your website on mobile data (not home Wi-Fi, which can cache old answers).
  2. Send an email to your domain address from a different account, and reply from it.
  3. On Windows, if your PC still shows an old error for a new sub-domain, clear its DNS cache: open Command Prompt and run ipconfig /flushdns.

Common Issues

Website shows a certificate error. The GitHub Pages records are still proxied (orange). Switch them to DNS only and wait a few minutes.

Emails land in spam after the move. An SPF, DKIM or DMARC record is missing or altered. Compare against your screenshot again, character by character for DKIM.

A Worker custom domain says "No zones match". The domain isn't active in your Cloudflare account yet. Finish the nameserver switch first.

Registrar subscriptions. Moving DNS doesn't cancel anything at GoDaddy. Keep auto-renew on for the domain itself. If you don't use the email product it bundled, you can let that lapse.

← Back to all guides