Design and branding

Host Google Fonts on your own site: a German court ruling and speed

In January a Munich court treated loading fonts from Google servers as a privacy violation. Serving fonts yourself helps both legally and for speed.

Host Google Fonts on your own site: a German court ruling and speed

On 20 January 2022 the Munich regional court in Germany ruled that loading Google Fonts from Google servers on a site, which passes the visitor's IP address to Google without consent, violates the data protection regulation (GDPR). The court ordered the site owner to pay the visitor a small compensation. The ruling concerns Germany but shows a trend.

What is the problem?

Google Fonts are usually connected like this: a request to fonts.googleapis.com. The visitor's browser contacts Google on every visit, and the IP address goes there. To avoid it, it is enough to host the fonts on your own hosting.

The benefits

  • Privacy: no request to a third party for a font.
  • Speed: no time is lost connecting to an extra domain; all files come from one place.
  • Stability: even if the external service is down, the site looks the same.

How to switch

  1. Identify the fonts and weights you use (for example Regular and Bold).
  2. Download them in woff2 format (Google Fonts has download tools and the licence is open).
  3. Place the files on the site and connect them in CSS with @font-face.
  4. Add font-display: swap so text is visible while the font loads.
  5. Remove the old fonts.googleapis.com link.
  6. Additionally, load only the character sets you need (Latin, Cyrillic).

To tidy up your site's fonts and speed: website services.

Found it useful? Share it:

Get new articles by email

One or two emails a month: practical tips on websites, hosting and security. Unsubscribe any time with one click.