# Self-Hosting Google Fonts with ForgeCache

> Serve Google Fonts from your own site with ForgeCache: self-hosting, font-display swap, font preloading, and why the first visits may still load from Google.

- Canonical: <https://royalplugins.com/support/forgecache/google-fonts-self-hosting/>
- Last updated: 2026-11-26
- HTML version: <https://royalplugins.com/support/forgecache/google-fonts-self-hosting/>

---

ForgeCache can serve the Google Fonts your theme and plugins use from your own site instead of from Google, show text straight away while fonts load, and preload the one or two font files the top of your pages needs. This page explains the three font settings, what happens the first time fonts are downloaded, and how to check it is working.

## Where the settings are

Go to **ForgeCache → Settings → Optimization**. The three font settings sit together:

| Setting | What it does | Default |
| --- | --- | --- |
| Google Fonts Optimization | Downloads the Google Fonts your pages use and serves them from your site. | On |
| Font Display Swap | Shows text at once in a fallback font while Google Fonts load. | Off |
| Preload Fonts | Tells browsers to start downloading the font files you list straight away. | Empty |

Saving a change to any of them clears the page cache, so cached pages pick up the new font markup at once.

## Self-hosting Google Fonts

With **Google Fonts Optimization** on, ForgeCache finds the Google Fonts stylesheet links in your pages, downloads each stylesheet and its font files to your site, and points the links at the local copies. Visitors then load the fonts from your site, without a separate connection to Google.

- It handles Google Fonts stylesheets linked in the page (`fonts.googleapis.com`). Fonts your theme or a plugin already ships in its own files are left as they are.
- Local copies are refreshed from Google about once a week, and copies no page has used for 30 days are removed.
- Up to 20 different Google Fonts stylesheets are kept per site.

### The first visits after you turn it on

Fonts are downloaded in the background, a few at a time. On most hosts the download starts after the page has been sent to the visitor, so nobody waits for it; on servers that can’t finish a page early, a page view spends at most about 3 seconds on downloads and a scheduled task carries on with the rest. Until a stylesheet and all its font files are on your site, pages keep loading that font from Google as before. Large font families with many weights and styles can take several page views, or a few minutes of background work, to finish.

So the first visits after you turn it on may still load fonts from Google. That’s expected. Once a stylesheet is complete, ForgeCache clears the page cache, and pages are rebuilt to load the font from your site.

If one font file won’t download

A font file that fails to download three times stays at Google, and the rest of the stylesheet is served from your site. ForgeCache tries that file again about once a day. Font files larger than 4 MB are not downloaded.

## Font Display Swap

Without it, some browsers keep text invisible until the web font has downloaded. With **Font Display Swap** on, ForgeCache sets `font-display: swap` on Google Fonts, so visitors can read straight away in a fallback font and the web font takes over when it is ready.

- It applies to Google Fonts, whether they are self-hosted or still loaded from Google.
- Fonts set up in your theme’s or a plugin’s own stylesheets are not changed.
- You may see the text change font for a moment as the page loads. That’s the swap: a short flash of the fallback font instead of a blank space.

## Preload Fonts

A preload tells the browser to fetch a font file at once, before it has read your stylesheets. Use it for the font of your headline or main text, the one visitors see first.

```
/wp-content/themes/your-theme/fonts/heading.woff2
https://cdn.example.com/wp-content/uploads/fonts/body.woff2
```

- One font file address per line, up to 5.
- Only font files (`.woff2`, `.woff`, `.ttf` or `.otf`) on your own site or your CDN are accepted. Other lines are removed when you save, and a notice lists them.
- A file the page already preloads is not added twice.

Preload one or two files, not your whole font family

Every preloaded file competes with your images and scripts for the first moments of loading. Preloading many fonts makes a page slower, not faster. List only what the top of your pages needs.

## Check it is working

#### Open a page logged out

Use a private window, so you see the page visitors get.

#### Look at the font requests

Open your browser’s developer tools, go to the **Network** tab, filter by **Font** and reload. Self-hosted fonts load from your own domain (or your CDN); fonts still downloading load from `fonts.gstatic.com`.

#### Still loading from Google after a while?

Visit a few more pages and check again a few minutes later. If fonts still come from Google, make sure WordPress scheduled tasks run on your site and that your server can reach Google Fonts.

Related

- [**Site got slower after activation**](https://royalplugins.com/support/forgecache/site-got-slower-after-activation/): if pages load slower after turning on optimizations
- [**ForgeCache documentation**](https://royalplugins.com/support/forgecache/): every other optimization setting

[Back to ForgeCache Support](https://royalplugins.com/support/forgecache/)
[ForgeCache Plugin Page](https://royalplugins.com/forgecache/)
