Title: google_api_connection_fail
Last modified: September 28, 2022

---

# google_api_connection_fail

 *  Resolved [figmint](https://wordpress.org/support/users/figmint/)
 * (@figmint)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/)
 * I am having this problem with 2 of my websites and my hosting service is not 
   sure how to fix the problem. Perhaps you can provide some guidance so that I 
   can help direct them on what to focus on in their search for a solution.
 * I also receive cURL errors
    -  This topic was modified 3 years, 8 months ago by [figmint](https://wordpress.org/support/users/figmint/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fgoogle_api_connection_fail-31%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/google_api_connection_fail-31/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/google_api_connection_fail-31/page/2/?output_format=md)

 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16050484)
 * Hi [@figmint](https://wordpress.org/support/users/figmint/),
 * Thanks for reaching out. If you’re encountering cURL errors this may be indicative
   of a hosting related issue. So we can determine more on this please share the
   following:
    1. Your [Site Health information](https://i.imgur.com/Rtkmsba.png). You can [use this form](https://docs.google.com/forms/d/1lhjns2K7c0Ny7ME4gxTcsnYtNUtcMr8BvFpPQi23Y1E/)
       to share privately if preferred.
    2. Before you attempt Site Kit set up, and encounter the google_api_connection_fail
       error, do you see any warnings on the initial Site Kit set up screen? If so,
       please share the full error and your current location. I ask as Google services
       are blocked in some regions.
    3.  Do you see any warnings or errors when checking your Site Health status (_[Tools > Site Health > Status](https://i.imgur.com/wSRWwon.png)_),
       which differs from your Site Health information requested above? Such errors
       may include REST endpoint references.
 * Let me know if you have any questions with the above.
 *  Thread Starter [figmint](https://wordpress.org/support/users/figmint/)
 * (@figmint)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16052001)
 * I sent in the info via the form provided. I had the Health Check & Troubleshooting
   app enabled while I gathered the health check information for the form. This 
   caused most of the plugins to be in inactive status. Do you want me to send again
   with this app disabled?
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16052256)
 * Thanks for sharing the additional information. And no problem with regards the
   Health Check & Troubleshooting plugin – I can see the plugins you have active.
   Based on the insights you provided can you share your current location?
 *  Thread Starter [figmint](https://wordpress.org/support/users/figmint/)
 * (@figmint)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16052612)
 * Oh yes. I forgot to include that information. I am located in Somerset, New Jersey,
   08873 USA.
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16054257)
 * Thanks for the update [@figmint](https://wordpress.org/support/users/figmint/).
 * In that case I suspect there is a hosting/cURL related issue triggering the notice
   and restricting communication between your site and Google services. There are
   a couple of checks you can perform to check this. Firstly can you inform me if
   you’re able to proceed with Site Kit set up from [this TasteWP link](https://tastewp.org/plugins/google-site-kit/),
   using a temporary and disposable WordPress site?
 * Secondly, please share the full cURL error you receive. This is typically output
   from your Site Health status (_Tools > Site Health > Status_).
 *  Thread Starter [figmint](https://wordpress.org/support/users/figmint/)
 * (@figmint)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16055459)
 * I was able to successfully proceed with the Site Kit set up using the TasteWP
   link.
    With Health Check & Troubleshooting plugin enabled, I went to Site Health
   status page and copied this text. The only time when I see an error that specifically
   mentions cURL is in the Site Kit plugin when I attempt to log into my Google 
   account.
 *     ```
       Site Health Status
       The site health check shows critical information about your WordPress configuration and items that require your attention.
   
       3 recommended improvements
       You should remove inactive pluginsSecurity
       You should remove inactive themesSecurity
       One or more recommended modules are missingPerformance
       PHP modules perform most of the tasks on the server that make your site run. Any changes to these must be made by your server administrator.
   
       The WordPress Hosting Team maintains a list of those modules, both recommended and required, in the team handbook (opens in a new tab).
   
       Warning The optional module, imagick, is not installed, or has been disabled.
       Warning The optional module, intl, is not installed, or has been disabled.
       ```
   
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16055938)
 * Thanks for performing this check. Based on there being no problems with the temporarily
   WordPress site, and no issues with third party plugins on your previous check,
   let’s rule out any third party plugin conflicts, as I can see you have additional.
   htaccess rules applied and plugins that can modify security rules.
 * In order to do so, as you already have the Health Check & Troubleshooting plugin
   active please follow the steps below:
    1. Login to your site from a Chrome browser [incognito window](https://i.imgur.com/ALzgiHp.png)
    2. Reset Site Kit (_[Tools > Available Tools > Reset Site Kit](https://i.imgur.com/P6al3e7.png)_)
    3. Navigate to “Plugins > Health Check & Troubleshooting > Troubleshoot”.
    4. From the same screen click on the “Available Plugins” tab at the top right and
       then click on the “Enable” option next to “Site Kit by Google”
    5. Attempt to setup Site Kit once more
 * IF the same cURL error appears, please share the full cURL error you encounter.
   As you have the Log Http requests plugin you may also wish to check for, or share
   any errors output.
 * Let me know if you have any questions with the above.
 *  Thread Starter [figmint](https://wordpress.org/support/users/figmint/)
 * (@figmint)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16056024)
 * When I first open the Site Kit dashboard, I get this error message.
 * ‘Looks like your site is having a technical issue with requesting data from Google
   services.
    To get more help, ask a question on our support forum and include 
   the text of the original error message: google_api_connection_fail’
 * I am able to log into google to set it up, but when I get to the screen saying
   that I am the verified owner of electro-marketing and then click on next, it 
   revers back to this error message. I wasn’t able to get that far into the set
   up process prior to this.
 * ‘Unknown Error (code: The cURL request was retried 3 times and did no succeed.
   cURL was unable to rewind the body of the request and subsequent retries resulted
   in the same error. Turn on the debug option to see what went wrong. See [https://bugs.php.net/bug.php?id=47204](https://bugs.php.net/bug.php?id=47204)
   for more information.). Get help’
 * With the Log Http requests plugin, there is a lot of information listed, but 
   nothing was marked as a cURL error under google site kit. There was one under
   google-site-kit where the response was a 404, not found.
 *  Thread Starter [figmint](https://wordpress.org/support/users/figmint/)
 * (@figmint)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16058965)
 * Do you have suggestions on what I should say to my hosting service to help direct
   them on what to look for on their end that might provide a possible solution?
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16059004)
 * Hi [@figmint](https://wordpress.org/support/users/figmint/),
 * Thanks for sharing the additional insights. With no specific cURL error output
   you can ask them to check your current cURL configurations. The plugin needs 
   to be able to connect to `https://sitekit.withgoogle.com`.
 * This can be checked with following command:
    `curl -I https://sitekit.withgoogle.
   com`
 * Alternatively, you can use the below wp-cli command:
    wp eval ‘print_r(wp_remote_head(“
   [https://sitekit.withgoogle.com&#8221](https://sitekit.withgoogle.com&#8221);));’
 * As you’re using the Log HTTP Requests plugin, feel free to share any error logs,
   however long using the [Site Health information form](https://docs.google.com/forms/d/1lhjns2K7c0Ny7ME4gxTcsnYtNUtcMr8BvFpPQi23Y1E/)
   previously used.
 * If you can share your error logs I can also check this with the team.
 *  Thread Starter [figmint](https://wordpress.org/support/users/figmint/)
 * (@figmint)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16059232)
 * Thank you. I provided those instructions to my hosting service a moment ago. 
   I’ll look into gathering the error log data and send them to your Site Health
   information form at little later today or tomorrow. I might have time to do it
   this afternoon, though not too sure about the available time.
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16059311)
 * Great! We can then troubleshoot this further, or check with the team. Note that
   support isn’t provided here in the forums over weekends, so take you time with
   any checks. You may also wish to check does the same occur with a fresh WordPress
   site on the same hosting plan.
 *  Thread Starter [figmint](https://wordpress.org/support/users/figmint/)
 * (@figmint)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16059316)
 * My hosting service hasn’t made the adjustment yet. I just went to the wp-admin
   and attempted the login again to google site-kit. I managed to successfully log
   in while completing all of the steps. When I reached the page that says “Congratulations”,
   I clicked on the button to return to the desktop. The dashboard then displayed
   the usual unknown cURL error that’s mentioned before.
 * I am just mentioning this because of the fact that I was able to get further 
   into the login process this time around. While doing this, I managed to find 
   some errors that popped up in the Log HTTP Requests plugin. I’ll copy them over
   soon.
 *  Thread Starter [figmint](https://wordpress.org/support/users/figmint/)
 * (@figmint)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16059346)
 * I submitted information to the Site Health information form that includes the
   errors that came up in the Log HTTP Requests plugin. Also, I did not have Site-
   Kit in troubleshooting mode when I copied the information.
 *  Plugin Support [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/#post-16059410)
 * Many thanks for sharing. I’ve added your details for discussion with the team
   next week. I’ll report back to you here once I have an update.
 * Let me know how you get on with the cURL command check from your hosting provider
   also. Further checks you may wish to check from your own site would be to check
   does the same occur with a clean WordPress install on the same hosting plan. 
   Regardless I will share your findings with the team and report back to you here.
   Thank you!

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/google_api_connection_fail-31/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/google_api_connection_fail-31/page/2/?output_format=md)

The topic ‘google_api_connection_fail’ is closed to new replies.

 * ![](https://ps.w.org/google-site-kit/assets/icon-256x256.png?rev=3141863)
 * [Site Kit by Google - Analytics, Search Console, AdSense, Speed](https://wordpress.org/plugins/google-site-kit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-site-kit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-site-kit/)
 * [Active Topics](https://wordpress.org/support/plugin/google-site-kit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-site-kit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-site-kit/reviews/)

## Tags

 * [Site Kit](https://wordpress.org/support/topic-tag/site-kit/)

 * 19 replies
 * 3 participants
 * Last reply from: [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/google_api_connection_fail-31/page/2/#post-16069331)
 * Status: resolved