Skip to content
Daniel Gietmann
← Blog
Websites

Google Fonts: why your website reports every visitor to Google

Many websites load fonts directly from Google and send every visitor's IP address along with the request. This is how you check that and turn it off.

Many business websites load their fonts directly from Google. That is convenient: one line in the code, and the page looks like the design. What happens in the background, very few people see.

What happens technically

When a page includes Google Fonts through fonts.googleapis.com, the browser fetches the font file directly from Google's servers when the page is opened. To do that it has to connect to these servers, and in the process its IP address is transmitted. That happens immediately, before the visitor has clicked on or agreed to anything.

In German case law the IP address counts as personal data. On 20 January 2022 the Landgericht München I (Munich I Regional Court, case no. 3 O 17493/20) awarded a visitor 100 euros in damages because a website had passed his IP address on to Google in this way without consent. In the year after that, many website operators received Abmahnungen (formal warning letters) on exactly this point.

I am not a lawyer, and whether and how this affects your business is, in case of doubt, for a lawyer to clarify. Technically, however, the situation is clear, and the solution is simple.

How to check your site

The quickest way is my website check. In the block “What the technology tells” it shows under “Fonts” whether your page loads fonts from Google, and under the third-party services which Google servers it contacts.

If you want to look yourself:

  1. Open your website in Chrome or Firefox.
  2. Press F12 and switch to the “Network” tab.
  3. Reload the page and type fonts.g into the filter at the top.

If entries with fonts.googleapis.com or fonts.gstatic.com appear, your page loads fonts from Google.

How to turn it off

The solution is: host the fonts yourself. The font files then sit on the same server as your website, and the browser only talks to you.

  1. Download the font. The vast majority of Google Fonts are under the SIL Open Font License, which expressly allows self-hosting. The licence is stated on each font's page.
  2. Store it as WOFF2. That is the format all current browsers read, and the smallest. A variable font covers all styles in one file.
  3. Include it in the stylesheet. An @font-face block points to your own file instead of to Google.
  4. Remove the old include. Everywhere, that is: in the theme, in plugins, in the page builder.

The last point is the one where it fails in practice. With WordPress, several plugins often load fonts independently of each other, a slider here, a contact form there. So be sure to check again after the switch.

A side effect: the page gets faster

It used to be an argument for Google Fonts that visitors would already have the font in their browser cache from another site. That has not been true since 2020: Chrome and other browsers now separate their cache by website, for privacy reasons. So every site loads the font anew anyway.

Self-hosted, the browser instead saves an additional connection to a third-party server. On a phone that is noticeable.

In short

Hosting Google Fonts yourself is an hour's work, makes the page faster and takes an unnecessary risk off the table. On all sites I build it is that way from the start, including this one.

Common questions

What happens when a website loads Google Fonts from Google?
The browser fetches the font file directly from Google's servers when the page is opened. To do that it has to connect to these servers, and in the process its IP address is transmitted. That happens immediately, before the visitor has clicked on or agreed to anything.
How do I check whether my website loads fonts from Google?
With the website check, or yourself in the browser: open the website in Chrome or Firefox, press F12, switch to the “Network” tab, reload the page and type fonts.g into the filter. If entries with fonts.googleapis.com or fonts.gstatic.com appear, the page loads fonts from Google.
How do I switch from Google Fonts to self-hosted fonts?
Download the font, store it as WOFF2 on your own server, include it through an @font-face block in the stylesheet and remove the old include everywhere: in the theme, in plugins, in the page builder. Check again after the switch, because with WordPress several plugins often load fonts independently of each other.
Am I allowed to host Google Fonts myself?
The vast majority of Google Fonts are under the SIL Open Font License, which expressly allows self-hosting. The licence is stated on each font's page.