How to Self-Host Google Fonts for Privacy and Speed
Linking to Google's font CDN is easy, but more developers are choosing to self-host the same fonts. The license allows it, and there are real benefits.
Why self-host
- Privacy: no request to a third-party server, which simplifies compliance with privacy regulations in some regions.
- Performance: the font is served from your own domain, avoiding an extra DNS lookup and connection to another origin.
- Control: you decide exactly which weights and subsets ship, and the files can't change underneath you.
How to do it
- Download the font family (the files are openly licensed, so this is allowed).
- Convert to WOFF2 if needed and place the files in your project.
- Declare each weight with
@font-face, pointing at your local files. - Add
font-display: swapand preload your primary font.
The licensing green light
Because Google Fonts are released under open licenses, self-hosting is completely permitted — including for commercial sites. You're not bending any rules; you're using a freedom the license grants. For many projects it's the better default.