{
    "title": "CDN",
    "seo_title": "CDN: definition, how it works and use with WordPress",
    "h1": "CDN",
    "description": "CDN (content delivery network): how edge caching works, what it really caches and how to use one with a WordPress site.",
    "lead": "A CDN (content delivery network) is a set of servers spread around the world that keep cached copies of a website's files and serve them from the location closest to each visitor. It cuts load times and the load on the origin server, and often filters out part of the attacks.",
    "language": "en",
    "locale": "en-US",
    "type": "definition",
    "url": "https://www.wp-feint.com/glossary/cdn/",
    "canonical": "https://www.wp-feint.com/glossary/cdn/",
    "markdown": "https://www.wp-feint.com/glossary/cdn/index.md",
    "json": "https://www.wp-feint.com/glossary/cdn/index.json",
    "published": "2026-10-28T08:00:00+00:00",
    "modified": "2026-11-22T12:06:42+00:00",
    "site": {
        "name": "WP Feint",
        "url": "https://www.wp-feint.com/"
    },
    "translations": [
        {
            "language": "en",
            "hreflang": "en-US",
            "title": "CDN",
            "url": "https://www.wp-feint.com/glossary/cdn/",
            "markdown": "https://www.wp-feint.com/glossary/cdn/index.md",
            "json": "https://www.wp-feint.com/glossary/cdn/index.json"
        },
        {
            "language": "fr",
            "hreflang": "fr-FR",
            "title": "CDN",
            "url": "https://www.wp-feint.com/fr/definitions/cdn/",
            "markdown": "https://www.wp-feint.com/fr/definitions/cdn/index.md",
            "json": "https://www.wp-feint.com/fr/definitions/cdn/index.json"
        },
        {
            "language": "es",
            "hreflang": "es-ES",
            "title": "CDN",
            "url": "https://www.wp-feint.com/es/glosario/cdn/",
            "markdown": "https://www.wp-feint.com/es/glosario/cdn/index.md",
            "json": "https://www.wp-feint.com/es/glosario/cdn/index.json"
        },
        {
            "language": "de",
            "hreflang": "de-DE",
            "title": "CDN",
            "url": "https://www.wp-feint.com/de/glossar/cdn/",
            "markdown": "https://www.wp-feint.com/de/glossar/cdn/index.md",
            "json": "https://www.wp-feint.com/de/glossar/cdn/index.json"
        },
        {
            "language": "it",
            "hreflang": "it-IT",
            "title": "CDN",
            "url": "https://www.wp-feint.com/it/glossario/cdn/",
            "markdown": "https://www.wp-feint.com/it/glossario/cdn/index.md",
            "json": "https://www.wp-feint.com/it/glossario/cdn/index.json"
        },
        {
            "language": "pt",
            "hreflang": "pt-BR",
            "title": "CDN",
            "url": "https://www.wp-feint.com/pt/glossario/cdn/",
            "markdown": "https://www.wp-feint.com/pt/glossario/cdn/index.md",
            "json": "https://www.wp-feint.com/pt/glossario/cdn/index.json"
        },
        {
            "language": "nl",
            "hreflang": "nl-NL",
            "title": "CDN",
            "url": "https://www.wp-feint.com/nl/woordenlijst/cdn/",
            "markdown": "https://www.wp-feint.com/nl/woordenlijst/cdn/index.md",
            "json": "https://www.wp-feint.com/nl/woordenlijst/cdn/index.json"
        }
    ],
    "headings": [
        {
            "level": 1,
            "text": "CDN"
        },
        {
            "level": 2,
            "text": "How a CDN works"
        },
        {
            "level": 2,
            "text": "What a CDN actually caches"
        },
        {
            "level": 2,
            "text": "Benefits and limitations"
        },
        {
            "level": 2,
            "text": "For WordPress"
        }
    ],
    "body": "A site hosted in Chicago takes longer to answer a visitor in Sydney or Singapore than one in Detroit: distance adds latency to every round trip. A CDN places so-called edge servers in many cities and hands them copies of your files. Each visitor is routed to the nearest one, most often through [DNS](https://www.wp-feint.com/glossary/dns/): the site's domain points to the CDN's network rather than directly to your server.\n\n## How a CDN works\n\nA CDN acts as a shared cache sitting between visitors and your server, which is then called the origin. On each request, the edge server checks whether it has a valid copy. If it does, it sends it back without contacting the origin; if not, it fetches the file, passes it on and keeps it for the next visitors.\n\n![Diagram of a request's path through a CDN. The visitor requests an image; the nearest edge server looks for it in its cache. If it's there (HIT), it returns it right away. If not (MISS), it requests it from the origin server, which runs WordPress or reads the file, then keeps a copy for the next visitors for as long as Cache-Control allows.](https://www.wp-feint.com/media/2026/10/cdn-cache-bordure-en.webp)\n\nHow long a copy is kept depends on the HTTP headers sent by the origin. MDN classifies CDNs as shared caches, which store a single response and serve it to many users: `Cache-Control: public, max-age=…` allows that caching, `s-maxage` sets a lifetime specific to shared caches, and `private` and `no-store` forbid it. Cloudflare, for example, reports the outcome of each request in the `cf-cache-status` header: HIT (served from cache), MISS (not cached, fetched from the origin), EXPIRED (stale copy), BYPASS or DYNAMIC (not cached).\n\n## What a CDN actually caches\n\nOne point often comes as a surprise: Cloudflare's documentation states that its CDN doesn't cache HTML or JSON by default. It keeps static files recognized by their extension (images, CSS, JavaScript, fonts, PDFs, videos), while WordPress pages are still generated by your server on every visit. Caching pages as well is possible with dedicated rules, as long as you exclude everything personalized: the admin area, cart, customer account and login pages.\n\n## Benefits and limitations\n\n- **Speed**: heavy files travel a shorter distance, and recent protocols such as [HTTP/2 and HTTP/3](https://www.wp-feint.com/glossary/http2-http3/) are often enabled at the edge.\n- **Lower load**: every file served from cache is one less request for your hosting.\n- **Protection**: a CDN running as a proxy absorbs part of volumetric attacks and often offers a web application firewall, as an add-on or included.\n- **Limitations**: a stale cache shows old versions after a change, so you need to know how to purge it; and your server no longer sees visitors' IP addresses, only the CDN's.\n\n*Video: “What is a Content Delivery Network (CDN)?” (IBM Technology)*\n\n## For WordPress\n\n- **Two families**: the proxy CDN (Cloudflare, for example), which sits in front of the whole site after you change nameservers, and the file CDN, where a plugin rewrites media URLs to a CDN subdomain.\n- **Restore visitors' real IP addresses**, otherwise login limiting, logs and bans end up targeting the CDN's servers. Our guide [Cloudflare in front of WordPress](https://www.wp-feint.com/cloudflare-wordpress-real-visitor-ip/) covers the server-side settings; WP Feint Pro also reads Cloudflare's header, but only when the connection comes from an official Cloudflare IP range, as explained on the [Cloudflare support page](https://www.wp-feint.com/features/cloudflare/).\n- **Purge after every update** of your theme or plugins, and make sure your caching plugin and the CDN don't contradict each other.\n- **Protect the origin**: if your server can still be reached directly by its IP address, an attacker can bypass the CDN and its firewall.\n\nImages served from the CDN's cache never reach your server: protection against [hotlinking](https://www.wp-feint.com/glossary/hotlinking/) then has to be configured in the CDN itself.\n\n## Related terms\n\n- [DNS](https://www.wp-feint.com/glossary/dns/)\n- [TTL (DNS)](https://www.wp-feint.com/glossary/dns-ttl/)\n- [HTTP/2 and HTTP/3](https://www.wp-feint.com/glossary/http2-http3/)\n- [Hotlinking](https://www.wp-feint.com/glossary/hotlinking/)\n- [DDoS attack](https://www.wp-feint.com/glossary/ddos-attack/)\n- [WAF (web application firewall)](https://www.wp-feint.com/glossary/waf/)\n\n\n## Sources\n\n- [MDN : Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control)\n- [Cloudflare Docs : Default cache behavior](https://developers.cloudflare.com/cache/concepts/default-cache-behavior/)\n- [Cloudflare Docs : Cloudflare cache responses](https://developers.cloudflare.com/cache/concepts/cache-responses/)",
    "definition": "A CDN (content delivery network) is a set of servers spread around the world that keep cached copies of a website's files and serve them from the location closest to each visitor. It cuts load times and the load on the origin server, and often filters out part of the attacks.",
    "group": "Web hosting",
    "aka": [
        "content delivery network",
        "content distribution network",
        "edge caching",
        "edge"
    ],
    "related": [
        {
            "title": "DNS",
            "url": "https://www.wp-feint.com/glossary/dns/",
            "markdown": "https://www.wp-feint.com/glossary/dns/index.md"
        },
        {
            "title": "TTL (DNS)",
            "url": "https://www.wp-feint.com/glossary/dns-ttl/",
            "markdown": "https://www.wp-feint.com/glossary/dns-ttl/index.md"
        },
        {
            "title": "HTTP/2 and HTTP/3",
            "url": "https://www.wp-feint.com/glossary/http2-http3/",
            "markdown": "https://www.wp-feint.com/glossary/http2-http3/index.md"
        },
        {
            "title": "Hotlinking",
            "url": "https://www.wp-feint.com/glossary/hotlinking/",
            "markdown": "https://www.wp-feint.com/glossary/hotlinking/index.md"
        },
        {
            "title": "DDoS attack",
            "url": "https://www.wp-feint.com/glossary/ddos-attack/",
            "markdown": "https://www.wp-feint.com/glossary/ddos-attack/index.md"
        },
        {
            "title": "WAF (web application firewall)",
            "url": "https://www.wp-feint.com/glossary/waf/",
            "markdown": "https://www.wp-feint.com/glossary/waf/index.md"
        }
    ],
    "sources": [
        {
            "title": "MDN : Cache-Control",
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control"
        },
        {
            "title": "Cloudflare Docs : Default cache behavior",
            "url": "https://developers.cloudflare.com/cache/concepts/default-cache-behavior/"
        },
        {
            "title": "Cloudflare Docs : Cloudflare cache responses",
            "url": "https://developers.cloudflare.com/cache/concepts/cache-responses/"
        }
    ],
    "format": "application/json"
}