Here My Setup Process and Mistakes
Moving a WordPress site onto Cloudflare DNS looks simple on paper. You add your domain, swap nameservers, and flip a few switches. In real life, a single missed record can knock your email offline or trap visitors in an HTTPS loop.
I learned this the hard way while setting up WordPress sites for local businesses and niche projects in Sri Lanka. When you are managing a .lk domain for a small shop in Kandy or a publishing site read mostly on mobile connections in Colombo, DNS delays and bad routing show up immediately. Readers notice slow first bytes. Clients notice when quote forms or mail replies bounce.
Here is how I actually set up Cloudflare DNS for a WordPress site, what went wrong along the way, and what I check before calling the job done.
Why I Moved DNS to Cloudflare in the First Place
Shared hosting panels often come with sluggish DNS servers and clunky record editors. If a site gets hit by scrapers or a sudden traffic spike from a local news share, your origin server takes every single hit directly.
Putting DNS on Cloudflare gave me two things I wanted right away. First, fast authoritative answers from edge locations closer to where people connect. Second, control over which traffic gets proxied through Cloudflare and which traffic goes straight to the server.
Say you run ceylonteajournal.lk on a VPS hosted in Singapore or Frankfurt. A visitor opening an article on a Sri Lankan mobile network has to complete DNS lookup, TLS negotiation, and origin response before anything renders. Fast DNS shaves off wasted round trips at the very start of that chain.
How I Set Up the DNS Zone Step by Step

I start every new site from the Cloudflare dashboard rather than editing records blindly on the hosting side.
1. Adding the Domain and Importing Existing Records
Inside Cloudflare, I add the apex domain—say ceylonteajournal.lk—and let Cloudflare scan for existing DNS records. That scan is a starting point, not gospel. Old staging subdomains, forgotten TXT verification entries, and leftover A records from an older host frequently show up.
Before moving forward, I check every A, AAAA, CNAME, and MX record against what my hosting panel currently uses. If I just migrated a WordPress install to a new server IP, I update the A record content to the new IPv4 address right here so nothing points to the old box. For guidance on adding and editing entries cleanly, I keep the Cloudflare DNS Records documentation handy.
2. Switching Nameservers Without Breaking Anything
Once the records look right, Cloudflare gives me two assigned nameservers. Then I log into the domain registrar—such as a .lk registrar portal—and update the domain’s nameservers to match. Details on this switch live in the Cloudflare Full Setup guide.
One rule I never skip: check DNSSEC first. If DNSSEC was active at the old registrar and you swap nameservers while stale DS records remain at the registry, resolvers can fail validation and make your domain vanish. Turn DNSSEC off before switching nameservers, wait for activation in Cloudflare, and only enable DNSSEC again once Cloudflare confirms the zone is active.
3. Choosing Proxy Status Carefully
On A, AAAA, and CNAME records, Cloudflare lets you toggle between Proxied (orange cloud) and DNS only (grey cloud).
For www and the root domain (@) serving WordPress, I turn the proxy on. That hides the origin IP address and lets Cloudflare cache static assets and filter noisy traffic. For mail and certain third-party services, keeping records on DNS only avoids routing non-HTTP traffic through the web proxy where it does not belong.
4. Matching SSL/TLS Mode to the Origin Server
DNS is only half the picture. Right after adding the site, I check the SSL/TLS encryption setting.
If your WordPress origin server already has a valid SSL certificate—such as a Let’s Encrypt certificate or a Cloudflare Origin CA certificate—use Full (strict). That encrypts the connection from visitor to Cloudflare and from Cloudflare to your origin server, while verifying the origin certificate so it is valid and matches the hostname. You can read the exact requirements in the Cloudflare Full (strict) SSL/TLS guide.
Mistakes I Made and How They Bit Me
Almost every mistake I made came from rushing through a checklist or assuming a default setting was harmless.
1: Leaving SSL on Flexible Mode
Early on, I left a WordPress site on Flexible SSL because it loaded without throwing an immediate certificate warning. Big mistake. Flexible mode encrypts traffic between the browser and Cloudflare, yet sends traffic from Cloudflare to the origin server over plain HTTP.
When WordPress itself is configured to force HTTPS or detect HTTPS headers in certain ways, that mismatch can trigger redirect loops or confuse plugins about the real protocol. Worse, traffic between Cloudflare and the server is not encrypted end-to-end. Installing an Origin CA certificate or proper server TLS and switching to Full (strict) fixed that cleanly.
2: Proxying the Mail Hostname by Accident
On a client site using a subdomain like mail.kandycrafts.lk as an A record for webmail or IMAP/SMTP client setup, I once left the orange cloud enabled. Mail clients expect a direct mail server endpoint, not an HTTP edge proxy.
When troubleshooting email delivery or webmail quirks, I separate mail routing from web caching. Keeping MX and mail-related hostnames properly configured—and leaving non-web hostnames unproxied—prevents weird connection behavior.
3: Forgetting Old Hosting IPs After Migration
When migrating a WordPress site from one server to another, people often focus on database imports and file transfers and forget a secondary subdomain pointing to the old IP. A client’s staging or shop subdomain was still sitting on the previous server’s IP address for two days until someone noticed outdated content.
Now, whenever a server IP changes, I scan every single A and AAAA record in the zone one by one and update the content field before cutting over live traffic.
4: Changing Nameservers Without Checking TTL Expectations
Even with fast nameservers, cached DNS answers do not vanish instantaneously worldwide. Some local ISPs or recursive resolvers hold onto old records until their Time to Live (TTL) expires.
If you are launching a time-sensitive campaign or moving an active site, lower record TTLs ahead of time when your current DNS provider allows it. Expect a short window where different networks see slightly different states.
My Quick Pre-Launch Check for WordPress Sites

Before I step away from a Cloudflare DNS setup, I run through a short sanity check:
- Confirm zone status is active: Make sure Cloudflare recognizes the new nameservers and no DNSSEC hold is blocking resolution.
- Test both apex and
www: Check that bothdomain.lkandwww.domain.lkresolve cleanly and redirect to your chosen canonical URL without loops. - Verify email records (
MX,SPF,DKIM): Send a test message from the domain’s address to an external inbox and check headers so business email is not collateral damage. - Confirm
Full (strict)TLS: Make sure your origin server presents a valid certificate for the hostname and port 443 responds properly.
Configuring Cloudflare DNS takes ten minutes once you know what each record does. Protecting yourself from preventable outages takes five extra minutes of quiet verification.