How to Use Cloudflare with Your Domain: Nameserver Change Step by Step

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)

Step 1: Sign Up and Add Your Domain to Cloudflare

  1. Go to cloudflare.com and create a free account
  2. Click Add a Site and enter your domain (e.g., yourdomain.com)
  3. Select the Free plan
  4. Cloudflare will automatically scan your existing DNS records
  5. 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.com
bob.ns.cloudflare.com

  1. Log in to AsiaGB billing.in.th
  2. Go to Domains → your domain → Nameservers
  3. Replace the current nameservers with the Cloudflare ones
  4. 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

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

  1. Log in to the Cloudflare Dashboard and select your domain
  2. Go to Caching → Configuration
  3. 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 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
Email 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