Skip to content

Google Fonts loaded from Google servers on WordPress: fix it

Your WordPress site loads Google Fonts from Google's servers on every visit. How to find which theme or plugin does it, and how to host the fonts locally.

Lukas Kontur · · 8 min read

A scan of your WordPress site reports external fonts loaded before consent, and the requests go to fonts.googleapis.com and fonts.gstatic.com. That means every visitor's browser downloads your fonts from Google's servers as soon as a page opens, before your cookie banner has been answered. A cookie banner usually does not change this, because fonts are not cookies. The common fix is to host the fonts on your own server. This guide shows you how to find what loads them and how to switch to local fonts, step by step.

The symptoms

  • A scan report lists external fonts loaded before consent with requests to fonts.googleapis.com or fonts.gstatic.com.
  • In the page source, you find links to fonts.googleapis.com, sometimes with a "preconnect" hint to fonts.gstatic.com.
  • You chose a font in your theme or page builder and never thought about where it comes from.

What the browser actually sends

When a page links to Google Fonts, the browser first loads a small stylesheet from fonts.googleapis.com, then the font files from fonts.gstatic.com. In its FAQ, Google says the Google Fonts Web API does not set or log cookies. It also explains that each request still sends Google the visitor's IP address, the requested URL and HTTP headers such as the user agent and referrer (Google Fonts FAQ, privacy section).

When the font files come from your own server instead, the visitor's browser does not contact Google for them at all. That is what "hosting fonts locally" or "self-hosting" means.

How to check it yourself

You need Chrome and about five minutes.

  1. Open a new private window (three-dot menu, "New Incognito window") and press F12 to open DevTools.
  2. In the Network tab, tick Disable cache (Chrome DevTools: Network reference).
  3. Type fonts.g in the filter box. This catches both fonts.googleapis.com and fonts.gstatic.com.
  4. Load your home page and do not touch the banner.
  5. For each request, click it and open the Initiator tab. Note the file that started it.
  6. Repeat on a product page, a blog post and your contact page. Different templates can load different fonts.
  7. Press Ctrl + U to view the page source and search for fonts.googleapis.com and fonts.gstatic.com. Note where each match sits.

The Initiator usually points to the cause:

  • A file under /wp-content/themes/: your theme loads the fonts.
  • A file under /wp-content/plugins/elementor/ or another builder: your page builder loads them.
  • A file under another plugin folder: for example a slider, form or popup plugin.
  • A CSS file: the fonts are pulled in by an @import line inside a stylesheet.
  • An embedded map or video frame: the fonts come with that embedded service. Hosting your own fonts does not change those requests; the embed itself has to wait for consent.

Why it happens

In the order we see them most often:

  1. The theme loads Google Fonts by default. Many themes offer a large font list that is served from Google.
  2. The page builder loads them. For example, Elementor has a setting to load Google Fonts locally, but since version 3.32.1 its default is Disabled, which means fonts are loaded from Google's CDN (Elementor: Elementor and Google fonts). Elementor also says that if you had enabled it in an earlier version, you need to enable it again after updating.
  3. A plugin brings its own fonts. Sliders, form builders and popup plugins sometimes load fonts on their own, separately from the theme.
  4. A stylesheet contains an @import. This is harder to find, and some tools cannot handle it automatically.
  5. Leftover hints. A preconnect or dns-prefetch line pointing to fonts.gstatic.com can stay in the page after the fonts themselves are local. A preconnect hint asks the browser to open a connection to that server in advance.
  6. A cached page. Your cache keeps serving the old page, even after you changed the setting.

The fix

Choose the option that matches what you found. Test again after each step, in a new private window.

Option 1: switch on local fonts in your page builder or theme

For Elementor, its help page describes these steps:

  1. Go to Elementor, Editor, Settings and click the Performance tab.
  2. Scroll to Load Google Fonts Locally.
  3. Choose Enable: Serve fonts from your server.
  4. Click Save Changes.

Elementor then downloads the fonts in use and stores them in /wp-content/uploads/elementor/fonts/.

For other themes and builders, search the theme's documentation for "local fonts", "host fonts locally" or "disable Google Fonts". Many themes have such a setting, but the name and place differ.

Option 2: use the WordPress Font Library

WordPress has its own Font Library under Appearance, Fonts. According to the WordPress documentation, from version 7.0 it is available for both block themes and classic themes (WordPress.org: The Font Library).

  1. Go to Appearance, Fonts and open the Install Fonts tab.
  2. Click Allow access to Google Fonts. This lets your site download fonts from Google once, in the admin area.
  3. Search for your font, select the variants you need and click Install.
  4. Go to Appearance, Editor, Styles and choose the new font for your site or for specific blocks.

The documentation says: "WordPress downloads the selected font files and hosts them on your site rather than loading them from Google." This only helps if your theme then uses these fonts. If the theme or a plugin still loads its own copy from Google, use option 1 or 3 as well.

Option 3: use a plugin that hosts the fonts for you

Two widely used plugins on WordPress.org do this:

  • OMGF finds Google Fonts on your site, downloads them to your server and removes the external requests. Its settings are under Settings, Optimize Google Fonts. According to its plugin page, the free version also removes leftover preconnect and preload hints, while detection of fonts in @import rules and fonts added by JavaScript is part of the paid Pro version (WordPress.org: OMGF).
  • Local Google Fonts hosts the fonts your site uses locally. Its settings are under Settings, Google Fonts. Its plugin page says it "currently only checks fonts embedded via wp_enqueue_style", that fonts loaded with @import must be changed first, and that in Divi you have to disable "Improve Google Fonts Loading" (WordPress.org: Local Google Fonts).

Use one of them, not both. After installing, open a few pages of your site as a visitor, because some tools only find fonts once a page has been viewed.

Step after any option: clean up and clear caches

  1. Check the page source again for fonts.googleapis.com and fonts.gstatic.com, including preconnect lines.
  2. If an @import line remains in your theme's CSS, ask whoever maintains your site to replace it with the local font.
  3. Clear your caching plugin, your host's cache and Cloudflare if you use it.
  4. If the font requests come from an embedded map or video, set that embed to wait for consent in your cookie plugin. Our pre-consent tracking article explains the background.

How to verify the fix

Use a new private window for each run and keep Disable cache ticked:

  1. Home page, no click: the fonts.g filter shows no requests.
  2. Product page, blog post, contact page: still no requests to fonts.googleapis.com or fonts.gstatic.com.
  3. Font files: clear the filter and click the Font type filter. The font files should now come from your own domain.
  4. Looks: your headings and text still use the right font. If the text suddenly looks plain, a font was removed but not replaced; check the plugin's or theme's settings.
  5. Page source: no fonts.googleapis.com or fonts.gstatic.com left, including in preconnect hints.

Re-run this after every theme update, page builder update and new plugin. Updates can switch settings back, as the Elementor change of default shows.

Sample scan

45 / 100

Medium risk · Trackers: 8 · Pre-consent tracking: yes

See sample report →

Related reading: My cookie plugin says compliant, but the scan disagrees and Complianz not blocking GA4 or Meta Pixel.

Check your site in 1 minute

Our free scan opens your site like a first-time visitor and lists every external font, tracker and cookie that loads before the banner is answered. No signup needed. Run a free scan.

Get alerted when it breaks

A theme or builder update can bring the Google requests back without you noticing. With monitoring, we re-scan your site on a schedule and email you when external fonts or trackers show up again. The free plan includes one monitored site with a weekly re-scan and email alerts. Create an account and add your site.

On WordPress, our free WordPress plugin also re-scans your site automatically after plugin and theme updates.

Last updated: