CDN for web fonts

Serve versioned WOFF2 files from a CDN hostname. Check cross-origin headers and MIME types so fonts load from every site that uses them.

Example release policy
Versioned resource
/fonts/atlas-v4.woff2
Refresh on publication
/css/fonts.css

Configure cross-origin font delivery

Serve WOFF2 files from Cloud CDN with long TTLs, correct CORS and HTTP/3. Keep a first-party font hostname on your domain.

Versioned font files

WOFF2 assets with versioned URLs can retain long cache lifetimes. Verify the cross-origin response header on the cached file.

First-party font URLs

Keep font requests on your hostname instead of a third-party foundry CDN.

CORS under your policy

Cloud CDN can set CORS headers so fonts load from the site origin correctly.

Configuration

Cloud CDN overview
  1. Put WOFF2 files on an origin

    A static host or the site origin is enough.

  2. Long-cache immutable font URLs

    Version the filename when the face changes.

  3. Set CORS for font requests

    Allow the site origin so browsers do not block the face.

  4. Point the font hostname at Cloud CDN

    Often a path on the site distribution is enough.

Operational outcomes

  • Fonts are self-hosted at the edge
  • Immutable URLs skip purge
  • CORS is controlled on the distribution
  • Third-party font CDNs are optional

Frequently asked questions

Should I still use a foundry CDN?

You can. Self-hosting on Cloud CDN gives you cache, privacy and first-party URLs.

Which format should I cache?

WOFF2 is enough for current browsers. Avoid shipping extra legacy formats unless you must.

How long can I cache fonts?

Versioned WOFF2 files can use long TTLs. Change the filename when the font file changes.

Do fonts need HTTPS?

Yes. Cloud CDN delivers fonts over TLS 1.3 with the rest of the site.