JExcellence
JExcellence
Full-stack · Oldenburg
GUIDE · 5 MIN READ

Self-hosting Google Fonts and checking that it actually worked

How to see whether your website loads fonts from Google, how to serve them from your own server, and why a leftover preconnect still shows up.
Justin EiletzNovember 18, 2026

A font from Google looks exactly the same on your website as a font from your own server. The difference is on the network: in the first case every visitor's browser contacts Google before it can show the first sentence. This post shows how to spot that on your own site, how to serve the fonts yourself, and how to confirm that nothing was left behind.

What happens when a Google font loads

The embed code from Google puts a link to a Google stylesheet into the head of your page. That stylesheet points to the actual font files, which also live on Google's servers. The browser fetches both as soon as the page opens, before anyone has clicked anything.

The privacy check puts the consequence this way in its report: when the browser loads fonts from Google servers, Google receives your visitors' IP address before they have consented. A cookie banner does not change this, because the font loads no matter what anyone picks in the banner.

Checking your page

With nothing but the browser. Open your home page in a private window, open the developer tools (F12), switch to the Network tab and reload. Type fonts.g into the filter. Rows with fonts.googleapis.com or fonts.gstatic.com mean your fonts come from Google.

With the privacy check. The check opens your home page and up to two subpages in a fresh Chromium with no cookies and records every request. The google-fonts rule from PrivaLint 0.10.0 reports font files from Google domains as an error. Adobe Fonts has a rule of its own that recognises use.typekit.net and p.typekit.net. What it adds over the Network tab: it also covers subpages and names the exact address as evidence in the report.

Self-hosting with plain CSS

Without a framework it takes three steps.

  1. Download the font files in WOFF2 format, only the weights your site actually uses. Each weight is a separate file.
  2. Put the files on your server, for example under /fonts/.
  3. Replace the Google link with a rule in your own stylesheet:

Each weight needs its own block with the matching font-weight. font-display: swap shows the text in a fallback font right away and switches once your font has arrived.

Then remove the old link to fonts.googleapis.com from the page head. This is the step that often goes only halfway; more on that below.

Self-hosting with Next.js

In Next.js, next/font does the work. The Next.js 16 documentation says CSS and font files are downloaded at build time and served with the rest of your static assets, and the browser sends no requests to Google.

jexcellence.de loads four fonts this way, declared in app/resources/config.ts:

The import is called next/font/google, yet the font is served from your own domain. In the HTML jexcellence.de delivers, the font files sit under /_next/static/media/ as .woff2, and fonts.googleapis.com does not appear (checked on 17 November 2026). The project rule is short: next/font for all fonts, no <link> tags for fonts.

subsets: ["latin"] limits the file to Latin characters. If your content is in Polish, Hungarian or Turkish, check whether you need latin-ext as well.

The leftover you miss: preconnect

Many templates add a second hint next to the stylesheet link:

It asks the browser to open the connection to Google in advance. People who delete the stylesheet link often leave this line in place. PrivaLint treats it separately: font files from Google are an error, a remaining preconnect hint is a warning. Delete it too.

Two more places where Google fonts survive:

  • Embedded content. An embedded map or video brings its own requests to Google. The check reports those under its rule for embedded content, not under fonts.
  • Subpages with their own template. If a contact form, a shop or a booking tool uses a different template, check that page on its own.

After the change: check again

Clear the browser cache or use a private window again, otherwise you are looking at the old version. Then set the fonts.g filter in the Network tab again, or run the privacy check once more. The google-fonts rule should now pass without a finding, and the preconnect warning should be gone as well.

A report with no font finding only says that nothing that loaded came from Google. It is not a seal of approval for the whole site and it is not legal advice.

If you would rather not do it yourself

Moving fonts to your own server is one of the items I implement after a privacy check, together with embeds that wait for consent and a banner with a reject option on the first layer. A follow-up check comes after. Check your website or talk the report through with me.

CONTENTS
google fonts
dsgvo
datenschutz-check
next.js
next/font
schriften
Did this article raise a question about a project of your own? A 30-minute conversation about it is free and non-binding.