Client Area

Complete Cloudflare Setup Guide for DomainIndia Hosting (DNS, SSL, Caching, Security)

ByDomain India Team·DomainIndia Engineering
6 min read24 Apr 20263 views
# Complete Cloudflare Setup Guide for DomainIndia Hosting (DNS, SSL, Caching, Security)
TL;DR
Cloudflare fronts your DomainIndia-hosted website with a global CDN, free SSL, DDoS protection, and caching — cutting page load times by 40–70% and shielding your origin server. This guide walks the full integration from nameserver change to advanced Page Rules.
## What Cloudflare gives you Cloudflare sits between your visitors and our origin server. Every request hits Cloudflare first — cached assets are served from their nearest data centre (Mumbai, Chennai, Delhi, Bangalore), and only dynamic requests reach our servers. Free-tier benefits: - Global CDN with 330+ data centres (3 in India: Mumbai, Chennai, Delhi) - Free universal SSL (Cloudflare origin cert + auto-renewing edge cert) - Unlimited DDoS protection (Layer 3/4/7) - Smart image/CSS/JS optimisation - Basic WAF rules against common OWASP attacks - Analytics (requests, bandwidth, bot traffic) Paid plans ($25/mo Pro → $200/mo Business → Enterprise) add advanced WAF, image resizing, mobile optimisation, and uptime SLA. ## Step 1 — Create a Cloudflare account and add your domain
1
Sign up at cloudflare.com (free)
2
Click "Add a Site" → enter your domain (e.g. yourcompany.com, without www)
3
Select Free plan unless you have specific needs
4
Cloudflare scans your existing DNS records — verify they're complete (A records, MX, TXT, etc.)
5
Cloudflare assigns you two nameservers, like alice.ns.cloudflare.com and bob.ns.cloudflare.com
Warning

Don't skip the DNS scan review. Cloudflare misses some records. Before changing nameservers, open cPanel/DA DNS Zone Editor and compare every record. Missing a single TXT or MX record can kill email for days.

## Step 2 — Change nameservers at DomainIndia
1
Log in to your DomainIndia client area: https://domainindia.com/client
2
Navigate: Domains → My Domains → click on the domain
3
Go to "Nameservers" tab
4
Select "Use custom nameservers"
5
Replace the existing NS (likely ns1.crystalregistry.com etc.) with the two Cloudflare NS from Step 1
6
Save
Propagation takes 4–48 hours for most TLDs, usually under 2 hours for `.com` and `.in`. Cloudflare emails when your domain is active. ## Step 3 — Configure SSL correctly This is the most commonly misconfigured step. Cloudflare offers 4 SSL modes:
ModeEdge → visitorOrigin → CloudflareSafe?
OffHTTPanyNo — don't use
FlexibleHTTPSHTTPRisky — MITM vulnerable
FullHTTPSHTTPS (self-signed ok)Good
Full (strict)HTTPSHTTPS (valid cert)Best
**Always use Full (strict).** Our DomainIndia hosting provides free Let's Encrypt SSL on all plans — your origin already has a valid cert. In Cloudflare: SSL/TLS → Overview → Full (strict). Also enable: - SSL/TLS → Edge Certificates → **Always Use HTTPS** = On - SSL/TLS → Edge Certificates → **Automatic HTTPS Rewrites** = On - SSL/TLS → Edge Certificates → **Minimum TLS Version** = TLS 1.2 ## Step 4 — Tune caching Cloudflare caches static assets (CSS, JS, images) by default. But HTML isn't cached unless you tell it to. **For marketing/brochure sites (WordPress-style):** - Caching → Configuration → **Browser Cache TTL** = 4 hours - Page Rule: `*yourcompany.com/*` → Cache Level: Cache Everything, Edge Cache TTL: 2 hours **For dynamic sites (e-commerce, dashboards):** - Leave HTML uncached, let Cloudflare cache only static assets - Use `Cache-Control` headers in your app to fine-tune
Info

Bypass cache for admin areas. Create a Page Rule for yourcompany.com/wp-admin/ (or your admin path) with Cache Level: Bypass. Without this, logged-in admins may see stale content.

## Step 5 — Firewall and bot protection Free plan includes: - **Security Level:** set to **Medium** (Security → Settings) - **Bot Fight Mode:** On (stops common bot scrapers — our customer saved 260 GB of bandwidth this month by enabling this) - **Challenge Passage:** 30 minutes - **Browser Integrity Check:** On Create custom WAF rules (Security → WAF → Custom Rules): ``` Rule 1: Block known bad bots (http.user_agent contains "MJ12bot") or (http.user_agent contains "AhrefsBot") or (http.user_agent contains "SemrushBot") → Block ``` ``` Rule 2: Rate-limit login (http.request.uri.path eq "/wp-login.php") → Managed Challenge ``` ``` Rule 3: Block countries you don't serve (ip.geoip.country in {"CN" "RU" "KP"}) → Block (only if you don't sell to those countries) ``` ## Step 6 — Performance features Under Speed → Optimization: - **Auto Minify:** enable JS, CSS, HTML - **Brotli:** On (better compression than gzip) - **Rocket Loader:** Off for most sites (breaks JavaScript on WordPress if unlucky) - **Early Hints:** On (speeds up page paint) Under Speed → Content Optimization: - **Polish (Pro plan):** auto-compresses images, converts to WebP - **Mirage (Pro plan):** lazy-loads images on slow connections ## Common pitfalls ## Verifying everything works From your laptop: ```bash # Check nameservers resolve to Cloudflare dig NS yourcompany.com +short # Should return two *.ns.cloudflare.com # Check Cloudflare is in front curl -sI https://yourcompany.com | grep -i cf-ray # Should return a cf-ray header # Check cache curl -sI https://yourcompany.com/logo.png | grep -i cf-cache-status # Should say "HIT" on second request ``` ## When NOT to use Cloudflare - Internal-only apps (staff dashboards behind VPN) — adds latency with no benefit - Very low-traffic sites (<1,000 visits/month) — benefit is minimal - Specialised protocols (non-HTTP/HTTPS) — Cloudflare is primarily an HTTPS proxy ## FAQ
Q Is Cloudflare really free?

Yes — the Free plan covers most small-to-medium sites. You only pay if you need enterprise WAF, image resizing, 24/7 support, or SLA.

Q Does Cloudflare replace my DomainIndia hosting?

No — Cloudflare is a proxy/CDN, not a web host. Your files and databases still live on DomainIndia. Cloudflare just caches responses and shields your origin.

Q Can I use Cloudflare on shared hosting?

Absolutely. Shared cPanel, DirectAdmin, and Plesk customers all integrate with Cloudflare the same way — just a nameserver change.

Q Will Cloudflare break my WordPress / Laravel / Node app?

Only if misconfigured. Follow the Full (strict) SSL rule and add a "bypass cache for admin" Page Rule. Enable Rocket Loader only after testing — it sometimes breaks JS.

Q How do I roll back if something breaks?

Revert nameservers at DomainIndia to the original (ns1.crystalregistry.com etc.). Changes propagate in 5–30 minutes. Keep a note of your original NS before switching.

Q Does Cloudflare see my visitor data?

Yes — every request passes through Cloudflare servers. They don't sell the data but are subject to US law. If you need full data sovereignty (medical, government, legal), consider a paid CDN hosted in India.

Already on DomainIndia? Cloudflare integration takes 30 minutes. Talk to our support

Was this article helpful?

Your feedback helps us improve our documentation

Still need help? Submit a support ticket