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
- Measure time to first byte and round-trip time from your visitors' cities.
- Make sure the origin already has a valid, publicly trusted SSL certificate.
- List what must never be cached: admin, cart, checkout and account pages.
- Set sensible
Cache-Controlheaders on static files at the origin. - Use SSL mode Full (strict), never Flexible.
- 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.
| Content | Helped by a CDN? | Why |
|---|---|---|
| Images, CSS, JavaScript, fonts | Yes, strongly | Same bytes for everyone; cached at the edge for long TTLs |
| Video and downloadable files | Yes | Large files benefit most from a nearby copy |
| Cacheable HTML (blog posts, landing pages) | Yes, if you add a cache rule | Cloudflare does not cache HTML by default |
| Logged-in pages, carts, checkouts | No | Personalised per visitor, must reach the origin |
| Slow database queries and PHP | No | The edge waits for the origin like any browser |
| API calls and form submissions | Rarely | Usually 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.
| Situation | Typical round trip without CDN | Likely gain from a CDN |
|---|---|---|
| Indian visitor, server in Mumbai | 20 to 45 ms | Small for HTML, useful for assets |
| Indian visitor on congested mobile data | Adds 5 to 40 ms or more | Moderate; fewer origin trips help |
| Visitor in Europe or the US, server in Mumbai | 120 to 260 ms | Large for cached content |
| Indian visitor, server in the US | 200 to 260 ms | Large, 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.
- Add the domain in Cloudflare and let it scan your existing records. Add anything missing, especially MX, SPF, DKIM and DMARC records.
- 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. - Change the nameservers at your registrar and wait for the switch to complete.
- 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.
- Add cache rules only for what you know is safe, then check headers with
curl -sIas 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-statusandAge, 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-IPheader. On Nginx, list Cloudflare's published ranges withset_real_ip_fromand addreal_ip_header CF-Connecting-IP;. On Apache, enablemod_remoteipwithRemoteIPHeader CF-Connecting-IPandRemoteIPTrustedProxylines 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 )
- IETF RFC Editor: RFC 9111: HTTP Caching
- Cloudflare Docs: Default cache behavior
- Cloudflare Docs: Encryption modes: Flexible
- Cloudflare Docs: Purge everything
- Cloudflare Docs: Restoring original visitor IPs
- Cloudflare Docs: DDoS Protection
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.