Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

What a CDN is and how it works: caching, Cloudflare and Indian sites

A CDN keeps copies of your site's files in cities near your visitors so fewer requests travel to your server. This guide explains how that works, when it helps an Indian site, and how to set up Cloudflare's free plan safely.

Short answer: A CDN (content delivery network) is a network of edge servers in many cities that cache copies of your site's files and serve them from the location nearest each visitor. Your hosting server stays the origin. A CDN speeds up images, CSS, JavaScript and cacheable pages, and filters attack traffic, but it cannot speed up uncached dynamic pages or slow database queries.

What is a CDN?

A CDN, or content delivery network, is a set of servers spread across many cities that keep copies of your website's files and hand them to visitors from the nearest location instead of from your own server. So what is a CDN in practice? It is a caching layer that sits in front of your host: your server (the origin) still holds the real site, and the CDN's edge servers answer repeat requests for the same files without asking the origin each time.

The gain comes from distance and load: nearby files arrive sooner, and every request the edge answers is one your server never processes.

Quick checklist before you add a CDN

  1. Measure time to first byte and round-trip time from your visitors' cities.
  2. Make sure the origin already has a valid, publicly trusted SSL certificate.
  3. List what must never be cached: admin, cart, checkout and account pages.
  4. Set sensible Cache-Control headers on static files at the origin.
  5. Use SSL mode Full (strict), never Flexible.
  6. Restore the real visitor IP at the origin so logs, firewalls and rate limits keep working.

How does a CDN work?

A CDN works by answering requests at an edge server close to the visitor and only fetching from your origin when it does not already hold a fresh copy.

Key terms:

  • PoP (point of presence): a CDN location in a city, with servers that store cached files. Visitors reach a nearby PoP through DNS or anycast routing.
  • Origin: your hosting server, which holds the authoritative copy of every page and file.
  • Cache hit and miss: a hit means the PoP served a stored copy; a miss means it had to fetch from the origin, then usually stored the result for next time.
  • Cache-hit ratio: the share of requests answered from cache. A ratio of 90% means only one request in ten reaches your server.
  • TTL (time to live): how long a cached copy counts as fresh before the edge must check with the origin again.

The TTL is normally set by the Cache-Control response header. RFC 9111, the IETF standard for HTTP caching, defines max-age as the number of seconds a response stays fresh, s-maxage as an override that applies only to shared caches such as a CDN, and private and no-store as instructions that a shared cache must not keep the response. A typical header for a versioned stylesheet looks like this:

Cache-Control: public, max-age=31536000, immutable

On Cloudflare, the cf-cache-status header shows values such as HIT, MISS, EXPIRED, BYPASS or DYNAMIC, and the Age header shows roughly how many seconds have passed since the cached copy was fetched or revalidated from the origin:

curl -sI https://example.com/wp-content/themes/site/style.css | grep -iE "^(cf-cache-status|age|cache-control):"

What a CDN speeds up, and what it does not

A CDN speeds up what is identical for every visitor, not per-request work on your server.

ContentHelped by a CDN?Why
Images, CSS, JavaScript, fontsYes, stronglySame bytes for everyone; cached at the edge for long TTLs
Video and downloadable filesYesLarge files benefit most from a nearby copy
Cacheable HTML (blog posts, landing pages)Yes, if you add a cache ruleCloudflare does not cache HTML by default
Logged-in pages, carts, checkoutsNoPersonalised per visitor, must reach the origin
Slow database queries and PHPNoThe edge waits for the origin like any browser
API calls and form submissionsRarelyUsually POST requests or unique responses

If an uncached page takes two seconds to build, a CDN still delivers it in two seconds or more. Fix origin speed first; the WordPress speed guide for India covers page caching, PHP versions and database clean-up.

Side benefits: DDoS filtering and a WAF

A proxying CDN can filter attack traffic before it reaches your server. Cloudflare says that standard, unmetered DDoS protection for layers 3 to 7 is available on every plan, including Free, and that the Free plan includes the Cloudflare Free Managed Ruleset for its web application firewall. A proxied record also hides your server's IP address behind Cloudflare's, although DNS-only records such as mail or ftp that point at the same server still reveal it.

CDN vs hosting: a CDN does not replace your host

A CDN is a cache and delivery layer, while hosting is where your site actually runs, so you need hosting with or without a CDN. The host runs PHP, the database, cron jobs and file storage; the CDN only copies and forwards HTTP responses. If the origin goes down, cached files may still be served for a while, but anything uncached returns an error such as the one explained in the 502 Bad Gateway guide.

Do I need a CDN for a site hosted in India?

If your visitors and server are both in India, a CDN gains less on page HTML but still helps static files, mobile networks and visitors abroad. The reasoning is about round-trip time. Light in optical fibre covers roughly 200 km per millisecond, so every 1,000 km of cable adds about 10 ms to a round trip. From Indian metros to a Mumbai server, round trips are typically 20 to 45 ms; to a server on the US East Coast they are roughly 200 to 260 ms.

SituationTypical round trip without CDNLikely gain from a CDN
Indian visitor, server in Mumbai20 to 45 msSmall for HTML, useful for assets
Indian visitor on congested mobile dataAdds 5 to 40 ms or moreModerate; fewer origin trips help
Visitor in Europe or the US, server in Mumbai120 to 260 msLarge for cached content
Indian visitor, server in the US200 to 260 msLarge, but moving the server helps more

