Engineering Guides

Self-Hosting Google Fonts for GDPR Compliance & Zero Third-Party Requests

Eliminate external fonts.googleapis.com requests for European GDPR compliance by packing local WOFF2 fonts, @font-face CSS, and CLS fallbacks.

4 min readUpdated:

Quick Answer

Self-hosting fonts removes external connections to fonts.googleapis.com and fonts.gstatic.com that leak visitor IP addresses under GDPR rulings. Drop your downloaded Google Fonts ZIP or TTF/OTF weights into FontTo to emit compressed WOFF2 files, @font-face CSS, and Anti-CLS overrides in one local ZIP.

Why European sites are migrating away from Google Fonts CDN

German and EU court rulings established that loading stylesheets from fonts.googleapis.com automatically transmits visitor IP addresses to third-party servers without prior consent. Furthermore, modern browsers now partition HTTP caches by top-level site origin, eliminating the historical cross-site cache benefit of public CDNs.

Serving WOFF2 fonts directly from your own origin or CDN eliminates an extra DNS/TLS handshake, improves LCP consistency, and guarantees zero third-party font tracking.

Turn raw Google Fonts ZIPs into production WOFF2 bundles

Google Fonts downloads ship uncompressed .ttf static weights or variable fonts rather than .woff2. Simply drop the entire .zip archive (or individual .ttf files) into FontTo's Self-Host Google Fonts tool: it extracts every font inside browser memory, encodes WOFF2 with optional hinting removal, and writes unified @font-face CSS plus size-adjust fallbacks.

<link rel="preload" href="/fonts/inter-regular.woff2" as="font" type="font/woff2" crossorigin />
<link rel="stylesheet" href="/fonts/fonts.css" />

Bonus optimization: subset and cache immutably

If your site only uses Latin Basic or a fixed language set, trim unused Cyrillic/Greek/Vietnamese blocks with Font Subsetter, then serve /fonts/*.woff2 with Cache-Control: public, max-age=31536000, immutable.

Frequently asked questions

Is self-hosting Google Fonts allowed under their licenses?

Yes. Fonts in the Google Fonts catalog use open-source licenses like SIL Open Font License (OFL) or Apache 2.0, which explicitly permit self-hosting and subsetting.

Is self-hosting faster than linking fonts.googleapis.com?

Almost always yes. Eliminating the extra DNS lookup, TLS handshake, and CSS waterfall lets browsers preload /fonts/*.woff2 immediately on the first HTML round-trip.

Why include crossorigin on local font preload tags?

The HTML spec requires the crossorigin attribute on font preloads even for same-origin URLs; omitting it causes browsers to fetch the font twice.

Authoritative References

Tools used in this guide

Related formats

Related Comparisons

More engineering guides