Cloud & DevOps
How we moved a live online store to Cloudflare with zero downtime
Moving a live store's DNS and CDN sounds risky. With a little preparation it isn't. The exact steps we followed for Woodnix, and the checks we ran before and after the switch.
By Aftab Farhan4 min read
Short answer: you can move a live website to Cloudflare without downtime if you copy every DNS record first, check them before switching nameservers, and keep the old setup running until the change has spread. The site never goes offline, because both the old and the new DNS point visitors to the same server during the switch.
We recently did exactly this for Woodnix, a furniture store selling across the UAE. The store had to stay open for customers throughout. Here is the process we followed, so you can use it for your own site.
Why move DNS and the CDN to Cloudflare?
- Speed. Images and pages are cached close to visitors, which matters for a shop with hundreds of product photos.
- Protection. Cloudflare filters bad bots and attacks before they reach your server.
- Control. Redirects, caching rules and SSL settings live in one dashboard instead of being spread across hosting panels.
- Flexibility. Your domain stays where it is registered, and you can change hosting later without touching DNS again.
Before the switch: preparation
- Export the current DNS zone. Write down every record: A, CNAME, MX, TXT (SPF, DKIM, DMARC, site verifications). Missing a single TXT record is the most common way email breaks after a move.
- Lower the TTLs a day ahead. Set the TTL on the main records to 5 minutes. If something needs fixing during the switch, the fix then spreads quickly.
- Add the site to Cloudflare. Cloudflare scans and imports the existing records. Compare its list with your export line by line, and add anything it missed.
- Start with DNS only for mail. Mail records (MX) are never proxied. Keep web records on DNS only at first too, so traffic still goes straight to your server while you check things.
- Check SSL on the server. Make sure the hosting server has a valid certificate. Cloudflare's "Full (strict)" mode needs it, and it prevents redirect loops.
The switch
Changing the nameservers at your registrar is the only real switch. Copy the two Cloudflare nameservers into the registrar's panel and save. From then on, resolvers around the world gradually start asking Cloudflare instead of the old DNS. Because both answer with the same server address, visitors land on the same site either way: nobody sees an error.
Zero downtime isn't luck. It comes from making the old and new DNS give the same answers before you switch.
After the switch: checks
- Wait for "Active" in Cloudflare. That confirms the nameservers changed. It can take a few minutes to a few hours.
- Test the important pages. Home page, a category, a product, cart and checkout. On a shop, test a real checkout up to the payment step.
- Send and receive a test email to make sure MX and SPF still work.
- Turn on the proxy (orange cloud) for web records once everything works, then set SSL to "Full (strict)".
- Add redirects with Redirect Rules, for example www to the bare domain, so search engines see one address.
- Purge the cache after site changes. If you change the theme, permalinks or URLs later, purge Cloudflare's cache so visitors don't get old or missing pages.
Common mistakes to avoid
- Forgetting TXT records for email or Google verification.
- Proxying records that shouldn't be proxied, such as mail or some API endpoints.
- Using "Flexible" SSL, which can cause endless redirect loops on WordPress.
- Switching late on a Friday. Pick a quiet time when someone can check the site for an hour afterwards.
Frequently asked questions
Do I have to move my domain to Cloudflare?
No. The domain can stay at your current registrar. Only the nameservers change.
Will my email stop working?
Not if every MX and TXT record is copied exactly before the switch. That's why the record-by-record comparison matters.
Does this work for any hosting?
Yes. The steps are the same for shared hosting, a VPS or a cloud server. See how we handle moves like this on our cloud deployment page.
- Cloudflare
- DNS
- Migration
- E-commerce
Aftab Farhan
Co-Founder, Engineering & AI Integrations
