
Cloudflare is a CDN and security platform with a free plan that works for most websites. Its appeal is that you can start using it simply by changing your domain's nameservers — no need to move your hosting. This guide explains the steps to switch nameservers to Cloudflare, what you gain, and what to know before moving your domain's DNS.
Key Benefits of Cloudflare (Free Plan)
- Free CDN: Distributes static files through 200+ edge servers worldwide
- DDoS Protection: Filters malicious traffic before it reaches your server
- Free SSL: Universal SSL Certificate enabled instantly
- Caching: Caches web pages and static files to reduce hosting load
- IP hiding: Your hosting server's real IP remains hidden from the public
Step 1: Sign Up and Add Your Domain to Cloudflare
- Go to cloudflare.com and create a free account
- Click Add a Site and enter your domain (e.g., yourdomain.com)
- Select the Free plan
- Cloudflare will automatically scan your existing DNS records
- Review and confirm that your A Record and MX records are correct
Step 2: Update Nameservers at Your Registrar
Cloudflare will give you two nameservers, for example:
aria.ns.cloudflare.combob.ns.cloudflare.com
- Log in to AsiaGB billing.in.th
- Go to Domains → your domain → Nameservers
- Replace the current nameservers with the Cloudflare ones
- Save — propagation takes 24–48 hours
Step 3: Configure Proxy Mode
In the Cloudflare DNS tab, enable the orange cloud (Proxy) for your website's A Record. This routes traffic through Cloudflare for protection. MX Records must remain DNS only (grey cloud) — never proxy them.
Recommended Additional Settings
- SSL/TLS: Set to Full (Strict) if your hosting already has an SSL certificate
- Speed → Auto Minify: Enable for JavaScript, CSS, and HTML
- Caching → Browser Cache TTL: Set to 1 Month for static assets
Important: After enabling Cloudflare Proxy, set SSL mode to Full or Full (Strict) — never Flexible. Using Flexible on a site that already forces HTTPS will create an infinite redirect loop.
Understanding Cloudflare Caching and How to Purge It
One of the most common points of confusion for new Cloudflare users is making a change on their server but finding visitors still see the old version. This happens because Cloudflare caches static files at its edge servers to reduce requests reaching your origin. The cache respects the Cache-Control header your server sends; if none is set, Cloudflare applies default TTLs by file type — HTML gets a shorter cache than CSS or images.
How to purge the cache manually
- Log in to the Cloudflare Dashboard and select your domain
- Go to Caching → Configuration
- Click Purge Everything to clear all cached assets, or use Custom Purge to target specific URLs
Tip: For pages that update frequently (e.g., a news homepage), create a Cache Rule that sets Cache Level to Bypass for those specific URL patterns. This way only static assets benefit from caching while dynamic content always comes from origin.
Cloudflare Page Rules: Practical Examples
Cloudflare's Page Rules let you change caching behaviour, redirect URLs, and enforce HTTPS at the edge — without touching any code on your server. The free plan includes three Page Rules, which covers the most common use cases.
| URL Pattern | Setting | Effect |
|---|---|---|
*yoursite.com/wp-admin/* |
Cache Level: Bypass | Admin panel never cached |
*yoursite.com/*.jpg |
Edge Cache TTL: 1 Month | Images cached for 30 days |
http://yoursite.com/* |
Always Use HTTPS | All HTTP requests forced to HTTPS |
Free Features Worth Enabling Right Away
Beyond CDN and DDoS protection, the Cloudflare free plan includes several powerful extras that most site owners overlook:
- Cloudflare Workers (100,000 requests/day free): Run JavaScript or WebAssembly at the edge — great for lightweight API endpoints, redirects, or A/B testing logic without touching your server
- Cloudflare Zaraz: Load third-party scripts (analytics, chat widgets, ad pixels) through Cloudflare instead of the browser, improving page speed and user privacy
- Turnstile CAPTCHA (free): A user-friendly, invisible CAPTCHA alternative to reCAPTCHA — no checkbox to click, no privacy concerns
- Web Analytics (free, privacy-first): Cookieless analytics showing visitor counts, page views, and Core Web Vitals without requiring a cookie banner
Cloudflare Pros and Limitations at a Glance
Cloudflare is genuinely useful for most websites, but understanding its limitations prevents surprises after you switch nameservers.
| Area | Advantage | Limitation |
|---|---|---|
| Speed | Significant improvement for international visitors | Little impact for local visitors near the origin server |
| Security | Automatic DDoS and bot filtering | May block legitimate users on VPN or Tor exit nodes |
| Complexity | Basic setup is straightforward | Advanced rules require learning Cloudflare's rule syntax |
| Flexible DNS management | MX records must always remain DNS-only — never proxy |
Frequently Asked Questions
After switching nameservers to Cloudflare, must I also move my hosting?
No. Your website stays on the same hosting. Cloudflare only takes over DNS and acts as a proxy in front.
How long does changing nameservers take?
DNS propagation usually takes a few hours up to 24 hours. Your site remains reachable during that time.
After moving to Cloudflare, where do I edit DNS?
In the Cloudflare Dashboard — Cloudflare becomes the authoritative DNS, so editing the domain's previous DNS has no effect.
Need a Domain to Use with Cloudflare?
Register .com or .co.th domains at AsiaGB — manage nameservers instantly through the billing portal.
Register a Domain