A page needs several sequential round trips, so 40 ms saved per trip adds up. Measure your own numbers with the browser latency test before deciding. The Bigdomainhost locations page lists typical round trips from major Indian cities to its Mumbai and Delhi NCR data centres, which you can compare with your current host. As of November 2026, Cloudflare's network page lists more than 20 Indian cities, including Mumbai, New Delhi, Chennai, Bangalore, Hyderabad and Kolkata.

Cloudflare CDN India setup: the free plan

The Cloudflare Free plan is the usual no-cost option, and setup means moving your DNS to Cloudflare and turning on the proxy for your website records. On Free and Pro plans, Cloudflare supports only the full setup, where you change your domain's nameservers at the registrar to the pair Cloudflare assigns.

  1. Add the domain in Cloudflare and let it scan your existing records. Add anything missing, especially MX, SPF, DKIM and DMARC records.
  2. Set the A or CNAME records for your website (root and www) to Proxied. Only A, AAAA and CNAME records can be proxied; MX and TXT stay DNS-only.
  3. Change the nameservers at your registrar and wait for the switch to complete.
  4. Under SSL/TLS, choose Full (strict). It requires an unexpired origin certificate from a public CA, such as Let's Encrypt, or from Cloudflare's Origin CA, matching the hostname.
  5. Add cache rules only for what you know is safe, then check headers with curl -sI as shown above.

CDN for WordPress: what to cache and what to bypass

For a CDN for WordPress, cache static files freely and cache HTML only with clear exclusions. Bypass /wp-admin/, /wp-login.php, cart, checkout and account pages, and any request that sets cookies. Cloudflare will not cache a response that carries a Set-Cookie header or Cache-Control: private, no-store, no-cache or max-age=0. Without any header, it caches eligible static files for 120 minutes by default.

Purge by URL, not purge everything

After you edit a page or replace a file, purge just those URLs. Cloudflare warns that purging everything on a busy site can flood the origin with requests and slow it down while the cache refills.

Common problems after adding a CDN

Most CDN problems come from SSL mode, stale cache or the origin seeing the CDN's address instead of the visitor's.

  • Redirect loops with Flexible SSL. Flexible mode connects to your origin over plain HTTP. If the origin redirects HTTP to HTTPS, every request bounces back and the browser shows a redirect error. Switch to Full (strict); the ERR_TOO_MANY_REDIRECTS guide walks through the checks.
  • Stale pages. Visitors still see an old version. Check cf-cache-status and Age, purge the specific URL, and lower the edge TTL for HTML that changes often.
  • Every visitor has a Cloudflare IP. Logs, security plugins and rate limits see Cloudflare's addresses. The real address arrives in the CF-Connecting-IP header. On Nginx, list Cloudflare's published ranges with set_real_ip_from and add real_ip_header CF-Connecting-IP;. On Apache, enable mod_remoteip with RemoteIPHeader CF-Connecting-IP and RemoteIPTrustedProxy lines for the same ranges. Keep the ranges current from cloudflare.com/ips; trusting the header from any other source lets visitors fake their IP.

Using a CDN with Bigdomainhost

On Web & cPanel hosting and WordPress hosting, your site runs on LiteSpeed with LSCache on servers in Mumbai, so cached WordPress pages are already served quickly to Indian visitors from the origin. A free SSL certificate is issued for every domain, which means you can use Cloudflare's Full (strict) mode once the domain resolves to the server. If you move nameservers to Cloudflare, DNS is then managed there instead of on ns1.bigdomainhost.com and ns2.bigdomainhost.com, so copy every record first.

On a KVM VPS or dedicated server in Mumbai or Delhi NCR, you configure the web server yourself, including the real-IP settings above. For help, call +91 75994 50220 during IST hours, WhatsApp the same number at any time, or email support@bigdomainhost.com.

Sources (checked )

How Bigdomainhost can help

A CDN works best in front of an origin that is already fast and close to your visitors. Bigdomainhost Web & cPanel hosting runs on LiteSpeed in Mumbai, so pages reach Indian visitors quickly even before a CDN, and every domain gets a free SSL certificate, so Cloudflare's Full (strict) mode works once DNS points to us. Moving your site is free, and an engineer can help you set up the CDN, by phone in IST hours or on WhatsApp at any time.

Get cPanel hosting Ask an engineer on WhatsApp

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

What is a CDN?

A CDN, or content delivery network, is a group of servers in many cities that store copies of your website's files and serve them from the location closest to each visitor. Your hosting server remains the origin, and the CDN only fetches from it when it does not hold a fresh copy.

How does a CDN work?

Visitors are routed to a nearby point of presence. If that edge server has a fresh cached copy, it replies at once, which is a cache hit. If not, it fetches the file from your origin, returns it and usually stores it for the time set by the Cache-Control header or the CDN's own rules.

Do I need a CDN if my server and visitors are in India?

Not always. With a server in Mumbai, Indian visitors already see round trips of roughly 20 to 45 ms, so page HTML gains little. A CDN still helps with images and scripts, visitors on congested mobile networks, visitors abroad, and filtering attack traffic. Measure your latency first, then decide.

CDN vs hosting: what is the difference?

Hosting is where your site runs: PHP, the database, files and email routing. A CDN is a caching and delivery layer in front of that host that copies HTTP responses to edge locations. You always need hosting; a CDN is optional and cannot run your site on its own.

Which Cloudflare SSL mode should I use?

Use Full (strict). It encrypts the connection from Cloudflare to your server and checks that the origin certificate is valid, unexpired and issued by a public CA or Cloudflare's Origin CA. Avoid Flexible, which connects to your server over plain HTTP and causes redirect loops when the server forces HTTPS.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.