Blog / Technical SEO /
Self-hosting fonts and speeding up Google Fonts
Your page loads a font from Google Fonts. The text looks fine, but before the final font can show, the browser has to connect to someone else’s server. So, would self-hosting the files make the page faster?
Maybe. A self-hosted font isn’t automatically smaller, quicker or easier to look after.
It depends on the font, the layout, the network path, privacy requirements and how the files are served. I’d measure the current setup before touching anything. Fonts affect how fast a page feels and how it shifts, and a sloppy migration can bring missing glyphs or text that suddenly changes size.
Understand what the browser downloads
A web font file holds the glyphs and style information used to draw text. The page may request several weights, styles or subsets. If it loads every variation whether or not the page uses them, that’s wasted work. If a third party serves the font, the browser also has to connect to that provider.
Open the Network panel and see which font files load, how big they are and when they’re requested. Check whether the page uses regular, bold, italic or variable files. Also check what the browser has cached, comparing a fresh visit with repeat navigation.
The font is one part of the page. Images, JavaScript, CSS, server response and third-party widgets may be more important. Do not attribute a slow page to Google Fonts simply because the font request appears in a waterfall.
When self-hosting can help
Self-hosting removes a third-party connection and gives you control over caching and file selection. It can also simplify privacy review for some organisations, though legal obligations depend on jurisdiction and implementation. Ask a privacy or legal adviser before assuming local hosting settles compliance.
The benefit depends on the font and the audience. If visitors are far from your origin server, a CDN may serve fonts better. If the site already uses a well-configured delivery service, moving the files to the origin may add latency. Test with the users and routes that matter to the business.
Only host font files the business is licensed to host. A web font licence may restrict where and how it’s served. Grabbing a file from a provider’s cache or developer tools doesn’t give you permission to redistribute it. Check the licence and use an official source.
Choose the right files and CSS
Prefer modern, appropriately compressed formats supported by your target browsers, and include only the character subsets and weights the design needs. If the site serves several languages, verify that the subset includes the characters required. A missing glyph can fall back to a different font and make the page look inconsistent.
Define font-display thoughtfully. The browser can show fallback text while the web font loads, or it may briefly keep text invisible. The trade-off is visual stability and matching the design. Test the page under a slow connection to see whether the chosen behaviour is comfortable.
Preload only a font that’s critical to the first view. Too many preloads compete with other resources and waste bandwidth. Use the correct URL, format and cross-origin settings, then check the preload is actually used.
Fallback fonts should be chosen deliberately. System fonts can differ in width and line height, causing text to reflow when the web font arrives. Compare headings, navigation and paragraphs for layout shifts. Adjust CSS only after measuring the actual font metrics rather than copying values from another site.
Test before and after
Record a baseline with the current configuration. Test a representative page in a clean browser profile, inspect font requests, compare loading behaviour and watch for layout changes. Use both lab tools and real-user data where available. Core Web Vitals are LCP, INP and CLS; font loading may contribute to layout behaviour but is not the only cause of a poor metric.
After moving fonts, verify that all needed characters and weights display, that caching works and that the browser does not make repeated unnecessary requests. Test on mobile and with a slow connection. If a page uses a consent manager, check that the font request behaves according to the site’s policy.
Keep track of updates. A self-hosted font will not update itself when the provider releases a new version or the licence changes. Document the source, version, licence and file location. Assign an owner who can keep the files and CSS current.
Consider a simpler design choice
Sometimes the best optimisation is fewer weights, or a system font. One well-chosen family is often easier to read and faster to deliver than several decorative ones. I’d talk to the designer about what’s essential to the identity and what only adds complexity.
Do not trade readability for a small laboratory score improvement. Typography affects hierarchy, accessibility and brand recognition. The aim is a dependable experience, not the fewest possible font bytes at any cost.
Check caching and delivery rules
A font migration can be correct at the file level and still fail because the server sends an unexpected content type, caching header or cross-origin policy. Inspect the response for each font file in developer tools and confirm that the CSS points to the expected location. If a content security policy is active, check that the new source is allowed without broadening the policy unnecessarily.
After deployment, clear relevant caches and test a fresh session as well as a repeat visit. A stale stylesheet may continue requesting an old file, while a CDN may keep serving a previous version. Keep a rollback path and compare the rendered text on the actual templates that use the font. That catches issues which a successful build or a single homepage screenshot may miss.
Related reading
- Image formats: WebP, AVIF and when JPEG is fine
- How to check if a WordPress theme is slowing you down
- Third-party scripts: chat widgets, pixels and speed
Look at one slow page’s font requests before you change providers. Would fewer weights or a better fallback fix it with less maintenance?