Skip to content
DEVOSWEB
All articles

Hosting Google Fonts locally: why and how

Why Google Fonts loaded from Google's servers are a privacy risk, what the ruling of the Munich Regional Court means and how to host fonts on your own server.

27 September 20263 min readDevrim Yilmaz
Hosting Google Fonts locally: why and how

Many websites load their font directly from Google. That is convenient, but there is a catch: the IP address of every visitor is transferred to Google when the font loads. In Germany this led to a wave of warning letters in 2022.

What the court decided

On 20 January 2022, the Regional Court of Munich I ruled that a website operator had to pay a visitor 100 euros in damages (case no. 3 O 17493/20). The site had loaded Google Fonts from Google's servers and passed on the IP address to Google without consent. The court saw this as a violation of the general right of personality and the GDPR. It also mattered that the font could easily have been hosted locally.

After the ruling, some people sent out warning letters on a massive scale. Some of these were later found to be abusive, and in Berlin there were even criminal investigations. That does not change the actual point: external fonts transfer data that does not need to be transferred. This is not legal advice.

How to tell whether your site is affected

  • Open your site on a computer, press F12 and switch to the "Network" tab. Reload the page and look for fonts.googleapis.com or fonts.gstatic.com.
  • Or open the source code with Ctrl+U and search for "fonts.googleapis".
  • Watch out with WordPress: themes and plugins often load Google Fonts on their own, even if you never chose a font.

The free website check on this site tests this automatically for your home page.

How to host fonts locally

  • Download the font files. Google Fonts offers a download, and you can get the compact WOFF2 format with tools such as google-webfonts-helper.
  • Put the files on your web server, for example in a /fonts folder.
  • Include them in your CSS with @font-face and remove the old link to fonts.googleapis.com.
  • Afterwards, check in the network tab that no more requests go to Google.

For WordPress there are plugins that store Google Fonts locally. Modern frameworks like Next.js automatically place Google fonts on your own server when the site is built, so the browser no longer contacts Google.

The licence is not a problem

Most Google Fonts are published under the SIL Open Font License or the Apache License. Both allow you to use the fonts on your own server.

Side effect: less waiting

Local fonts save an extra connection to a third-party server. The old argument that the font is already in the browser cache from other sites no longer holds: Chrome has separated its cache by website since 2020, and other browsers do the same.

Frequently asked questions

Does this apply to other external services too?

Yes. Icon libraries, scripts from third-party servers or embedded maps work on the same principle. Anything loaded from third-party servers without consent when the page opens transfers the IP address.

Do I have to change my font?

No. You can keep using the same font, it just comes from your own server instead of Google.

Questions about your website?
Free intro call, quick reply.
Send request