When your WordPress website uses Google Fonts, your visitor's browser has to make external requests to Google's servers to download the typography before it can display your text. This back-and-forth communication adds unnecessary milliseconds to your load time and can negatively impact your Core Web Vitals scores. By hosting these fonts locally on your Sternhost server, you eliminate those external requests, allowing your text to render almost instantly.

Since your Sternhost account is optimized with LiteSpeed, you can automate this entire process using the LiteSpeed Cache plugin. This means you do not need to manually download font files or write custom CSS to achieve this performance boost.

Step 1: Navigating to the Localization Settings

The LiteSpeed Cache plugin has a dedicated section for managing external resources like scripts and fonts.

  • Log in to your WordPress admin dashboard.

  • On the left-hand side, hover over LiteSpeed Cache and click on Page Optimization.

  • Click on the Localization tab located in the top menu of the settings page.

Step 2: Activating Font Localization

Once you are in the Localization tab, you can instruct the caching engine to pull external fonts onto your own server.

  • Locate the setting named 'Localize Resources' or 'Localize Google Fonts' (depending on your specific plugin version).

  • Toggle the switch to ON.

  • Scroll to the bottom of the page and click the Save Changes button.

Why Localizing Fonts Improves Performance

  • Eliminates DNS Lookups: Your visitors' browsers no longer have to spend time connecting to external domains like https://www.google.com/search?q=fonts.googleapis.com to fetch typography.

  • Leverages Browser Caching: Because the font files are now hosted directly on your Sternhost server, they can be cached locally by your visitors' browsers using standard expiration rules.

  • Prevents Render-Blocking: Local fonts load much faster alongside your site's CSS, preventing the dreaded "flash of invisible text" and providing a smoother reading experience for your users.

¿Fue útil la respuesta? 0 Los Usuarios han Encontrado Esto Útil (0 Votos)