Content Delivery Networks

Decide which content belongs at the edge and how to keep the CDN consistent with WordPress.

2 min read

  • Article
  • Intermediate
  • 2 minutes read
  • Reviewed August 4, 2026
  • WordPress performance

A content delivery network distributes responses through geographically distributed edge locations.

It can reduce network distance, offload the origin and absorb traffic spikes.

A CDN does not automatically repair slow WordPress generation or excessive browser work.

Static Asset Delivery

Images, CSS, JavaScript and fonts are common CDN candidates.

The CDN can cache these files close to visitors and reuse them across requests.

Stable URLs and long cache lifetimes work best when assets are versioned.

Full-Page Edge Caching

Some CDNs can cache public HTML.

This can reduce origin TTFB dramatically, but rules must distinguish:

  • Signed-in users.
  • Cart and checkout.
  • Account pages.
  • Preview links.
  • Languages.
  • Geographic or currency variations.
  • Cookies that change output.

Origin and Cache Keys

Define which hostname and protocol are canonical.

Cache keys should vary only by the request properties that actually change content. Varying on every cookie destroys reuse, while ignoring important cookies can expose personalized data.

Purging and Freshness

WordPress publishing and configuration changes need to purge affected edge entries.

Prefer targeted invalidation where possible. Global purges can create traffic bursts against the origin.

Security and Availability

A CDN can provide TLS, network filtering, rate limits and origin shielding.

It also becomes a critical dependency. Protect provider accounts with 2FA and maintain recovery access to DNS and origin hosting.

Testing

Check:

  • Cache hit headers.
  • Edge location.
  • first and repeat request timing.
  • stale content behavior.
  • signed-in and anonymous pages.
  • image and font CORS.
  • redirects.
  • purge timing.
  • origin response when the CDN is bypassed.

Frequently Asked Questions

Does a CDN help a local audience?

It can still provide caching, protection and offload, but geographic benefit may be smaller.

Should WordPress media URLs use a separate CDN domain?

Either a separate hostname or reverse-proxied main domain can work. Consider cookies, CORS, SEO, migration and operational complexity.

Continue Learning

Previous: Object Caching in WordPress

Next: Image Performance