Title: Preconnect issue
Last modified: May 1, 2022

---

# Preconnect issue

 *  Resolved [omahoung](https://wordpress.org/support/users/omahoung/)
 * (@omahoung)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/preconnect-issue/)
 * Hello,
 * I have a warning in Google PageSpeed insights when testing different websites.
   All these websites use SG Optimizer. The warning shows only when in the “Frontend
   optimization” options I turn on “Web fonts optimization”. The warning is:
 * `Warnings: A <link rel=preconnect> was found for "https://fonts.googleapis.com"
   but was not used by the browser. Only use preconnect for important origins that
   the page will certainly request.`
 * About the settings I use in SG Optimizer, basically all is switched on (preload,
   dns prefetch, web fonts optimization…).
 * Am I doing something wrong? Or is there another issue?
 * I have another question about the DNS prefetch for fonts. If all the fonts are
   preloaded, is it necessary or unnecessary to prefetch fonts.googleapis.com?
 * Thanks for taking the time to look at this problem.
    -  This topic was modified 4 years, 1 month ago by [omahoung](https://wordpress.org/support/users/omahoung/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpreconnect-issue%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [Vladimir Trandev](https://wordpress.org/support/users/vtrandev/)
 * (@vtrandev)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/preconnect-issue/#post-15606721)
 * Hello [@omahoung](https://wordpress.org/support/users/omahoung/),
 * With the Web Fonts Optimization, we are changing the default way to load Google
   fonts in order to save HTTP requests. When you enable it, we add the so-called“
   preconnect” link to fonts.gstatic.com so we will do the DNS lookup, TLS negotiation,
   and the TCP handshake.
 * As for your other question, once the option is enabled we automatically preload
   Google fonts, so you do not have to apply anything else. We make a request to
   Google, get the generated CSS which actually includes the fonts and then save
   it locally. I can see that the feature is working properly for your application
   and the generated .css file is currently available in your uploads/siteground-
   optimizer-assets/fonts folder.
 * Regards,
    Vladimir
 *  Thread Starter [omahoung](https://wordpress.org/support/users/omahoung/)
 * (@omahoung)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/preconnect-issue/#post-15607153)
 * Thanks for the fast answer.
    All my fonts are on [https://fonts.gstatic.com](https://fonts.gstatic.com)(
   I am testing the home page) but the plugin add a preconnect to [https://fonts.googleapis.com](https://fonts.googleapis.com)(
   that’s the reason of the PageSpeed Insights warning). Is this additional preconnect
   necessary?
    -  This reply was modified 4 years, 1 month ago by [omahoung](https://wordpress.org/support/users/omahoung/).
 *  Plugin Support [Georgi Ganchev](https://wordpress.org/support/users/georgiganchev/)
 * (@georgiganchev)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/preconnect-issue/#post-15607582)
 * Hello [@omahoung](https://wordpress.org/support/users/omahoung/),
 * As Vladimir explained with the Web Fonts Optimization we’re changing the default
   way we load Google fonts. A preconnect link for Google’s font repository is added
   to your head tag. This informs the browser that your page intends to establish
   a connection to another origin, and that you’d like the process to start as soon
   as possible. In addition, all other local fonts are also preloaded so browsers
   can cache and render them faster.
 * The fonts.googleapis.com appears to be in use and you can expect the same by 
   disabling the Web font optimizations and flushing the cache of your application.
   Inspecting the source code after those actions will show you the fonts without
   the additional enhancements that we apply. There you can verify that the geoport-
   body-fonts-css is using href=’//fonts.googleapis.com
 * Since it is included in the .css it gets automatically preconnected.
 * Best regards,
    Georgi Ganchev
 *  Thread Starter [omahoung](https://wordpress.org/support/users/omahoung/)
 * (@omahoung)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/preconnect-issue/#post-15607697)
 * Hi,
    Yes I can now see in the not cached version of the site that geoport-body-
   fonts-css uses href=//fonts.googleapis.com. But I actually still can’t understand
   very well why the cache version needs a prefetch to googleapis without these 
   fonts being actually loaded from that source. Anyway, if you say it is normal
   then it is fine for me. Thanks for the answers.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Preconnect issue’ is closed to new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

## Tags

 * [preconnect](https://wordpress.org/support/topic-tag/preconnect/)

 * 4 replies
 * 3 participants
 * Last reply from: [omahoung](https://wordpress.org/support/users/omahoung/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/preconnect-issue/#post-15607697)
 * Status: resolved