We recently moved a small tour company's website from WordPress to a static site on Cloudflare Pages. The domain was registered at GoDaddy. The business also used GoDaddy email on the same domain, so the move had two hard requirements. Visitors could not see any downtime. Email could not stop working for even a minute.
This guide covers every step we followed, in order, with the reasons behind each one. The approach works for any site moving its DNS from GoDaddy to Cloudflare, whatever ends up hosting the website.
What "moving DNS" actually means
Your domain registration and your DNS are two separate things.
- The registrar (GoDaddy here) is where you bought and renew the domain. We left the registration at GoDaddy.
- The DNS is the address book for the domain. It tells browsers where the website lives and tells other mail servers where to deliver email.
Moving DNS to Cloudflare means changing the domain's nameservers so Cloudflare answers those questions instead of GoDaddy. Once the nameservers change, GoDaddy's DNS records stop being used completely. That is why every record has to exist in Cloudflare before the switch.
The plan in five phases
- Prepare: back up, export records, check for blockers.
- Copy the DNS into Cloudflare while it still points at the old site.
- Switch the nameservers. Visitors notice nothing.
- Put the new site live by pointing the domain at it.
- Test, monitor and keep a rollback ready.
The key idea is to separate moving the address book from changing the addresses inside it. Each phase is small and easy to undo.
Phase 1: Prepare
Back up the old site
Take a full backup of the old site's files and database from the current host. Keep that hosting active for about 30 days after launch. It is your fastest fallback.
Save the old URL list
Download the old sitemap while the old site is still live. On WordPress it is usually /sitemap_index.xml or /wp-sitemap.xml. After launch you will use it to check that every old URL still works or redirects.
Export your GoDaddy DNS records
In GoDaddy, open Domain Portfolio, choose the domain, then open DNS. Use the actions menu to export the zone file, or copy the record list by hand.
Our list had 14 records:
| Type | Name | Points to | Purpose |
|---|---|---|---|
| A | @ |
old host IP | Website |
| CNAME | www |
example.com |
Website |
| CNAME | email |
email.secureserver.net |
GoDaddy webmail |
| CNAME | ftp |
example.com |
FTP to old host |
| CNAME | pay |
paylinks.commerce.godaddy.com |
GoDaddy payment links |
| CNAME | _domainconnect |
_domainconnect.gd.domaincontrol.com |
GoDaddy helper |
| MX | @ |
smtp.secureserver.net (priority 0) |
|
| MX | @ |
mailstore1.secureserver.net (priority 10) |
|
| TXT | @ |
google-site-verification=… |
Search Console |
| TXT | @ |
v=spf1 … |
Email sender policy (SPF) |
| TXT | default |
v=DKIM1; … |
Email signing (DKIM) |
| NS ×2, SOA | @ |
GoDaddy nameservers | Managed by the DNS provider |
Write down the website record values (the A record for @ and the www record). These are your rollback values.
The MX and TXT records matter most. MX records route email. The SPF and DKIM records stop email being marked as spam. The Google verification record keeps Search Console verified. Losing any of them causes problems that are easy to miss.
Check DNSSEC and forwarding
In GoDaddy, open the domain's DNSSEC tab. If DNSSEC is on, it must be turned off before the nameserver change. Cloudflare's documentation warns that changing nameservers with DNSSEC active can make the domain unreachable. In our case the tab only offered "Turn On DNSSEC", which means it was already off.
Check the Forwarding tab as well. Ours showed "Not set up" for the domain and subdomains, so nothing would conflict.
Phase 2: Copy the DNS into Cloudflare
Onboard the domain
In the Cloudflare dashboard, go to Domains and choose Onboard a domain. Enter the bare domain without www or https://.
The onboarding screen mentions domain transfers. Connecting the domain does not transfer it. A transfer only starts if you enter an authorisation code from your registrar and pay for it, so you can ignore that part.
The screen also has newer AI crawler settings. We left these alone:
- "I monetize pages that serve ads": unticked, because the site has no ads.
- Search, Agent and Training: left as shown. Search engines must stay allowed or the new site cannot be indexed.
- Bot Preference Sync: unticked. The site already has its own
robots.txtand we did not want Cloudflare adding rules during a migration.
For DNS records we chose automatic import (Cloudflare's quick scan), then picked the Free plan.
Compare every record against your export
Cloudflare's quick scan is not guaranteed to find every record. Compare its list against your GoDaddy export line by line.
Our scan found 10 of the 11 records we needed. It missed the DKIM record at default. We added it by hand, copying the long value straight from GoDaddy's edit screen so no characters were lost.
Skip the NS and SOA records. Cloudflare creates its own.
Set every record to DNS only
This is the step most guides skip. The quick scan set every A and CNAME record to Proxied (orange cloud). We switched all of them to DNS only (grey cloud).
At this stage those records still point at the old WordPress host, GoDaddy webmail and GoDaddy payment links. If Cloudflare's proxy sat in front of them, the old services could throw SSL errors or redirect loops. With DNS only, Cloudflare answers DNS questions exactly as GoDaddy did, so nothing changes for visitors.
When you continue, Cloudflare warns that the domain "is not fully protected" because nothing is proxied. Choose I'll do it later. The new site is proxied automatically in Phase 4.
Our final list had 11 records, all set to DNS only.
Note the nameservers and stop
Cloudflare then shows two nameservers, such as jen.ns.cloudflare.com and lex.ns.cloudflare.com. Copy them down. At this point nothing is live. The domain shows as pending in Cloudflare until the nameservers change.
Phase 3: Switch the nameservers
In GoDaddy, open the domain's Nameservers tab. Choose Change Nameservers, then the option to use your own nameservers. Replace GoDaddy's (ns71.domaincontrol.com and ns72.domaincontrol.com in our case) with the two from Cloudflare and save. GoDaddy warns that it will no longer manage your DNS. That is expected.
Back in Cloudflare, select Check nameservers now. Ours went live within the hour. Cloudflare showed "Your domain is now protected by Cloudflare" when it was active.
Check that it worked
We checked from the command line before moving on. These checks only read data.
The .com registry is the source of truth for nameservers:
curl -s https://rdap.verisign.com/com/v1/domain/example.com
Public resolvers catch up at different speeds:
nslookup -type=NS example.com 8.8.8.8
nslookup -type=NS example.com 1.1.1.1
Right after the change, Google's resolver already showed Cloudflare while Cloudflare's own resolver still showed GoDaddy from its cache. That is normal. Both sets of records point to the same places, so visitors notice nothing.
We then asked Cloudflare's nameserver directly for every record and compared the answers with the GoDaddy export:
nslookup -type=MX example.com jen.ns.cloudflare.com
nslookup -type=TXT example.com jen.ns.cloudflare.com
nslookup -type=TXT default.example.com jen.ns.cloudflare.com
All 11 matched. The website still loaded the old WordPress site, which was the goal of this phase.
Phase 4: Put the new site live
Test the production build before anyone can see it
Our site was already deployed to its Cloudflare Pages address (project-name.pages.dev). Before connecting the domain we deployed the production build there. That build turns on search indexing, the sitemap and analytics.
The site's contact and lunch-order forms run as Cloudflare Pages Functions. They read their recipient addresses from environment variables. We tested in this order:
- Deploy the production build with the form recipients still set to our own test inboxes.
- Submit both forms on the
pages.devaddress and confirm the emails arrive. - Change the recipient variables to the client's inbox.
- Deploy again. Pages variables only take effect on the next deployment.
Do step 4 before connecting the domain. Once the domain points at the site, real enquiries start arriving and they must reach the client.
We deployed with Wrangler, Cloudflare's command-line tool:
$env:SITE_ENV = "prod"
npm run build
$env:CLOUDFLARE_ACCOUNT_ID = "your-account-id"
npx wrangler pages deploy dist --project-name=your-project --branch=main
Add the custom domains
In Workers & Pages, open the project, then Custom domains, then Set up a custom domain.
We added www first. Cloudflare replaced the old www record with a CNAME to the pages.dev address.
Then we added the bare domain. Cloudflare showed a confirmation screen that replaces the old A record (the WordPress IP) with a CNAME to project-name.pages.dev. A CNAME on the bare domain is normally not allowed. Cloudflare handles it with a feature called CNAME flattening.
Only the website records change. The MX and TXT records are untouched.
Both domains showed Active with SSL enabled within a few minutes. At that moment the domain switched from WordPress to the new site.
Redirect the bare domain to www
Both addresses now served the same site, which Google can treat as duplicate content. We picked www as the main address, which matched the canonical URLs already in the site.
In the domain's Rules section we used the Redirect from root to WWW template:
- Request URL:
https://example.com/* - Target URL:
https://www.example.com/${1} - Status code: 301 (permanent)
- Preserve query string: on, so UTM tags from ads and Google Business Profile links survive
Turn on Always Use HTTPS
Under SSL/TLS, then Edge Certificates, we turned on Always Use HTTPS. Pages already redirects HTTP to HTTPS for its own domains. This setting covers the whole domain as a backup.
After these settings, every visitor ends up at one secure address. That includes people who type the bare domain, www or an old http:// link.
Phase 5: Test everything
We checked redirects with curl because it shows each hop:
curl -sI https://example.com/
curl -sI "https://example.com/our-fleet/?utm_source=test"
curl -sI http://example.com/
Our results:
- The bare domain returned a 301 to
www, keeping the path and query string. http://went tohttps://and then towww.- Old WordPress URLs such as
/pricing/and/blog/reached their new pages through the site's redirects file. /bookwent to the external booking page.- Every key page on
wwwreturned 200. - The page source had no
noindextag. The sitemap androbots.txtloaded. - The MX records were unchanged.
Then the business owner tested from their side:
- Send the contact form with a message like "Website launch test, please ignore".
- Send a test order through the lunch form.
- Confirm both emails arrive at the business inbox, checking spam too.
- Send and receive one email on the domain's own address to confirm GoDaddy email still works.
- Try the Book and Call buttons, the menu and the footer links on a phone.
Rollback plan
Write this down before you start.
| Problem | Fix |
|---|---|
| A bad deployment | In Pages, open Deployments and roll back to the previous one. It is instant. |
| The new site has to come down | Remove the custom domains in Pages. In Cloudflare DNS, put back the old A record for @ and the old www record, set to DNS only. With short TTLs this takes minutes. |
| Email stops working | Compare MX and TXT records in Cloudflare against the GoDaddy export and add anything missing. |
Avoid switching the nameservers back to GoDaddy as a rollback. It can take hours to spread. Changing records inside Cloudflare is much faster.
After launch
- Google Search Console: submit the new sitemap and request indexing for the main pages. Copying the existing
google-site-verificationrecord meant the domain stayed verified. - Google Business Profile: update the website link, with UTM tags if you track campaigns.
- Old hosting: keep it for about 30 days, then cancel.
- FTP record: our
ftprecord pointed at the bare domain, which now serves the new site. If anyone still needs FTP access to the old host, changeftpto an A record with the old host's IP.
What we learned
- The quick scan misses records. Ours missed the DKIM record. Always compare against your registrar export.
- Imported records default to Proxied. Switch them to DNS only until the new site is ready, or the old services may break during the handover.
- Wrangler has no
--account-idoption for Pages deploys. It fails with "Unknown arguments". Set theCLOUDFLARE_ACCOUNT_IDenvironment variable instead. - Dashboard uploads skip Pages Functions. Drag-and-drop deployments in the Cloudflare dashboard do not include the
functions/folder, so forms built on Functions stop working. Deploy with Wrangler. - Build settings live on your machine with CLI deploys. Our production switch (
SITE_ENV=prod) is read during the local build. Setting it as a variable in Cloudflare does nothing unless Cloudflare builds the site from Git. - Separate the steps. Moving the DNS first while it still pointed at WordPress meant the risky change was small and quick to undo.